/* ============================================
   SEARCH PAGE — Scandinavian Minimalist
   Relies on universal-scandi.css :root tokens.
   Frosted glass cards, clean shadows, no neon/glow.
   ============================================ */

.container {
  display: flex;
  padding: 20px 0 20px 20px; /* Remove right padding */
  gap: 20px;
  width: 96%; /* Fixed width instead of max-width */
  max-width: 96%; /* Keep max-width for safety */
  margin-left: 2%;
  align-items: flex-start; /* Ensure top alignment */
  box-sizing: border-box;
  padding-top: 90px; /* Match padding-top */
  overflow-x: hidden; /* Prevent horizontal overflow at container level */
}

/* Left column: wraps input-container + search-history-container */
.left-column {
  flex: 0 0 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: calc(100vh - 110px); /* Match right-column height */
}

.input-container {
  padding: 15px 30px 30px 30px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-lg, 12px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto; /* Make scrollable */
  overflow-x: hidden; /* Hide horizontal overflow */
}

/* Container header with title and buttons */
.container-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--page-border);
}

.container-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-text);
  flex: 1;
}

/* Header generate button - smaller version for header */
.container-header .generate-search-button {
  width: auto;
  padding: 6px 12px;
  margin: 0;
  font-size: 12px;
  flex-shrink: 0;
}

/* Collapse toggle button */
.collapse-toggle-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  background: var(--tertiary-bg);
  color: var(--secondary-text);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.collapse-toggle-btn:hover {
  border-color: var(--highlight-color);
  color: var(--primary-text);
  background: rgba(209, 77, 106, 0.06);
  box-shadow: var(--shadow-sm);
}


/* Horizontal collapse for input container */
.input-container {
  transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.left-column.collapsed {
  flex: 0 0 50px !important;
}

.input-container.collapsed {
  width: 50px !important;
  min-width: 50px !important;
  flex: 0 0 50px !important;
  padding: 15px 10px !important;
  overflow: hidden;
}

.input-container.collapsed .collapsible-content {
  display: none;
}

.input-container.collapsed .container-header {
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-bottom: none;
  padding-bottom: 0;
}

.input-container.collapsed .container-title {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 14px;
  white-space: nowrap;
}

.input-container.collapsed .generate-search-button {
  display: none;
}
.right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: calc(100vh - 110px); /* Viewport-based: fills below header, adapts to screen size */
  max-width: calc(100% - 400px); /* Prevent expanding beyond available space */
  overflow: hidden; /* Prevent overflow from affecting container */
  margin-bottom: 2.5%; /* Reduced margin to footer by 50% */
}
.input-container::-webkit-scrollbar {
  width: 6px;
  height: 6px; /* Height for horizontal scrollbar */
}
.input-container::-webkit-scrollbar-thumb {
  background-color: #D1D5DB;
  border-radius: 4px;
}
.input-container::-webkit-scrollbar-track {
  background: var(--primary-bg);
}

.results-container {
  flex: 1;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(243, 244, 246, 0.7) 50%, rgba(237, 233, 241, 0.55) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-lg, 12px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  padding: 15px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Hide overflow from the container itself */
  width: 100%; /* Take available width of parent */
  max-width: 100%; /* Strictly prevent expanding beyond parent */
  box-sizing: border-box; /* Ensure padding is included in width calculation */
}

/* Search Progress Overlay */
.search-progress-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 251, 252, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: var(--radius-lg, 12px);
}

.search-progress-card {
  background: var(--secondary-bg);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-lg, 12px);
  padding: 40px 50px;
  text-align: center;
  min-width: 360px;
  max-width: 450px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.search-progress-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0deg 340deg, rgba(209, 77, 106, 0.08) 340deg 360deg);
  animation: rotate-glow 3s linear infinite;
  pointer-events: none;
}

@keyframes rotate-glow {
  100% { transform: rotate(360deg); }
}

.progress-spinner {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}

.progress-spinner svg {
  width: 100%;
  height: 100%;
  animation: spinner-rotate 2s linear infinite;
}

.progress-spinner circle {
  stroke: var(--highlight-color);
  stroke-linecap: round;
  stroke-dasharray: 125;
  stroke-dashoffset: 100;
  animation: spinner-dash 1.5s ease-in-out infinite;
}

@keyframes spinner-rotate {
  100% { transform: rotate(360deg); }
}

@keyframes spinner-dash {
  0% { stroke-dashoffset: 100; }
  50% { stroke-dashoffset: 25; }
  100% { stroke-dashoffset: 100; }
}

.progress-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-text);
  margin: 0 0 24px 0;
  position: relative;
  z-index: 1;
}

.progress-bar-container {
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.progress-bar-track {
  width: 100%;
  height: 12px;
  background: var(--tertiary-bg);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #D14D6A 0%, var(--highlight-color) 50%, #E8889A 100%);
  background-size: 200% 100%;
  border-radius: 6px;
  transition: width 0.3s ease;
  position: relative;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
  border-radius: 6px 6px 0 0;
}

.progress-percentage {
  font-size: 2rem;
  font-weight: 700;
  color: var(--highlight-color);
  -webkit-text-fill-color: var(--highlight-color);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  margin-top: 12px;
}

.progress-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.progress-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.progress-stat .stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-text);
}

.progress-stat .stat-label {
  font-size: 0.7rem;
  color: var(--muted-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.progress-stat-divider {
  width: 1px;
  height: 24px;
  background: var(--page-border);
}

.progress-current-city {
  font-size: 0.9rem;
  color: var(--secondary-text);
  margin: 0;
  padding: 10px 16px;
  background: var(--tertiary-bg);
  border-radius: var(--radius-sm, 6px);
  position: relative;
  z-index: 1;
}

/* Create a scrollable wrapper for the table */
.table-wrapper {
  overflow-y: auto; /* Enable vertical scrolling */
  overflow-x: auto; /* Enable horizontal scrolling for table content only */
  flex: 1; /* Fill remaining space in results-container */
  min-height: 0; /* Allow flex shrinking below content height */
  width: 100%;
  /* Apply the same scrollbar styling as the city container */
  padding: 0 5px; /* Add even padding on both sides for scrollbar symmetry */
  box-sizing: border-box;
  border-radius: var(--radius-sm, 6px); /* Updated radius */
}

/* Apply scrollbar styling to the table wrapper (same as city container) */
.table-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 12px; /* Height for horizontal scrollbar */
}

.table-wrapper::-webkit-scrollbar-thumb {
  background-color: #D1D5DB;
  border-radius: 4px;
  border: 2px solid var(--primary-bg);
}

.table-wrapper::-webkit-scrollbar-track {
  background: var(--primary-bg);
  border-radius: 4px; /* Match border-radius for consistent appearance */
  margin: 0 15px; /* Add margin to both sides of scrollbar track */
}

/* Horizontal form layout for country and city */
.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.form-group .dropdown-container {
  flex: 1;
  min-width: 0;
}
.form-group input,
.form-group .dropdown-search {
  flex: 1;
  width: 100%;
  height: 36px;
  box-sizing: border-box;
}
.form-group label {
    width: 80px;
    margin-bottom: 0;
    margin-right: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-group select,
.form-group input {
    flex: 1;
    margin-bottom: 0;
    padding: 10px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--page-border);
    color: var(--primary-text);
    border-radius: var(--radius-sm, 6px);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

/* Non-horizontal form elements */
.input-container label:not(.form-group label):not(.subdivision-item):not(.depth-option):not(.city-exclusion-toggle):not(.city-exclusion-days-label):not(.resume-exclude-label) {
    display: block;
    margin-bottom: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.input-container input:not(.form-group input):not(.subdivision-item input):not(.depth-option input):not(.city-exclusion-container input):not(.resume-exclude-label input):not(.resume-exclude-days-input),
.input-container select:not(.form-group select) {
    width: 100%;
    margin-bottom: 20px;
    padding: 10px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--page-border);
    color: var(--primary-text);
    border-radius: var(--radius-sm, 6px);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.input-container input:focus,
.input-container select:focus {
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 3px rgba(209, 77, 106, 0.08);
    outline: none;
}

/* Global placeholder styling */
.input-container input::placeholder {
    color: var(--muted-text);
    opacity: 0.7;
}

.generate-search-button {
    width: 40%;
    padding: 11px 16px;
    background: linear-gradient(135deg, #D14D6A 0%, #1F2937 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.78rem;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 10px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.generate-search-button:hover {
    background: linear-gradient(135deg, #B8455E 0%, #111827 100%);
    box-shadow: var(--shadow-lg);
    animation: ctaBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes ctaBounce {
    0%   { transform: translateY(0); }
    40%  { transform: translateY(-5px); }
    60%  { transform: translateY(-2px); }
    100% { transform: translateY(-3px); }
}

.generate-search-button.pressed {
    background: linear-gradient(135deg, #9E3A50 0%, #0F1520 100%);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
    transform: scale(0.96);
    animation: none;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}

.generate-search-button.pressed::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    animation: pressedShimmer 1.5s ease-in-out infinite;
}

@keyframes pressedShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Token estimate display */
.token-estimate-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--page-border);
    border-radius: var(--radius-md, 8px);
    padding: 12px 15px;
    margin: 15px 0;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.token-estimate-label {
    color: var(--muted-text);
    font-size: 0.7rem;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.token-estimate-value {
    color: var(--highlight-color);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

/* Population Filter */
.population-filter {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--page-border);
    border-radius: var(--radius-md, 8px);
    padding: 12px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
}

.population-filter .filter-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.population-filter .filter-row-stacked {
    display: flex;
    align-items: center;
    gap: 10px;
}

.population-filter .filter-inputs-stacked {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.population-filter input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    border: 1px solid var(--page-border);
    border-radius: var(--radius-sm, 6px);
    font-size: 13px;
    box-sizing: border-box;
    box-shadow: var(--shadow-sm);
}

.population-filter input[type="text"]::placeholder {
    color: var(--muted-text);
    opacity: 0.7;
}

.population-filter input[type="text"]:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 3px rgba(209, 77, 106, 0.08);
}

.population-filter .filter-apply-btn {
    padding: 12px 16px;
    background: var(--tertiary-bg);
    color: var(--secondary-text);
    border: 1px solid var(--page-border);
    border-radius: var(--radius-sm, 6px);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    align-self: center;
    height: fit-content;
    font-weight: 500;
}

.population-filter .filter-apply-btn:hover {
    background: #E5E7EB;
    border-color: #D1D5DB;
    color: var(--primary-text);
}

/* Pagination Sequencer - Population-based page selection */
.search-depth-toggle {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--page-border);
    border-radius: var(--radius-sm, 6px);
    padding: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: opacity 0.25s ease;
}

/* Locked state when smart strategy is active */
.search-depth-toggle.strategy-locked .depth-options {
    filter: blur(1.5px);
    opacity: 0.45;
    pointer-events: none;
    user-select: none;
}

.search-depth-toggle.strategy-locked .sequencer-title {
    opacity: 0.5;
}

.strategy-locked-hint {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--secondary-bg);
    border: 1px solid var(--page-border);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--secondary-text);
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    z-index: 5;
    pointer-events: none;
}

.search-depth-toggle.strategy-locked .strategy-locked-hint {
    display: block;
}

.search-depth-toggle.strategy-locked:hover .strategy-locked-hint {
    color: var(--primary-text);
}

.sequencer-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.depth-options {
    display: flex;
    gap: 8px;
}

.depth-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 8px;
    border: 1px solid var(--page-border);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    transition: all 0.15s ease;
    background: var(--secondary-bg);
    text-align: center;
}

.depth-option:hover {
    border-color: rgba(209, 77, 106, 0.4);
    background: rgba(209, 77, 106, 0.04);
}

.depth-option.selected {
    border-color: var(--highlight-color);
    background: rgba(209, 77, 106, 0.06);
    box-shadow: 0 0 0 1px rgba(209, 77, 106, 0.15);
}

.depth-option input[type="radio"] {
    display: none;
}

.depth-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-text);
    margin-bottom: 2px;
}

.depth-desc {
    font-size: 10px;
    color: var(--secondary-text);
    line-height: 1.3;
}

/* Pages-per-area dropdown (below Standard option) */
.pages-select {
    width: 100%;
    margin-top: 10px;
    padding: 6px 12px;
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    border: 1px solid var(--page-border);
    border-radius: var(--radius-sm, 6px);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234B5563' d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.pages-select:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 3px rgba(209, 77, 106, 0.08);
}

/* Token balance display */
.token-balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--page-border);
}

.token-balance-label {
    color: var(--muted-text);
    font-size: 0.7rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.token-balance-value {
    color: var(--highlight-color);
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.token-balance-value #tokenBalance {
    color: var(--primary-text);
    font-weight: 700;
}

/* Checkbox styling — clean custom checkboxes */
.input-container .plain-checkboxes {
    padding: 0;
    margin: 0 0 20px 0;
    width: 100%;
  }

  .input-container .checkbox-row {
    text-align: left;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    width: 100%;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
  }

  .input-container .checkbox-row:hover {
    background-color: rgba(209, 77, 106, 0.04);
  }

  .input-container .checkbox-row input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-right: 10px;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    display: inline-block !important;
    max-width: 18px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    position: relative;
    top: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--page-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
  }

  .input-container .checkbox-row input[type="checkbox"]:hover {
    border-color: var(--highlight-color);
    background: rgba(209, 77, 106, 0.04);
  }

  .input-container .checkbox-row input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #D14D6A 0%, #1F2937 100%);
    border-color: var(--highlight-color);
    box-shadow: var(--shadow-sm);
  }

  .input-container .checkbox-row input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
  }

  .input-container .checkbox-row input[type="checkbox"]:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(209, 77, 106, 0.08) !important;
    border-color: var(--highlight-color);
    width: 18px !important;
    height: 18px !important;
  }

  .input-container .checkbox-row label {
    font-size: 0.8rem;
    color: var(--secondary-text);
    display: inline-block;
    margin-bottom: 0 !important;
    font-weight: 500;
    line-height: 18px;
    cursor: pointer;
    transition: color 0.15s ease;
  }

  .input-container .checkbox-row:hover label {
    color: var(--primary-text);
  }

.results-stats {
    margin-top: 25px;
    font-weight: 300;
    color: var(--primary-text);
    margin-bottom: 10px;
}

.results-stats p {
    margin: 0 0 4px 0;
}

.results-stats span {
    color: var(--highlight-color);
    font-weight: 700;
}

/* Button-style checkbox for hide duplicates */
.duplicate-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 8px;
}

.duplicate-toggle-btn input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
    background: var(--secondary-bg);
    border: 1px solid var(--page-border);
    border-radius: 4px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.duplicate-toggle-btn input[type="checkbox"]:hover {
    border-color: var(--highlight-color);
    background: rgba(209, 77, 106, 0.04);
}

.duplicate-toggle-btn input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #D14D6A 0%, #1F2937 100%);
    border-color: var(--highlight-color);
    box-shadow: var(--shadow-sm);
}

.duplicate-toggle-btn input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.duplicate-toggle-btn .toggle-btn-text {
    color: var(--secondary-text);
    font-size: 13px;
    font-weight: 500;
    user-select: none;
}

.duplicate-toggle-btn:has(input:checked) .toggle-btn-text {
    color: var(--highlight-color);
}

.tooltip-container {
    position: relative;
    display: inline-block;
    color: var(--muted-text);
    cursor: help;
    font-size: 12px;
    margin-left: 4px;
}

.tooltip-text {
    visibility: hidden;
    width: 180px;
    background-color: var(--secondary-bg);
    color: var(--primary-text);
    text-align: center;
    border-radius: var(--radius-sm, 6px);
    padding: 8px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -90px;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid var(--page-border);
    font-size: 11px;
    font-weight: normal;
    box-shadow: var(--shadow-lg);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--page-border) transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Simplified city tags with reduced spacing */
.city-container-title {
    margin-top: 10px;
    margin-bottom: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
/* Form group container z-index */
.form-group {
    position: relative;
    z-index: 10;
}
/* When a dropdown is open, lift that form-group above siblings so the
   dropdown list is not obscured by form groups rendered later in the DOM */
.form-group:has(.dropdown-list.show) {
    z-index: 1000;
}

select,
.form-group select,
.filter-container select,
select[multiple] option {
  padding: 8px 12px;
  position: relative;
  background-color: var(--secondary-bg);
  color: var(--primary-text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
}

/* Lower z-index for elements that should appear behind the dropdown */
#selectedCitiesContainer {
    position: relative;
    z-index: 5;
}

#selectedCitiesContainer {
    border: 1px solid var(--page-border);
    border-radius: var(--radius-sm, 6px);
    padding: 4px 8px;
    padding-top: 24px; /* Space for clear button */
    min-height: 60px;
    max-height: 250px;
    height: auto;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    font-size: small;
    line-height: 1.2;
    position: relative; /* For absolute positioning of clear button */
    box-shadow: var(--shadow-sm);
}

/* In-container clear button - positioned at top right */
.cities-clear-button {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--tertiary-bg);
    color: var(--primary-text);
    border: 1px solid var(--page-border);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    z-index: 10;
    width: auto;
    max-width: fit-content;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.cities-clear-button:hover {
    background: #E5E7EB;
    border-color: #D1D5DB;
    color: var(--primary-text);
    box-shadow: var(--shadow-md);
}

.clear-results-button {
    background: var(--tertiary-bg);
    color: var(--secondary-text);
    border: 1px solid var(--page-border);
    padding: 8px 16px;
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.clear-results-button:hover {
    border-color: rgba(220, 38, 38, 0.35);
    color: #DC2626;
    background: rgba(220, 38, 38, 0.06);
    box-shadow: var(--shadow-md);
}

/* No extra margin needed - container has padding-top for clear button */
#selectedCitiesContainer .city-tag:first-child {
    margin-top: 0;
}

.city-tag {
    display: block;
    padding: 0;
    margin-bottom: 1px;
    cursor: pointer;
    width: fit-content;
    color: var(--primary-text);
    transition: var(--transition);
}

.city-tag:hover {
    color: var(--highlight-color);
}

/* Subdivision card styles */
.city-subdivision-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--page-border);
    border-radius: 6px;
    margin-bottom: 4px;
    overflow: hidden;
}

.subdivision-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    cursor: pointer;
    user-select: none;
}

.subdivision-header:hover {
    background: rgba(209, 77, 106, 0.04);
}

.subdivision-toggle {
    font-size: 10px;
    color: var(--muted-text);
    width: 12px;
    text-align: center;
    flex-shrink: 0;
}

.subdivision-city-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-text);
    flex: 1;
}

.subdivision-remove {
    font-size: 14px;
    color: var(--muted-text);
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}

.subdivision-remove:hover {
    color: #DC2626;
}

.subdivision-list {
    padding: 2px 6px 4px 20px;
    max-height: 200px;
    overflow-y: auto;
    transition: max-height 0.2s ease;
}

.subdivision-list.collapsed {
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

.subdivision-group-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
    margin-bottom: 2px;
    padding-bottom: 1px;
    border-bottom: 1px solid var(--page-border);
}

.subdivision-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 1px 0;
    cursor: pointer;
    font-size: 11px;
    color: var(--primary-text);
}

.subdivision-item input[type="checkbox"] {
    width: 12px;
    height: 12px;
    accent-color: #D14D6A;
    cursor: pointer;
    flex-shrink: 0;
}

.subdivision-item span {
    line-height: 1.3;
}

.subdivision-item:hover {
    color: var(--highlight-color);
}

/* Styling for selected options in city dropdown */
/* cityDropdown is a div, not a select — no legacy select rules needed */
}

.column-visibility-container {
    border: 1px solid var(--page-border);
    border-radius: var(--radius-sm, 6px);
    padding: 4px 8px;
    height: 600px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    font-size: small;
    line-height: 1.2;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.column-visibility-container::-webkit-scrollbar,
#selectedCitiesContainer::-webkit-scrollbar {
    width: 6px;
    height: 6px; /* Height for horizontal scrollbar */
}

.column-visibility-container::-webkit-scrollbar-thumb,
#selectedCitiesContainer::-webkit-scrollbar-thumb {
    background-color: #D1D5DB;
    border-radius: 4px;
}

.column-visibility-container::-webkit-scrollbar-track,
#selectedCitiesContainer::-webkit-scrollbar-track {
    background: var(--primary-bg);
}
.column-visibility-item {
  padding: 6px;
  cursor: pointer;
  border-radius: var(--radius-sm, 6px);
  text-align: center;
  font-size: small;
  font-weight: 500;
  color: var(--primary-text);
  background-color: var(--tertiary-bg);
  opacity: 1; /* Default full opacity for visible columns */
  transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.column-visibility-item:hover {
  background-color: var(--surface-hover);
  color: var(--primary-text);
  opacity: 1; /* Always full opacity on hover */
}

.column-visibility-item.inactive-column {
  color: var(--secondary-text);
  opacity: 0.45;
}
.column-visibility-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    display: block;
}
.column-checkbox-item {
    display: flex;
    align-items: left;
    margin-bottom: 4px;
}
.column-checkbox-item input {
    margin-right: 6px;
    flex: 0 0 auto;
}
.column-checkbox-item label {
    margin-bottom: 0;
    font-size: small;
}
/* Column visibility toggle styles */
.column-checkbox-item.column-active label {
  opacity: 1;
  font-weight: 500;
  color: var(--primary-text);
}

.column-checkbox-item.column-inactive label {
  opacity: 0.5;
  font-weight: normal;
  color: var(--muted-text);
}

#clearCitiesButton {
    background: var(--tertiary-bg);
    color: var(--secondary-text);
    border: 1px solid var(--page-border);
    border-radius: var(--radius-sm, 6px);
    padding: 6px 10px; /* Slightly smaller padding */
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 15px; /* Changed from 20px to 15px */
    margin-top: 0; /* Explicitly set to 0 to override inline style */
    font-size: small; /* Smaller font size */
    font-weight: 500;
}

#clearCitiesButton:hover {
    border-color: rgba(209, 77, 106, 0.4);
    color: var(--primary-text);
    background: rgba(209, 77, 106, 0.04);
}

/* Table styles with single-line rows */
table {
  width: 100%; /* Set to 100% of container width */
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  contain: layout style paint;
  background: var(--secondary-bg);
}

th {
    position: sticky;
    top: 0;
    background-color: var(--tertiary-bg);
    color: var(--secondary-text);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 14px 12px;
    text-align: left;
    border-bottom: 2px solid var(--page-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
    z-index: 10;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

td {
  padding: 14px 12px;
  color: var(--secondary-text);
  border-bottom: 1px solid var(--page-border);
  white-space: nowrap; /* Prevent text wrapping */
  overflow: hidden; /* Hide overflow content */
  text-overflow: ellipsis; /* Add ellipsis for overflow text */
  max-width: 200px; /* Maximum width for all cells */
  box-sizing: border-box; /* Include padding in width calculation */
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

/* Skip rendering off-screen rows — only visible rows reflow on column toggle */
tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: auto 42px;
}

/* Set specific widths for different column types */
th, td {
  min-width: 120px; /* Minimum width for all cells to ensure readability */
}

.company-name {
  width: 200px;
}

.website, .address {
  width: 180px;
}

.phone {
  width: 120px;
}

.type, .rating, .reviews, .open_state, .query, .country, .city, .type_id {
  width: 120px;
}

.place_id, .data_id, .data_cid, .provider_id, .source {
  width: 140px;
}

/* Enrichment columns */
.email {
  width: 180px;
}
.email_provider {
  width: 120px;
}
.facebook_url, .instagram_url, .linkedin_url, .twitter_url, .youtube_url, .tiktok_url {
  width: 160px;
}
.cms_platform {
  width: 100px;
}
.tech_stack {
  width: 140px;
}
.has_google_analytics, .has_facebook_pixel, .has_google_tag_manager, .has_google_remarketing, .has_ssl, .has_contact_form, .is_mobile_friendly, .has_schema_markup {
  width: 70px;
}
.page_load_ms {
  width: 80px;
}
.domain_age_years {
  width: 85px;
}
.enrichment_status {
  width: 90px;
}

/* Social icon links in enrichment columns */
.social-icon-link {
  font-weight: 700;
  font-size: 11px;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--tertiary-bg);
  transition: opacity 0.15s;
}
.social-icon-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}
.email-link {
  color: #2563EB;
  text-decoration: none;
  font-size: 12px;
}
.email-link:hover {
  text-decoration: underline;
}

tr:hover td {
    background-color: var(--tertiary-bg);
}

/* Add tooltip style so users can see full content on hover */
td:hover {
    position: relative;
}

td:hover::after {
  content: attr(title);
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 10;
  background-color: var(--secondary-bg);
  color: var(--primary-text);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  padding: 5px 8px;
  white-space: normal;
  width: auto;
  max-width: 300px;
  word-wrap: break-word;
  box-shadow: var(--shadow-lg);
}

.hidden-column {
  display: none !important;
}
/* Add transitions for smooth opacity changes */
th, td {
  transition: opacity 0.2s ease;
}

/* Column visibility states - match UI state to actual visibility */
th.visible-column,
td.visible-column {
  opacity: 1;
}

th.hidden-column,
td.hidden-column {
  display: none !important;
}

.hidden {
    display: none;
}

/* Sort indicators for table headers */
th.sort-asc::after {
    content: ' ▲';
    font-size: 12px;
    color: var(--highlight-color);
}

th.sort-desc::after {
    content: ' ▼';
    font-size: 12px;
    color: var(--highlight-color);
}

th[data-column]:hover {
    background-color: var(--surface-hover);
}

.custom-searchable-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    z-index: 100;
    font-size: 14px;
    display: flex;
    align-items: center;
  }

  .custom-searchable-dropdown label {
    width: 80px;
    margin-bottom: 0;
    margin-right: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .custom-searchable-dropdown input {
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 8px 10px;
    box-sizing: border-box;
    background-color: var(--secondary-bg);
    border: 1px solid var(--page-border);
    color: var(--primary-text);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    flex: 1;
    height: 36px;
  }
  .form-group .dropdown-search {
    height: 36px;
    box-sizing: border-box;
    font-size: 14px;
    width: 100%;
  }
  .dropdown-list {
    position: absolute;
    width: max-content;
    min-width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--secondary-bg);
    border: 1px solid var(--page-border);
    border-radius: 0 0 var(--radius-sm, 6px) var(--radius-sm, 6px);
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-lg);
    margin-top: -1px; /* Remove gap between input and dropdown */
  }

  .dropdown-list .dropdown-item {
    padding: 8px 10px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1; /* Slightly increased for better readability */
    white-space: nowrap;
    color: var(--primary-text);
    transition: color 0.2s ease, background-color 0.2s ease;
    display: block;
  }
  .dropdown-list .dropdown-item.dropdown-item-selected {
    color: var(--primary-text) !important;
    opacity: 1 !important;
  }
  .dropdown-list .dropdown-item:hover {
    background-color: var(--tertiary-bg);
    color: var(--primary-text) !important;
  }
  .dropdown-list.show {
    display: block !important;
    z-index: 99999 !important;
    max-height: 300px !important;
    min-height: 50px !important;
    overflow-y: auto !important;
    pointer-events: auto !important;
    position: fixed !important;
    width: max-content !important;
    min-width: 200px !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: var(--secondary-bg) !important;
    border: 1px solid var(--page-border) !important;
    box-shadow: var(--shadow-lg) !important;
  }

  /* Special styling for country dropdown to ensure it closes */
#countryDropdown.dropdown-list {
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
#countryDropdown.dropdown-list:not(.show) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
  /* City dropdown — fixed to escape overflow:hidden parents */
    #cityDropdown.dropdown-list.show,
    #cityDropdown.show {
      position: fixed !important;
      height: auto !important;
      max-height: 300px !important;
      min-height: 30px !important;
      width: max-content !important;
      min-width: 200px !important;
      overflow-x: hidden !important;
      overflow-y: auto !important;
      scrollbar-width: auto !important;
      z-index: 999999 !important;
    }

    /* State dropdown — fixed to escape overflow:hidden parents */
    #stateDropdown.dropdown-list.show {
      position: fixed !important;
      width: max-content !important;
      min-width: 200px !important;
      overflow-x: hidden !important;
      overflow-y: auto !important;
      z-index: 999998 !important;
    }

/* City dropdown items should show full text */
#cityDropdown .dropdown-item {
  white-space: nowrap !important;
  overflow: visible !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 100% !important;
}


  .dropdown-item.default-option {
    color: var(--muted-text);
    font-style: italic;
  }

  .dropdown-item.default-option:hover {
    background-color: var(--tertiary-bg);
    color: var(--primary-text);
    font-style: italic;
  }
/* Style for dropdown items to handle multi-select better */
.dropdown-item.dropdown-item-selected {
  color: var(--primary-text) !important;
  background-color: rgba(45, 168, 122, 0.08) !important; /* Light green tinted background for selected items */
  position: relative;
  padding-left: 28px !important;
}

/* Checkmark indicator for selected items */
.dropdown-item.dropdown-item-selected::before {
  content: '\2713'; /* Unicode checkmark */
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green-accent);
  font-weight: bold;
  font-size: 14px;
}

/* Add specific styling for the city dropdown selected item */
#cityDropdown .dropdown-item.dropdown-item-selected,
#countryDropdown .dropdown-item.dropdown-item-selected,
.dropdown-list .dropdown-item.dropdown-item-selected {
  background-color: rgba(45, 168, 122, 0.08) !important; /* Light green highlight for selected */
  color: var(--primary-text) !important;
  padding-left: 28px !important;
}

/* Hover state for selected items */
.dropdown-item.dropdown-item-selected:hover,
#cityDropdown .dropdown-item.dropdown-item-selected:hover,
#countryDropdown .dropdown-item.dropdown-item-selected:hover,
.dropdown-list .dropdown-item.dropdown-item-selected:hover {
  background-color: rgba(45, 168, 122, 0.14) !important;
}

/* Also ensure the hover color is consistently applied for non-selected items */
#cityDropdown .dropdown-item:hover,
#countryDropdown .dropdown-item:hover,
.dropdown-list .dropdown-item:hover {
  background-color: var(--tertiary-bg) !important;
  color: var(--primary-text) !important;
}

#cityDropdown .dropdown-item {
  position: relative;
  padding-left: 10px; /* Standard padding, not extra space */
}

  input.dropdown-search.default-selected {
    color: var(--muted-text);
    font-style: italic;
  }

  .custom-dropdown {
    position: relative;
    width: 100%;
    flex: 1;
  }
/* Dropdowns use position:fixed — no z-index on parents (avoids stacking context traps) */
.form-group.custom-dropdown:has(#countrySearch),
.form-group.custom-dropdown:has(#citySearch),
#stateDropdownContainer {
    position: relative;
}
/* Ensure State dropdown input matches Country/City width */
#stateDropdownContainer .dropdown-container {
    flex: 1;
    width: 100%;
}
#stateDropdownContainer .dropdown-search {
    width: 100%;
    flex: 1;
}
#stateDropdownContainer .dropdown-list.show {
    z-index: 99998;
    max-height: 300px !important;
    min-height: 200px !important;
    overflow-y: auto !important;
}
/* Dropdown list styling */
.form-group .dropdown-list.show {
    max-height: 300px !important;
    min-height: 200px !important;
    overflow-y: auto !important;
  }

.dropdown-container {
    position: relative !important;
  }
  .dropdown-container .dropdown-list {
    width: 100%;
    /* position/top/left set by JS via positionFixedDropdown() when .show is added */
  }

  .dropdown-search {
    width: 100%;
    padding: 8px 10px;
    background-color: var(--secondary-bg);
    border: 1px solid var(--page-border);
    color: var(--primary-text);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    height: 36px;
    font-size: 13px;
    box-shadow: var(--shadow-sm);
  }

  .dropdown-search::placeholder {
    color: var(--muted-text);
    opacity: 0.7;
  }

  .form-group .dropdown-container {
    flex: 1;
    width: 100%;
  }

/* Fix for dropdown item highlight to extend to scrollbar */
.dropdown-list .dropdown-item {
  margin: 0 !important;
  width: calc(100% - 15px) !important;
}
.dropdown-list .dropdown-item:hover,
.dropdown-list .dropdown-item.dropdown-item-selected {
  width: calc(100% - 15px) !important;
  margin: 0 !important;
}
/* Make sure dropdown list allocates proper space for scrollbar */
#cityDropdown.dropdown-list.show {
  padding-right: 0 !important;
  box-sizing: border-box !important;
}
/* Remove horizontal scrollbar from country dropdown */
#countryDropdown.dropdown-list.show {
  overflow-x: hidden !important;
}

/* Ensure column-visibility-items respond to column visibility state changes */
.column-visibility-container .column-visibility-item {
  position: relative;
}

/* Active columns: green checkmark */
.column-visibility-container .column-visibility-item:after {
  content: "";
  margin-left: 4px;
}

.column-visibility-container .column-visibility-item:not(.inactive-column):after {
  content: " \2713";
  color: var(--green-accent);
  font-weight: 700;
  font-size: 11px;
}

/* Website links: inherit text color, underline only on hover */
.website-link {
  color: inherit;
  text-decoration: none;
}
.website-link:hover {
  text-decoration: underline;
}

/* Reset hover colors */
.column-visibility-item:hover {
  background-color: var(--surface-hover) !important;
  color: var(--primary-text) !important;
  opacity: 1; /* Always full opacity on hover */
}

#countryDropdown.dropdown-list .dropdown-item {
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1200px) {
    .container {
      flex-direction: column;
    }

    /* Force container to not expand due to table width */
    html, body {
      overflow-x: hidden;
      max-width: 100%;
    }

    .left-column {
      flex: none;
      width: auto;
      height: auto;
    }

    .input-container {
      flex: none;
      width: auto;
      margin-right: 0.5%;
      margin-bottom: 0;
      height: 450px; /* Fixed height for responsive view */
    }

    .search-history-container {
      margin-right: 0.5%;
      margin-bottom: 30px;
    }

    .right-column {
      height: auto;
      margin-bottom: 30px; /* Match database.css */
    }

    .results-container {
      margin-top: 0;
      margin-bottom: 0;
    }
  }

  @media (max-width: 768px) {
    body {
      padding-top: 56px;
    }

    .input-container {
      height: auto;
      min-height: 0;
      padding: 16px;
    }

    .input-container h2 {
      font-size: 1.2rem;
    }

    .results-container {
      min-height: 300px;
    }

    .right-column {
      height: auto;
    }

    .table-wrapper {
      max-height: 60vh;
    }

    .input-container label {
      font-size: 0.85rem;
    }

    .input-container input,
    .input-container select {
      font-size: 0.9rem;
    }

    .token-estimate {
      font-size: 0.8rem;
    }
  }

  @media (max-width: 480px) {
    .input-container {
      padding: 12px;
    }

    .modal-content {
      width: 95%;
      margin: 20% auto;
    }
  }

/* Token Warning Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--secondary-bg);
  border: 1px solid var(--page-border);
  margin: 10% auto;
  padding: 0;
  border-radius: var(--radius-lg, 12px);
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-xl);
  animation: slideDown 0.3s ease;
}

.modal-header {
  padding: 20px 25px;
  background: var(--tertiary-bg);
  color: var(--primary-text);
  border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
  border-bottom: 1px solid var(--page-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--primary-text);
}

.modal-close {
  font-size: 32px;
  font-weight: bold;
  color: var(--muted-text);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover {
  transform: scale(1.2);
  color: var(--primary-text);
}

.modal-body {
  padding: 25px;
  color: var(--secondary-text);
  line-height: 1.6;
}

.modal-body p {
  margin-bottom: 15px;
  font-size: 16px;
  color: var(--secondary-text);
}

.token-info {
  background: var(--tertiary-bg);
  padding: 15px;
  border-radius: var(--radius-sm, 6px);
  margin: 15px 0;
  border-left: 4px solid var(--highlight-color);
}

.token-shortage {
  font-size: 18px;
  font-weight: 600;
  color: var(--highlight-color);
}

.token-shortage p {
  margin: 0;
}

.token-suggestion {
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 10px;
}

.token-options {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.token-options li {
  padding: 8px 0 8px 25px;
  position: relative;
  color: var(--secondary-text);
}

.token-options li:before {
  content: "\2192";
  position: absolute;
  left: 0;
  color: var(--highlight-color);
  font-weight: bold;
}

.modal-footer {
  padding: 20px 25px;
  background: var(--tertiary-bg);
  border-radius: 0 0 var(--radius-lg, 12px) var(--radius-lg, 12px);
  border-top: 1px solid var(--page-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm, 6px);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, #D14D6A 0%, #1F2937 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #B8455E 0%, #111827 100%);
  box-shadow: var(--shadow-lg);
  animation: ctaBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--page-border);
  color: var(--secondary-text);
}

.btn-secondary:hover {
  border-color: var(--secondary-text);
  color: var(--primary-text);
  background: var(--tertiary-bg);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   PURCHASE TOKENS LINK STYLES
   ========================================== */

.purchase-tokens-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  margin: 10px 0;
  border-radius: var(--radius-sm, 6px);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.purchase-tokens-link.subtle {
  background: transparent;
  border: 1px dashed var(--page-border);
  color: var(--secondary-text);
}

.purchase-tokens-link.subtle:hover {
  border-color: var(--highlight-color);
  color: var(--highlight-color);
  background: rgba(209, 77, 106, 0.04);
}

.purchase-tokens-link.urgent {
  background: rgba(209, 77, 106, 0.06);
  border: 1px solid rgba(209, 77, 106, 0.2);
  color: var(--highlight-color);
  animation: urgentPulse 2s ease-in-out infinite;
}

.purchase-tokens-link.urgent:hover {
  background: rgba(209, 77, 106, 0.1);
  transform: scale(1.02);
}

.purchase-tokens-link .link-icon {
  font-size: 16px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: currentColor;
  color: var(--secondary-bg);
}

.purchase-tokens-link.subtle .link-icon {
  background: var(--secondary-text);
}

.purchase-tokens-link.urgent .link-icon {
  background: var(--highlight-color);
  animation: iconGlow 1.5s ease-in-out infinite;
}

@keyframes urgentPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(209, 77, 106, 0.15);
  }
  50% {
    box-shadow: 0 0 12px 3px rgba(209, 77, 106, 0.08);
  }
}

@keyframes iconGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(209, 77, 106, 0.2);
  }
  50% {
    box-shadow: 0 0 8px 2px rgba(209, 77, 106, 0.12);
  }
}

/* ==========================================
   INSUFFICIENT TOKENS MODAL STYLES
   ========================================== */

.insufficient-tokens-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.insufficient-tokens-modal.hidden {
  display: none;
}

.insufficient-tokens-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}

.insufficient-tokens-content {
  position: relative;
  background: var(--secondary-bg);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-lg, 12px);
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.insufficient-tokens-content .modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  color: var(--highlight-color);
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.insufficient-tokens-content h3 {
  margin: 0 0 16px;
  font-size: 1.5rem;
  color: var(--primary-text);
}

.insufficient-tokens-content p {
  margin: 0 0 24px;
  color: var(--secondary-text);
  line-height: 1.6;
}

.insufficient-tokens-content strong {
  color: var(--highlight-color);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insufficient-tokens-content .modal-btn {
  padding: 14px 24px;
  border-radius: var(--radius-sm, 6px);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  font-family: 'Inter', sans-serif;
}

.insufficient-tokens-content .modal-btn-primary {
  background: linear-gradient(135deg, #D14D6A 0%, #1F2937 100%);
  color: white;
  border: none;
  box-shadow: var(--shadow-md);
}

.insufficient-tokens-content .modal-btn-primary:hover {
  background: linear-gradient(135deg, #B8455E 0%, #111827 100%);
  box-shadow: var(--shadow-lg);
  animation: ctaBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.insufficient-tokens-content .modal-btn-secondary {
  background: transparent;
  color: var(--secondary-text);
  border: 1px solid var(--page-border);
}

.insufficient-tokens-content .modal-btn-secondary:hover {
  border-color: var(--secondary-text);
  color: var(--primary-text);
  background: var(--tertiary-bg);
}

/* -- Search Results Pagination -- */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--secondary-bg);
  border-top: 1px solid var(--page-border);
  border-radius: 0 0 8px 8px;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--page-border);
  border-radius: 6px;
  background: transparent;
  color: var(--secondary-text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(209, 77, 106, 0.06);
  color: var(--highlight-color);
  border-color: var(--highlight-color);
}

.pagination-btn.active {
  background: var(--highlight-color);
  color: #fff;
  border-color: var(--highlight-color);
  font-weight: 600;
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-ellipsis {
  color: var(--secondary-text);
  padding: 0 4px;
  user-select: none;
}

.pagination-info {
  color: var(--secondary-text);
  font-size: 0.8rem;
  margin-left: 12px;
  white-space: nowrap;
}

.progress-cancel-btn {
  margin-top: 20px;
  background: transparent;
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: rgba(220, 38, 38, 0.6);
  border-radius: 8px;
  padding: 8px 22px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}
.progress-cancel-btn:hover {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.35);
  color: #DC2626;
}
.progress-cancel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Minimize button inside progress card */
.progress-minimize-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 1px solid var(--page-border);
  background: var(--tertiary-bg);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.2s;
  color: var(--secondary-text);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
}
.progress-minimize-btn:hover {
  background: var(--page-border);
  color: var(--primary-text);
}

/* Minimized search pills — stacked at bottom-right */
.search-minimized-pills {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.search-minimized-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--secondary-bg);
  border: 1px solid var(--page-border);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: var(--shadow-lg);
  min-width: 260px;
  max-width: 360px;
  cursor: default;
  animation: pillSlideIn 0.3s ease-out;
}

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

.pill-spinner {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.pill-spinner svg {
  width: 100%;
  height: 100%;
  animation: spinner-rotate 2s linear infinite;
}
.pill-spinner circle {
  stroke: var(--highlight-color);
  stroke-linecap: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 60;
  animation: spinner-dash 1.5s ease-in-out infinite;
  fill: none;
}

.pill-info {
  flex: 1;
  min-width: 0;
}
.pill-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pill-progress {
  font-size: 0.65rem;
  color: var(--muted-text);
  margin-top: 2px;
}
.pill-bar {
  width: 100%;
  height: 3px;
  background: var(--tertiary-bg);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}
.pill-bar-fill {
  height: 100%;
  background: var(--highlight-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.pill-cancel {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--muted-text);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s;
  padding: 0;
}
.pill-cancel:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #DC2626;
}

/* Completed pill */
.search-minimized-pill.completed {
  border-color: rgba(34, 197, 94, 0.3);
  cursor: pointer;
}
.search-minimized-pill.completed .pill-spinner svg {
  animation: none;
}
.search-minimized-pill.completed .pill-spinner circle {
  stroke: #22C55E;
  stroke-dasharray: 125;
  stroke-dashoffset: 0;
  animation: none;
}
.search-minimized-pill.completed .pill-bar-fill {
  background: #22C55E;
}
.search-minimized-pill.completed:hover {
  box-shadow: var(--shadow-lg), 0 0 0 2px rgba(34, 197, 94, 0.2);
}

/* Token Budget Modal */
.budget-modal-title {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-text);
}
.budget-balance-info {
  font-size: 0.8rem;
  color: var(--secondary-text);
  margin: 0 0 16px;
}
.budget-balance-info strong {
  color: var(--primary-text);
}
.budget-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.budget-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.82rem;
  color: var(--primary-text);
}
.budget-option:hover {
  border-color: var(--highlight-color);
}
.budget-option.selected {
  border-color: var(--highlight-color);
  background: rgba(209, 77, 106, 0.04);
}
.budget-option input[type="radio"] {
  accent-color: var(--highlight-color);
  margin: 0;
}
.budget-custom-input {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 0 14px;
}
.budget-custom-input input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  color: var(--primary-text);
  background: rgba(255, 255, 255, 0.7);
  transition: border-color 0.2s;
}
.budget-custom-input input:focus {
  outline: none;
  border-color: var(--highlight-color);
  box-shadow: 0 0 0 3px rgba(209, 77, 106, 0.1);
}
.budget-input-suffix {
  font-size: 0.78rem;
  color: var(--muted-text);
  white-space: nowrap;
}
.budget-city-remaining {
  font-size: 0.7rem;
  color: var(--secondary-text);
  opacity: 0.7;
}

/* Budget modal — city queue panel */
.budget-city-panel {
  margin-bottom: 16px;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}
.budget-city-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--page-border);
  background: rgba(255, 255, 255, 0.4);
}
.budget-city-count-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--primary-text);
}
.budget-city-count-input {
  width: 54px;
  padding: 4px 6px;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  color: var(--primary-text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--page-border);
  border-radius: 4px;
  text-align: center;
}
.budget-city-count-input:focus {
  outline: none;
  border-color: var(--highlight-color);
}
.budget-city-toolbar-btns {
  display: flex;
  gap: 4px;
}
.budget-city-queue {
  max-height: 240px;
  overflow-y: auto;
  padding: 4px 6px 6px;
}
.budget-city-queue-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 4px;
  font-size: 0.76rem;
  color: var(--primary-text);
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.12s;
}
.budget-city-queue-item:hover {
  background: rgba(209, 77, 106, 0.06);
}
.budget-city-queue-item input[type="checkbox"] {
  accent-color: var(--highlight-color);
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.budget-city-queue-order {
  font-size: 0.68rem;
  color: var(--secondary-text);
  min-width: 22px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ============================================
   SMART STRATEGY — Country-wide sweep UI
   ============================================ */

.strategy-section-title {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 12px;
  margin-bottom: 8px;
}

.strategy-dropdown-wrapper {
  margin-bottom: 8px;
}

.smart-strategy-select {
  width: 100%;
  padding: 8px 32px 8px 12px;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  color: var(--primary-text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.smart-strategy-select:hover {
  border-color: var(--highlight-color);
}
.smart-strategy-select:focus {
  outline: none;
  border-color: var(--highlight-color);
  box-shadow: 0 0 0 3px rgba(209, 77, 106, 0.1);
}

/* Resume bar */
.strategy-resume-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: rgba(209, 77, 106, 0.05);
  border: 1px solid rgba(209, 77, 106, 0.15);
  border-radius: var(--radius-sm, 6px);
}
.resume-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.resume-bar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.resume-bar-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resume-bar-progress {
  font-size: 0.72rem;
  color: var(--secondary-text);
}
.resume-bar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Resume bar — exclusion */
.resume-bar-exclusion {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(209, 77, 106, 0.1);
}
.resume-exclude-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 0;
}
.resume-exclude-label input[type="checkbox"] {
  accent-color: var(--highlight-color, #D14D6A);
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  box-shadow: none;
}
.resume-exclude-details {
  display: none;
  margin-top: 8px;
  padding-left: 22px;
}
.resume-exclude-days-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--secondary-text);
  margin-bottom: 8px;
}
.resume-exclude-days-input {
  width: 44px;
  padding: 4px 2px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--secondary-bg);
  color: var(--primary-text);
  font-size: 0.78rem;
  text-align: center;
  -moz-appearance: textfield;
}
.resume-exclude-days-input::-webkit-outer-spin-button,
.resume-exclude-days-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.resume-exclude-status {
  font-size: 0.78rem;
  color: var(--secondary-text);
  margin-bottom: 4px;
}
.resume-exclude-list {
  max-height: 220px;
  overflow-y: auto;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--secondary-text);
}

/* Collapsible city groups */
.resume-exclude-group {
  margin-bottom: 2px;
}
.resume-exclude-group-header {
  cursor: pointer;
  padding: 4px 0;
  font-weight: 600;
  color: var(--primary-text);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 2px;
  user-select: none;
}
.resume-exclude-group-header:hover {
  color: var(--highlight-color, #D14D6A);
}
.resume-exclude-chevron {
  display: inline-block;
  transition: transform 0.15s ease;
  font-size: 0.7rem;
  width: 12px;
  text-align: center;
  flex-shrink: 0;
}
.resume-exclude-group.open .resume-exclude-chevron {
  transform: rotate(90deg);
}
.resume-exclude-group-count {
  font-weight: 400;
  color: var(--secondary-text);
  font-size: 0.72rem;
  margin-left: 4px;
}
.resume-exclude-group-children {
  display: none;
  padding-left: 16px;
  padding-bottom: 4px;
}
.resume-exclude-group.open .resume-exclude-group-children {
  display: block;
}
.resume-exclude-borough {
  padding: 1px 0;
  font-size: 0.75rem;
}
.resume-exclude-searched {
  color: var(--accent-rose, #E63962);
}
.resume-exclude-remaining {
  color: var(--secondary-text);
  opacity: 0.6;
}
.resume-exclude-unknown {
  color: var(--secondary-text);
  opacity: 0.5;
  font-style: italic;
}
.resume-exclude-standalone {
  padding: 3px 0;
  font-size: 0.78rem;
  color: var(--primary-text);
}
.resume-exclude-standalone::before {
  content: "\2713 ";
  color: var(--accent-rose, #E63962);
}
.strategy-btn-resume {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #D14D6A 0%, #1F2937 100%);
  border: none;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s;
}
.strategy-btn-resume:hover {
  background: linear-gradient(135deg, #B8455E 0%, #111827 100%);
  box-shadow: var(--shadow-sm);
}
.strategy-btn-resume:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.strategy-btn-delete {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--secondary-text);
  background: transparent;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.strategy-btn-delete:hover {
  color: #DC2626;
  border-color: rgba(220, 38, 38, 0.3);
  background: rgba(220, 38, 38, 0.05);
}

/* Create Strategy Modal */
.strategy-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.strategy-modal.hidden {
  display: none;
}
.strategy-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}
.strategy-modal-content {
  position: relative;
  width: 460px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  padding: 28px 32px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08);
}
.strategy-modal-title {
  margin: 0 0 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-text);
}

.strategy-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.strategy-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.strategy-form-group > label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.strategy-form-group input[type="text"] {
  padding: 9px 12px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  color: var(--primary-text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  transition: border-color 0.2s;
}
.strategy-form-group input[type="text"]:focus {
  outline: none;
  border-color: var(--highlight-color);
  box-shadow: 0 0 0 3px rgba(209, 77, 106, 0.1);
}

/* Country grid */
.strategy-country-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
}
.strategy-country-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  font-size: 0.78rem;
  color: var(--primary-text);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}
.strategy-country-item:hover {
  background: rgba(209, 77, 106, 0.06);
}
.strategy-country-item input[type="checkbox"] {
  accent-color: var(--highlight-color);
  width: 14px;
  height: 14px;
}

/* City picker */
.strategy-city-picker {
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}
.strategy-city-picker-toolbar {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--page-border);
  background: rgba(255, 255, 255, 0.4);
}
.strategy-city-search {
  flex: 1;
  padding: 5px 8px;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  color: var(--primary-text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--page-border);
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}
.strategy-city-search:focus {
  border-color: var(--highlight-color);
}
.strategy-city-search::placeholder {
  color: var(--secondary-text);
  opacity: 0.6;
}
.strategy-city-toolbar-btn {
  padding: 4px 10px;
  font-size: 0.7rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--secondary-text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--page-border);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.strategy-city-toolbar-btn:hover {
  color: var(--highlight-color);
  border-color: var(--highlight-color);
  background: rgba(209, 77, 106, 0.06);
}
.strategy-city-list {
  max-height: 220px;
  overflow-y: auto;
  padding: 4px 8px 8px;
}
.strategy-city-group-header {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--secondary-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 4px 3px;
  margin-top: 2px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.strategy-city-group-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.12s;
}
.strategy-city-group-toggle:hover {
  background: rgba(209, 77, 106, 0.06);
}
.strategy-city-group-toggle input[type="checkbox"] {
  accent-color: var(--highlight-color);
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.strategy-city-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 4px;
  font-size: 0.76rem;
  color: var(--primary-text);
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.12s;
}
.strategy-city-item:hover {
  background: rgba(209, 77, 106, 0.06);
}
.strategy-city-item input[type="checkbox"] {
  accent-color: var(--highlight-color);
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.strategy-city-count-label {
  font-weight: 400;
  font-size: 0.68rem;
  color: var(--secondary-text);
}

/* Depth options */
.strategy-depth-options {
  display: flex;
  gap: 8px;
}
.strategy-depth-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: var(--primary-text);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s;
}
.strategy-depth-option.selected {
  border-color: var(--highlight-color);
  background: rgba(209, 77, 106, 0.06);
}
.strategy-depth-option input[type="radio"] {
  accent-color: var(--highlight-color);
}

.strategy-pages-select {
  width: 120px;
  margin-top: 6px;
  padding: 6px 28px 6px 10px;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  color: var(--primary-text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.strategy-total-cities {
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--secondary-text);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
}
.strategy-total-cities strong {
  color: var(--primary-text);
}

.strategy-token-estimate {
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--secondary-text);
  background: rgba(209, 77, 106, 0.04);
  border: 1px solid rgba(209, 77, 106, 0.12);
  border-radius: var(--radius-sm, 6px);
}
.strategy-token-estimate strong {
  color: var(--highlight-color);
  font-weight: 700;
}

/* Modal actions */
.strategy-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.strategy-btn-save {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #D14D6A 0%, #1F2937 100%);
  border: none;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s;
}
.strategy-btn-save:hover {
  background: linear-gradient(135deg, #B8455E 0%, #111827 100%);
  box-shadow: var(--shadow-sm);
}
.strategy-btn-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.strategy-btn-cancel {
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  color: var(--secondary-text);
  background: transparent;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s;
}
.strategy-btn-cancel:hover {
  border-color: var(--primary-text);
  color: var(--primary-text);
}

/* Strategy Dialog (alert/confirm replacement) */
.strategy-dialog-content {
  position: relative;
  width: 600px;
  max-width: 90vw;
  padding: 28px 32px 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08);
  text-align: center;
  animation: modalSlideIn 0.25s ease;
}
.strategy-dialog-content p {
  margin: 0 0 24px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--primary-text);
}
.strategy-dialog-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}
.strategy-dialog-actions button {
  padding: 9px 20px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.2s;
}
.strategy-dialog-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #D14D6A 0%, #1F2937 100%);
  border: none;
}
.strategy-dialog-btn-primary:hover {
  background: linear-gradient(135deg, #B8455E 0%, #111827 100%);
  box-shadow: var(--shadow-sm);
}
.strategy-dialog-btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #DC2626 0%, #7F1D1D 100%);
  border: none;
}
.strategy-dialog-btn-danger:hover {
  background: linear-gradient(135deg, #B91C1C 0%, #5C1616 100%);
  box-shadow: var(--shadow-sm);
}
.strategy-dialog-btn-secondary {
  color: var(--secondary-text);
  background: transparent;
  border: 1px solid var(--page-border);
}
.strategy-dialog-btn-secondary:hover {
  border-color: var(--primary-text);
  color: var(--primary-text);
}

/* Custom strategy list (replaces <select>) */
.strategy-list-container {
  position: relative;
  margin-bottom: 8px;
}
.strategy-list-trigger {
  width: 100%;
  padding: 8px 32px 8px 12px;
  font-size: 0.82rem;
  font-family: 'Inter', sans-serif;
  color: var(--secondary-text);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.strategy-list-trigger:hover {
  border-color: var(--highlight-color);
}
.strategy-list-trigger.active {
  color: var(--primary-text);
}
.strategy-list-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 240px;
  overflow-y: auto;
}
.strategy-list-dropdown.open {
  display: block;
}
.strategy-list-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--primary-text);
  cursor: pointer;
  transition: background 0.15s;
  gap: 6px;
}
.strategy-list-item:hover {
  background: rgba(209, 77, 106, 0.06);
}
.strategy-list-item.create-item {
  font-weight: 600;
  color: var(--highlight-color);
  border-bottom: 1px solid var(--page-border);
}
.strategy-list-item-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strategy-list-item-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.strategy-item-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--secondary-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
}
.strategy-item-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--page-border);
}
.strategy-item-btn.delete-btn:hover {
  color: #DC2626;
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.2);
}
.strategy-item-btn.edit-btn:hover {
  color: var(--highlight-color);
  background: rgba(209, 77, 106, 0.06);
  border-color: rgba(209, 77, 106, 0.2);
}

/* Edit Strategy Modal */
.strategy-edit-modal-content {
  position: relative;
  width: 380px;
  max-width: 90vw;
  padding: 28px 32px 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08);
  animation: modalSlideIn 0.25s ease;
}
.strategy-edit-modal-content h3 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-text);
}
.strategy-edit-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.strategy-edit-field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.strategy-edit-field input {
  padding: 9px 12px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  color: var(--primary-text);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  transition: border-color 0.2s;
}
.strategy-edit-field input:focus {
  outline: none;
  border-color: var(--highlight-color);
  box-shadow: 0 0 0 3px rgba(209, 77, 106, 0.1);
}

/* ============================================
   SEARCH HISTORY LOG
   ============================================ */

.search-history-container {
  flex: 0 0 auto;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-lg, 12px);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 1px 4px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.search-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
}

.search-history-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-text);
  cursor: pointer;
  margin: 0;
}

.search-history-chevron {
  font-size: 1.1rem;
  color: var(--secondary-text, #6B7280);
  transition: transform 0.2s ease;
  line-height: 1;
}

.search-history-chevron.open {
  transform: rotate(180deg);
}

.search-history-body {
  margin-top: 8px;
}

.search-history-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}

.search-history-days-label {
  font-size: 0.8rem;
  color: var(--secondary-text, #6B7280);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.search-history-days-input {
  width: 52px;
  padding: 3px 6px;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary-text);
  text-align: center;
}

.search-history-days-input:focus {
  outline: none;
  border-color: var(--highlight-color);
}

.search-history-refresh-btn {
  background: none;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  color: var(--secondary-text, #6B7280);
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 8px;
  transition: color 0.2s, border-color 0.2s;
}

.search-history-refresh-btn:hover {
  color: var(--primary-text);
  border-color: var(--primary-text);
}

.search-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.search-history-empty {
  font-size: 0.8rem;
  color: var(--secondary-text, #6B7280);
  text-align: center;
  padding: 16px 0;
}

/* Individual search history entry */
.search-history-entry {
  position: relative;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  background: rgba(255, 255, 255, 0.5);
  transition: border-color 0.2s;
}

.search-history-entry:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

.search-history-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  cursor: pointer;
  gap: 8px;
}

.search-history-entry-query {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--primary-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.search-history-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-history-entry-stat {
  font-size: 0.73rem;
  color: var(--secondary-text, #6B7280);
  white-space: nowrap;
}

.search-history-entry-chevron {
  font-size: 1rem;
  color: var(--secondary-text, #6B7280);
  transition: transform 0.2s ease;
  line-height: 1;
}

.search-history-entry-chevron.open {
  transform: rotate(180deg);
}

/* Expanded detail section — overlays content below */
.search-history-entry-detail {
  display: none;
  position: absolute;
  top: 100%;
  left: -1px;
  right: -1px;
  z-index: 20;
  border: 1px solid var(--page-border);
  border-top: 1px solid var(--page-border);
  border-radius: 0 0 var(--radius-sm, 6px) var(--radius-sm, 6px);
  padding: 8px 10px 10px;
  background: #f9fafb;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  max-height: 320px;
  overflow-y: auto;
}

.search-history-entry-detail.open {
  display: block;
}

.search-history-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 0.78rem;
}

.search-history-detail-city {
  color: var(--primary-text);
  font-weight: 400;
}

.search-history-detail-count {
  color: var(--secondary-text, #6B7280);
  font-size: 0.73rem;
}

.search-history-detail-date {
  color: var(--secondary-text, #6B7280);
  font-size: 0.7rem;
  margin-left: 8px;
}

.search-history-detail-loading {
  font-size: 0.78rem;
  color: var(--secondary-text, #6B7280);
  padding: 6px 0;
  text-align: center;
}

.search-history-entry-country {
  font-size: 0.73rem;
  color: var(--secondary-text, #6B7280);
  font-weight: 400;
  margin-left: 4px;
}

/* Use as search button in history detail */
.search-history-use-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: var(--highlight-color);
  background: none;
  border: 1px solid var(--highlight-color);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.search-history-use-btn:hover {
  background: var(--highlight-color);
  color: #fff;
}

/* ============================================
   CITY EXCLUSION TOGGLE
   ============================================ */

.city-exclusion-container {
  margin: 6px 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  background: rgba(248, 249, 250, 0.5);
}

.city-exclusion-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin: 0;
}

.city-exclusion-toggle input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  padding: 0;
  margin: 0;
  background: var(--secondary-bg);
  border: 1px solid var(--page-border);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.city-exclusion-toggle input[type="checkbox"]:hover {
  border-color: var(--highlight-color);
  background: rgba(209, 77, 106, 0.04);
}

.city-exclusion-toggle input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #D14D6A 0%, #1F2937 100%);
  border-color: var(--highlight-color);
  box-shadow: var(--shadow-sm);
}

.city-exclusion-toggle input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.city-exclusion-toggle input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(209, 77, 106, 0.08);
  border-color: var(--highlight-color);
}

.city-exclusion-label {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--primary-text);
  line-height: 1.3;
}

.city-exclusion-options {
  margin-top: 8px;
  padding-left: 26px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.city-exclusion-days-label {
  font-size: 0.78rem;
  color: var(--secondary-text, #6B7280);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  margin: 0;
}

.city-exclusion-days-input {
  width: 48px;
  padding: 3px 6px;
  font-size: 0.78rem;
  font-family: 'Inter', sans-serif;
  border: 1px solid var(--page-border);
  border-radius: var(--radius-sm, 6px);
  background: #fff;
  color: var(--primary-text);
  text-align: center;
}

.city-exclusion-days-input:focus {
  outline: none;
  border-color: var(--highlight-color);
  box-shadow: 0 0 0 2px rgba(209, 77, 106, 0.08);
}

.city-exclusion-status {
  font-size: 0.75rem;
  color: var(--secondary-text, #6B7280);
}

.city-exclusion-status .excluded-count {
  color: var(--highlight-color);
  font-weight: 500;
}
