/* Custom styling (migrated for Tailwind CLI build) */

:root {
  --color-foreground: rgb(17 24 39);
  --color-text-primary: var(--color-foreground);
  --color-surface-muted: rgb(241 245 249);
  --color-surface-muted-hover: rgb(226 232 240);
  --color-border-muted: rgb(203 213 225);
}

.dark {
  --color-foreground: rgb(243 244 246);
  --color-text-primary: var(--color-foreground);
  --color-surface-muted: rgb(30 41 59);
  --color-surface-muted-hover: rgb(51 65 85);
  --color-border-muted: rgb(71 85 105);
}

html,
body {
  overflow-x: hidden;
}

body {
  min-width: 320px;
}

main,
header,
footer,
section,
nav,
.grid > *,
.flex > * {
  min-width: 0;
}

input,
textarea,
select {
  max-width: 100%;
}

.text-xs,
.text-\[10px\] {
  font-size: 13px;
  line-height: 1.25rem;
}

.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-container > * {
  min-width: 0;
}

.feedback-widget {
  z-index: 60;
  pointer-events: none;
}

.feedback-backdrop {
  z-index: 59;
  pointer-events: auto;
}

.feedback-trigger {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1rem;
}

.feedback-panel {
  position: fixed;
  right: 24px;
  bottom: 88px;
  width: min(24rem, calc(100vw - 48px));
  border: 1px solid rgb(229 231 235);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
  padding: 1rem;
  z-index: 60;
  pointer-events: auto;
}

.dark .feedback-panel {
  border-color: rgba(55, 65, 81, 0.85);
  background: rgba(17, 24, 39, 0.98);
}

.feedback-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feedback-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.feedback-card-header h2 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: rgb(17 24 39);
}

.dark .feedback-card-header h2 {
  color: rgb(243 244 246);
}

.feedback-kicker {
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(148 163 184);
}

.feedback-close {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid rgb(226 232 240);
  background: rgb(248 250 252);
  color: rgb(71 85 105);
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dark .feedback-close {
  border-color: rgb(51 65 85);
  background: rgb(30 41 59);
  color: rgb(226 232 240);
}

.feedback-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.feedback-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0.25rem;
  background: transparent;
}

.feedback-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.feedback-type-option {
  border-radius: 0.9rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(248 250 252);
  padding: 0.65rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(51 65 85);
}

.feedback-type-option.is-active {
  border-color: rgb(99 102 241);
  background: rgba(99, 102, 241, 0.08);
  color: rgb(79 70 229);
}

.dark .feedback-type-option {
  border-color: rgb(51 65 85);
  background: rgb(30 41 59);
  color: rgb(203 213 225);
}

.dark .feedback-type-option.is-active {
  border-color: rgb(99 102 241);
  background: rgba(99, 102, 241, 0.16);
  color: rgb(165 180 252);
}

.feedback-message {
  width: 100%;
  min-height: 7rem;
  resize: vertical;
  border-radius: 1rem;
  border: 1px solid rgb(226 232 240);
  background: rgb(255 255 255);
  padding: 0.9rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(17 24 39);
}

.dark .feedback-message {
  border-color: rgb(51 65 85);
  background: rgb(17 24 39);
  color: rgb(243 244 246);
}

.feedback-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.feedback-actions button {
  flex: 1 1 0;
}

.feedback-back,
.feedback-send {
  border: 0;
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.feedback-back {
  background: rgb(241 245 249);
  color: rgb(51 65 85);
}

.dark .feedback-back {
  background: rgb(30 41 59);
  color: rgb(226 232 240);
}

.feedback-send {
  background: linear-gradient(90deg, rgb(79 70 229), rgb(124 58 237));
  color: rgb(255 255 255);
}

.feedback-send:disabled {
  background: rgb(148 163 184);
  color: rgb(255 255 255);
  opacity: 0.75;
  cursor: not-allowed;
}

.feedback-send:disabled:hover {
  transform: none;
}

.feedback-thanks-copy {
  font-size: 0.875rem;
  line-height: 1.6;
  color: rgb(100 116 139);
}

.dark .feedback-thanks-copy {
  color: rgb(148 163 184);
}

.validation-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border-muted);
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.validation-action-btn:hover {
  background: var(--color-surface-muted-hover);
}

.validation-action-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.35);
}

.validation-action-btn:active {
  transform: scale(0.98);
}

.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.mobile-nav-toggle svg {
  width: 20px;
  height: 20px;
}

.mobile-nav-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  border-bottom: 1px solid rgb(229 231 235);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.dark .mobile-nav-panel {
  border-color: rgba(55, 65, 81, 0.9);
  background: rgba(17, 24, 39, 0.96);
}

.mobile-nav-link {
  display: block;
  width: 100%;
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: rgb(51 65 85);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dark .mobile-nav-link {
  color: rgb(226 232 240);
}

.mobile-nav-link:hover {
  background: rgb(248 250 252);
}

.dark .mobile-nav-link:hover {
  background: rgb(30 41 59);
}

.mobile-nav-link.is-active {
  background: rgba(99, 102, 241, 0.08);
  color: rgb(79 70 229);
}

.dark .mobile-nav-link.is-active {
  background: rgba(99, 102, 241, 0.16);
  color: rgb(165 180 252);
}

@media (max-width: 480px) {
  .split-export-group .export-btn {
    width: auto;
  }

  .split-export-group .export-btn--primary {
    flex: 1 1 auto;
  }

  .split-export-group .export-btn--toggle {
    flex: 0 0 42px;
    width: 42px;
  }

  .feedback-trigger {
    right: 16px;
    bottom: 16px;
  }

  .feedback-panel {
    left: 16px;
    right: 16px;
    width: auto;
    max-width: calc(100vw - 32px);
    bottom: 88px;
  }

  .feedback-types {
    grid-template-columns: 1fr;
  }

  .feedback-actions {
    flex-direction: column;
  }

  .feedback-actions button,
  .feedback-type-option {
    width: 100%;
  }

  main button:not(.mobile-nav-toggle):not(.feedback-star) {
    width: 100%;
    max-width: 100%;
  }

  .validation-action-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: inline-flex;
  }
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-slide-in {
  animation: fadeSlideIn 0.3s ease-out forwards;
}

.table-container::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.table-container::-webkit-scrollbar-track {
  background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}
.dark .table-container::-webkit-scrollbar-thumb {
  background: #334155;
}
.table-container::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

.prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: #111827;
}
.dark .prose h2 { color: #f9fafb; }

.prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose p {
  margin-bottom: 1.5rem;
  line-height: 1.75;
}

.prose ul, .prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.75rem;
}

/* ============================================================
   Paste clean banner
   ============================================================ */
.paste-banner {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgb(238 242 255);
  border: 1px solid rgb(199 210 254);
  font-size: 0.8125rem;
  animation: fadeSlideIn 0.25s ease-out forwards;
}

.dark .paste-banner {
  background: rgba(79, 70, 229, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
}

.paste-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.paste-banner-msg {
  color: rgb(67 56 202);
  font-weight: 600;
  flex: 1 1 auto;
}

.dark .paste-banner-msg {
  color: rgb(165 180 252);
}

.paste-banner-warn {
  color: rgb(180 83 9);
}

.dark .paste-banner-warn {
  color: rgb(252 211 77);
}

.paste-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.paste-banner-show-removed,
.paste-banner-dismiss {
  border: none;
  background: none;
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.paste-banner-show-removed {
  color: rgb(99 102 241);
}

.paste-banner-show-removed:hover {
  background: rgba(99, 102, 241, 0.1);
}

.paste-banner-dismiss {
  color: rgb(107 114 128);
}

.paste-banner-dismiss:hover {
  background: rgba(107, 114, 128, 0.1);
  color: rgb(239 68 68);
}

.dark .paste-banner-dismiss {
  color: rgb(156 163 175);
}

.paste-banner-removed-list {
  margin-top: 0.625rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.6);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 200px;
  overflow-y: auto;
}

.dark .paste-banner-removed-list {
  background: rgba(15, 23, 42, 0.4);
}

.paste-banner-removed-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(199, 210, 254, 0.5);
  font-size: 0.75rem;
}

.paste-banner-removed-item:last-child {
  border-bottom: none;
}

.paste-banner-removed-line {
  font-family: ui-monospace, monospace;
  color: rgb(55 65 81);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 0;
}

.dark .paste-banner-removed-line {
  color: rgb(203 213 225);
}

.paste-banner-removed-reason {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgb(156 163 175);
  flex-shrink: 0;
  text-transform: capitalize;
}

.paste-banner-removed-more {
  padding: 0.2rem 0;
  font-size: 0.75rem;
  color: rgb(107 114 128);
  font-style: italic;
  list-style: none;
}

/* ============================================================
   File upload drop zone
   ============================================================ */
.file-drop-zone {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  height: 72px;
  border: 2px dashed rgb(203 213 225);
  border-radius: 0.875rem;
  background: rgb(248 250 252);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, height 0.2s ease;
  overflow: hidden;
  position: relative;
}

.dark .file-drop-zone {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
}

.file-drop-zone:hover,
.file-drop-zone:focus {
  border-color: rgb(99 102 241);
  background: rgb(238 242 255);
  outline: none;
}

.dark .file-drop-zone:hover,
.dark .file-drop-zone:focus {
  background: rgba(79, 70, 229, 0.08);
}

.file-drop-zone--active {
  border-color: rgb(79 70 229);
  background: rgba(99, 102, 241, 0.07);
  height: 96px;
}

.dark .file-drop-zone--active {
  background: rgba(99, 102, 241, 0.14);
}

.file-drop-icon {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  color: rgb(148 163 184);
}

.file-drop-zone:hover .file-drop-icon,
.file-drop-zone:focus .file-drop-icon {
  color: rgb(99 102 241);
}

.file-drop-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.file-drop-primary {
  font-size: 0.875rem;
  color: rgb(71 85 105);
  font-weight: 500;
}

.dark .file-drop-primary {
  color: rgb(148 163 184);
}

.file-drop-link {
  color: rgb(99 102 241);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.file-drop-hint {
  font-size: 0.75rem;
  color: rgb(148 163 184);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  pointer-events: none;
}

.file-error-banner {
  margin-top: 0.5rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  background: rgb(254 242 242);
  border: 1px solid rgb(252 165 165);
  color: rgb(185 28 28);
  font-size: 0.8125rem;
  font-weight: 600;
  animation: fadeSlideIn 0.2s ease-out forwards;
}

.dark .file-error-banner {
  background: rgba(185, 28, 28, 0.12);
  border-color: rgba(252, 165, 165, 0.3);
  color: rgb(252 165 165);
}

/* ============================================================
   Column selector panel
   ============================================================ */
.col-selector-panel {
  border: 1px solid rgb(199 210 254);
  border-radius: 1rem;
  padding: 1.25rem 1rem;
  background: rgb(238 242 255);
  animation: fadeSlideIn 0.25s ease-out forwards;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dark .col-selector-panel {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(79, 70, 229, 0.08);
}

.col-selector-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.col-selector-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  color: rgb(99 102 241);
}

.col-selector-filename {
  font-size: 0.875rem;
  font-weight: 700;
  color: rgb(49 46 129);
}

.dark .col-selector-filename {
  color: rgb(165 180 252);
}

@media (min-width: 1024px) {
  .tool-column {
    grid-column: span 6 / span 6;
  }
}

.col-selector-meta {
  font-size: 0.8125rem;
  color: rgb(107 114 128);
}

.dark .col-selector-meta {
  color: rgb(156 163 175);
}

.col-selector-prompt {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgb(55 65 81);
  margin: 0;
}

.dark .col-selector-prompt {
  color: rgb(226 232 240);
}

.col-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.col-pill-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgb(203 213 225);
  background: rgb(255 255 255);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgb(55 65 81);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.dark .col-pill-btn {
  border-color: rgb(51 65 85);
  background: rgb(17 24 39);
  color: rgb(148 163 184);
}

.col-pill-btn:hover {
  border-color: rgb(99 102 241);
  color: rgb(67 56 202);
}

.col-pill-btn--selected {
  border-color: rgb(79 70 229);
  background: rgb(79 70 229);
  color: rgb(255 255 255);
}

.col-pill-btn--selected:hover {
  background: rgb(67 56 202);
  color: rgb(255 255 255);
}

.col-pill-btn--suggested {
  border-color: rgb(99 102 241);
  color: rgb(79 70 229);
}

.dark .col-pill-btn--suggested {
  color: rgb(165 180 252);
}

.col-pill-badge {
  display: inline-block;
  padding: 0.05rem 0.3rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.15);
  color: rgb(79 70 229);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dark .col-pill-badge {
  background: rgba(99, 102, 241, 0.25);
  color: rgb(165 180 252);
}

.col-pill-btn--selected .col-pill-badge {
  background: rgba(255, 255, 255, 0.25);
  color: rgb(255 255 255);
}

.col-preview-area {
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(199, 210, 254, 0.6);
}

.dark .col-preview-area {
  background: rgba(15, 23, 42, 0.4);
  border-color: rgba(99, 102, 241, 0.2);
}

.col-preview-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(148 163 184);
  margin: 0 0 0.5rem 0;
}

.col-preview-list {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.col-preview-item {
  font-size: 0.8125rem;
  font-family: ui-monospace, monospace;
  color: rgb(55 65 81);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .col-preview-item {
  color: rgb(203 213 225);
}

.col-preview-empty {
  font-size: 0.8125rem;
  color: rgb(148 163 184);
  font-style: italic;
  margin: 0;
}

.col-selector-warning {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgb(180 83 9);
  margin-bottom: 0;
}

.dark .col-selector-warning {
  color: rgb(252 211 77);
}

.col-selector-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.col-use-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  border: none;
  background: linear-gradient(90deg, rgb(79 70 229), rgb(124 58 237));
  color: rgb(255 255 255);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.col-use-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.col-use-btn--disabled,
.col-use-btn:disabled {
  background: rgb(203 213 225);
  cursor: not-allowed;
  color: rgb(107 114 128);
}

.dark .col-use-btn--disabled,
.dark .col-use-btn:disabled {
  background: rgb(51 65 85);
  color: rgb(100 116 139);
}

.col-use-btn-icon {
  width: 1rem;
  height: 1rem;
}

.col-cancel-btn {
  border: none;
  background: none;
  padding: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(107 114 128);
  cursor: pointer;
  transition: color 0.15s ease;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.col-cancel-btn:hover {
  color: rgb(239 68 68);
}

/* ============================================================
   File loaded indicator
   ============================================================ */
.file-loaded-bar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  background: rgb(240 253 244);
  border: 1px solid rgb(167 243 208);
  animation: fadeSlideIn 0.2s ease-out forwards;
  flex-wrap: wrap;
}

.dark .file-loaded-bar {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(52, 211, 153, 0.3);
}

.file-loaded-icon {
  width: 1rem;
  height: 1rem;
  color: rgb(16 185 129);
  flex-shrink: 0;
}

.file-loaded-name {
}

@media (min-width: 1024px) {
  .tool-column {
    grid-column: span 6 / span 6;
  }
}

.dark .file-loaded-name {
  color: rgb(110 231 183);
}

.file-loaded-count {
  font-size: 0.8125rem;
  color: rgb(52 78 65);
  flex: 1 1 auto;
}

.dark .file-loaded-count {
  color: rgb(110 231 183);
}

.file-loaded-remove-btn {
  border: none;
  background: none;
  padding: 0.2rem 0.375rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgb(107 114 128);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.file-loaded-remove-btn:hover {
  color: rgb(239 68 68);
}

/* ============================================================
   Export buttons (Download CSV / Download Excel)
   ============================================================ */
.export-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: auto;
  padding: 0.6rem 0.95rem;
  border: none;
  border-radius: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.export-btn--primary {
  min-width: 132px;
  width: auto;
  border-top-left-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
  background: rgb(79 70 229);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
}

.export-btn--toggle {
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  padding: 0;
  border-top-right-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  background: rgb(79 70 229);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
}

.export-btn--toggle svg {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  color: #ffffff;
}

.export-btn:active {
  transform: scale(0.95);
}

.export-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.export-btn-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  /* Explicit white text — safe because the background is always a dark gradient */
  color: #ffffff;
}

.export-btn-icon {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  min-height: 1rem;
  flex-shrink: 0;
  /* Color inherits from .export-btn-inner */
}

.export-btn-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: translateX(-100%);
  transition: none;
}

.export-btn:hover:not(:disabled) .export-btn-shimmer {
  animation: shimmer 1.5s infinite;
}

.export-btn--csv {
  background: rgb(79 70 229);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
}

.export-btn--csv:hover:not(:disabled) {
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.35);
}

.export-btn--xlsx {
  background: rgb(79 70 229);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
}

.export-btn--xlsx:hover:not(:disabled) {
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.35);
}

.split-export-group {
  min-width: 174px;
  max-width: 100%;
}

.split-export {
  max-width: 100%;
}

.split-export-group .export-btn:disabled {
  box-shadow: none;
}

.export-format-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  min-width: 12rem;
  padding: 0.4rem;
  border: 1px solid rgb(229 231 235);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
  z-index: 20;
}

.dark .export-format-menu {
  border-color: rgba(55, 65, 81, 0.85);
  background: rgba(17, 24, 39, 0.98);
}

.export-format-option {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: none;
  border-radius: 0.7rem;
  background: transparent;
  color: rgb(51 65 85);
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dark .export-format-option {
  color: rgb(226 232 240);
}

.export-format-option:hover {
  background: rgb(248 250 252);
}

.dark .export-format-option:hover {
  background: rgb(30 41 59);
}

.export-format-option.is-active {
  background: rgba(99, 102, 241, 0.1);
  color: rgb(79 70 229);
}

.dark .export-format-option.is-active {
  background: rgba(99, 102, 241, 0.18);
  color: rgb(165 180 252);
}

/* ============================================================
   Invalid URL action buttons
   ============================================================ */
.invalid-url-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(252, 165, 165, 0.35);
}

.dark .invalid-url-actions {
  border-top-color: rgba(127, 29, 29, 0.4);
}

.invalid-remove-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  border: 1.5px solid rgb(220 38 38);
  background: rgba(220, 38, 38, 0.06);
  color: rgb(185 28 28);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.invalid-remove-btn:hover {
  background: rgb(220 38 38);
  color: #ffffff;
  border-color: rgb(220 38 38);
}

.dark .invalid-remove-btn {
  border-color: rgb(248 113 113);
  background: rgba(248, 113, 113, 0.08);
  color: rgb(248 113 113);
}

.dark .invalid-remove-btn:hover {
  background: rgb(239 68 68);
  border-color: rgb(239 68 68);
  color: #ffffff;
}

.invalid-show-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.625rem;
  border: 1.5px solid transparent;
  background: none;
  color: var(--color-text-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.invalid-show-btn:hover {
  opacity: 1;
  border-color: var(--color-border-muted);
  text-decoration: none;
}

@media (max-width: 480px) {
  .invalid-url-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .invalid-remove-btn,
  .invalid-show-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   Combobox Styles
   ============================================================ */
.combobox-container {
  position: relative;
}

.combobox-toggle {
  transition: transform 0.2s ease, color 0.15s ease;
}

.combobox-toggle.is-open {
  transform: translateY(-50%) rotate(180deg);
}

.combobox-dropdown {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

.combobox-dropdown::-webkit-scrollbar {
  width: 6px;
}

.combobox-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.combobox-dropdown::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 3px;
}

.dark .combobox-dropdown::-webkit-scrollbar-thumb {
  background: #4b5563;
}

.combobox-item {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #4b5563;
  transition: background-color 0.15s ease, color 0.15s ease;
  border: none;
  background: none;
  cursor: pointer;
}

.dark .combobox-item {
  color: #d1d5db;
}

.combobox-item:hover,
.combobox-item.is-selected {
  background-color: #f3f4f6;
  color: #4f46e5;
  outline: none;
}

.dark .combobox-item:hover,
.dark .combobox-item.is-selected {
  background-color: #374151;
  color: #818cf8;
}

.combobox-empty {
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: #9ca3af;
  font-style: italic;
  text-align: center;
}

