/* ================= Design tokens ================= */
:root {
    /* Brand */
    --brand: #059669;
    --brand-hover: #047857;
    --brand-soft: #ecfdf5;
    --brand-border: #a7f3d0;

    /* Neutrals (slate) */
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    /* Feedback */
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-soft: #fef2f2;
    --danger-border: #fecaca;

    /* Type scale */
    --text-xs: 0.8125rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: 1.75rem;

    /* Spacing (4/8px grid) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-8: 3rem;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.16);
}

/* ================= Base ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.5px;
}

h2 {
    font-size: var(--text-xl);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

h2 i {
    color: var(--brand);
}

h3 {
    font-size: var(--text-lg);
    font-weight: 600;
}

.subtitle {
    color: var(--text-secondary);
    font-size: var(--text-lg);
}

.hidden {
    display: none !important;
}

/* ================= App header ================= */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.app-header-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: var(--space-3) var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.logo i {
    color: var(--brand);
    width: 28px;
    height: 28px;
}

.wordmark {
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* ================= Page layout ================= */
.page {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 var(--space-4) var(--space-8);
}

.hero {
    text-align: center;
    padding: var(--space-8) 0 var(--space-6);
    animation: fadeInDown 0.5s ease-out;
}

.hero h1 {
    margin-bottom: var(--space-2);
}

.hero .subtitle {
    margin-bottom: var(--space-6);
}

.hero .search-container {
    max-width: 620px;
    margin: 0 auto;
}

/* ================= Cards ================= */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

/* ================= Search (Airbnb-style pill) ================= */
.search-container {
    display: flex;
    align-items: center;
    position: relative;
    gap: var(--space-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-5);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-container:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12), var(--shadow-md);
}

.search-container input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-base);
    color: var(--text-primary);
}

.search-container input:focus {
    outline: none;
}

#searchBtn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#searchBtn:hover {
    background: var(--brand-hover);
}

.dropdown-results {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    max-height: 320px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    text-align: left;
}

.dropdown-item {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--bg);
}

.dropdown-item-all {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
}

.dropdown-item-all:hover {
    background: var(--brand-soft);
    filter: brightness(0.97);
}

.dropdown-status {
    justify-content: center;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    cursor: default;
}

.dropdown-status i {
    width: 16px;
    height: 16px;
}

.dropdown-thumb {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.dropdown-thumb-placeholder {
    background: var(--brand-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    position: relative;
    overflow: hidden;
}

.dropdown-thumb-placeholder i,
.dropdown-thumb-placeholder svg {
    width: 20px;
    height: 20px;
}

.dropdown-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dropdown-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.rating {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.rating-count {
    color: var(--text-muted);
}

/* ================= Site picker ================= */
.site-picker-controls {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.site-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.site-picker-btn:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.site-picker-btn i {
    width: 16px;
    height: 16px;
}

.site-picker-summary {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--brand);
}

.site-picker-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    margin-bottom: var(--space-2);
}

.site-picker-header {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-3);
    border-bottom: 1px solid var(--border);
}

.site-picker-header input {
    flex: 1;
}

.site-picker-error {
    color: var(--danger);
}

.site-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: var(--space-3);
    padding: var(--space-3);
    max-height: 380px;
    overflow-y: auto;
}

.site-picker-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    padding: var(--space-4);
}

/* ===== Attribute filter bar (site picker + campground results) ===== */
.filter-bar {
    padding: var(--space-3);
    border-bottom: 1px solid var(--border);
}

.filter-chip-row,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.filter-chip:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.filter-chip.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}

.filter-chip-count {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.filter-chip.active .filter-chip-count {
    color: rgba(255, 255, 255, 0.85);
}

.filter-chip-more {
    border-style: dashed;
}

.filter-more-panel {
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
}

.filter-group {
    display: grid;
    gap: var(--space-2);
    justify-items: start;
}

.filter-group-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.filter-group-hint {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-top: calc(-1 * var(--space-1));
}

.filter-num-wrap {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

input[type="number"].filter-num {
    width: 90px;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    text-align: center;
}

.filter-unit {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.filter-bar-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.filter-count {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.filter-bar-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.filter-link-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    color: var(--brand);
    cursor: pointer;
}

.filter-link-btn:hover {
    text-decoration: underline;
}

.filter-notice {
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.watch-filter-count {
    margin-left: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.watch-refresh-filter {
    margin-left: var(--space-2);
}

/* ===== Trip filters: one set for campgrounds and sites alike ===== */
.trip-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.trip-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.trip-filters-btn:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.trip-filters-btn i {
    width: 16px;
    height: 16px;
}

.trip-filters-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 var(--space-1);
    background: var(--brand);
    color: #fff;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.trip-chip-x {
    font-size: var(--text-base);
    line-height: 1;
    opacity: 0.8;
}

.trip-filter-panel {
    display: grid;
    gap: var(--space-5);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.filter-section {
    display: grid;
    gap: var(--space-3);
}

.filter-section-title {
    font-size: var(--text-base);
    font-weight: 600;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border);
}

/* One collapsible section per campground when several are selected at once */
.site-facility-list {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-3);
    max-height: 460px;
    overflow-y: auto;
}

.site-facility {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.site-facility-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-3);
    background: var(--bg);
    border: none;
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.site-facility-header:hover {
    background: var(--brand-soft);
}

.site-facility-header i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.site-facility-header .group-chevron.open {
    transform: rotate(180deg);
}

.site-facility-name {
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-facility-meta {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.site-facility-failed {
    cursor: default;
    color: var(--text-secondary);
}

.site-facility-failed:hover {
    background: var(--bg);
}

/* Nested grids scroll with the section list, not on their own */
.site-facility .site-cards-grid {
    max-height: none;
    overflow: visible;
}

/* Ruled out by the filters: visible, explained, and not clickable */
.location-card-out {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.8);
}

.location-card-out:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
    transform: none;
}

/* Full-width loop group headers inside the site card grid */
.site-loop-header {
    grid-column: 1 / -1;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    padding: var(--space-2) 0 0;
    border-bottom: 1px solid var(--border);
}

.site-loop-header:first-child {
    padding-top: 0;
}

.site-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.site-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
}

.site-card.selected {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.site-card-media {
    position: relative;
    height: 80px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 60%, #6ee7b7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    flex-shrink: 0;
}

.site-card-media > i:not(.site-card-check),
.site-card-media > svg:not(.site-card-check) {
    width: 28px;
    height: 28px;
    opacity: 0.6;
}

.site-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.site-card-check {
    position: absolute;
    top: var(--space-1);
    right: var(--space-1);
    width: 20px;
    height: 20px;
    padding: 2px;
    border-radius: var(--radius-full);
    background: var(--brand);
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s;
}

.site-card.selected .site-card-check {
    opacity: 1;
}

.site-card-body {
    padding: var(--space-2) var(--space-3) var(--space-3);
}

.site-card-name {
    font-weight: 600;
    font-size: var(--text-sm);
}

.site-card-meta {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-card-type {
    text-transform: capitalize;
}

.site-card-details {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

.site-card-details span {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.site-card-details i {
    width: 12px;
    height: 12px;
}

/* ================= Site hover/tap popover ================= */
.site-popover {
    position: fixed;
    /* Above account dropdown (1000) and search dropdowns (200), below
       modal (2000) and toast (3000) */
    z-index: 1500;
    width: 260px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.site-popover.visible {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.site-popover-img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: var(--brand-soft);
}

.site-popover-body {
    padding: var(--space-3);
}

.site-popover-name {
    font-weight: 600;
    font-size: var(--text-sm);
}

.site-popover-meta {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* ================= Location search ================= */
.search-mode-toggle {
    max-width: 340px;
    margin: 0 auto var(--space-4);
}

#locationSearchPanel .search-container {
    max-width: 620px;
    margin: 0 auto;
}

#useMyLocationBtn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#useMyLocationBtn:hover {
    background: var(--brand-hover);
}

#useMyLocationBtn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.radius-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.radius-chip-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.radius-chip {
    padding: var(--space-2) var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.radius-chip:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.radius-chip.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}

input[type="number"].radius-chip-custom {
    width: 96px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    text-align: center;
}

.location-dates-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4);
    max-width: 480px;
    margin: var(--space-4) auto 0;
    text-align: left;
}

.location-dates-row .input-group {
    margin-bottom: 0;
}

.location-dates-mode {
    max-width: 300px;
    margin: var(--space-4) auto 0;
}

#locationPatternRow {
    grid-template-columns: 1fr 1fr;
}

.bookable-when {
    color: var(--brand-hover);
    font-weight: 600;
}

.location-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-5);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: left;
}

.sort-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
}

.sort-select-wrap select {
    width: auto;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-sm);
}

.location-select-all-row {
    margin-top: var(--space-4);
}

.location-select-all-row .btn-primary {
    width: auto;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.location-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-4);
    text-align: left;
}

.location-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.location-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
}

.location-card.selected {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.location-card-media {
    position: relative;
    height: 120px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 60%, #6ee7b7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    flex-shrink: 0;
}

.location-card-media > i,
.location-card-media > svg {
    width: 32px;
    height: 32px;
    opacity: 0.6;
}

.location-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.location-card-select {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    z-index: 2;
    display: flex;
    padding: var(--space-1);
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius-sm);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.location-card-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--brand);
}

.location-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3);
}

.location-card-name {
    font-weight: 600;
    font-size: var(--text-sm);
}

.location-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.location-card-distance {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-weight: 600;
    color: var(--brand);
}

.location-card-distance i {
    width: 12px;
    height: 12px;
}

.location-card-avail {
    margin-top: auto;
}

.check-avail-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.check-avail-btn:hover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.check-avail-btn i {
    width: 14px;
    height: 14px;
}

.avail-error-btn {
    border-color: var(--danger-border);
    color: var(--danger);
}

.avail-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.avail-badge i {
    width: 14px;
    height: 14px;
}

.avail-loading {
    color: var(--text-secondary);
    background: var(--bg);
}

.avail-open {
    color: var(--brand);
    background: var(--brand-soft);
    border: 1px solid var(--brand-border);
}

.avail-none {
    color: var(--danger);
    background: var(--danger-soft);
    border: 1px solid var(--danger-border);
}

/* Collapsed "no availability — watch instead" results */
.location-unavailable-section {
    margin-top: var(--space-5);
    text-align: left;
}

.location-unavailable-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.location-unavailable-toggle:hover {
    border-color: var(--brand);
    color: var(--text-primary);
}

.location-unavailable-toggle .unavail-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.15s;
}

.location-unavailable-toggle.open .unavail-chevron {
    transform: rotate(180deg);
}

.location-unavailable-section .location-card {
    opacity: 0.8;
}

/* ================= Bookable-now panel (watch form) ================= */
.bookable-section {
    margin-bottom: var(--space-4);
}

.bookable-panel {
    margin-top: var(--space-3);
    background: var(--brand-soft);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
}

.bookable-heading {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--brand);
    margin-bottom: var(--space-2);
}

.bookable-heading i {
    width: 16px;
    height: 16px;
}

.bookable-block {
    padding: var(--space-2) 0;
    border-top: 1px solid var(--brand-border);
}

.bookable-block:first-of-type {
    border-top: none;
    padding-top: 0;
}

.bookable-block-dates {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: 500;
}

.bookable-block-dates i {
    width: 14px;
    height: 14px;
    color: var(--brand);
}

.bookable-sites {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
    margin-top: var(--space-1);
}

.bookable-site-link {
    padding: 2px 10px;
    background: var(--surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.bookable-site-link:hover {
    background: var(--brand);
    color: #fff;
}

.bookable-more {
    font-size: var(--text-xs);
}

.bookable-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.bookable-status i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.bookable-error {
    color: var(--danger);
}

/* ================= Inputs ================= */
input[type="text"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-base);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.input-group {
    margin-bottom: var(--space-4);
}

.input-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.help-text {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

/* Flexible-window vs exact-dates segmented switch */
.mode-toggle {
    display: flex;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 4px;
    margin-bottom: var(--space-2);
}

.mode-btn {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.mode-btn.active {
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.mode-help {
    margin-bottom: var(--space-4);
}

.stay-hint {
    font-size: var(--text-xs);
    color: var(--brand-hover);
    background: var(--brand-soft);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-4);
}

.stay-hint:empty {
    display: none;
}

.stay-hint.invalid {
    color: var(--danger);
    background: var(--danger-soft);
}

.code-input {
    text-align: center;
    letter-spacing: 6px;
    font-size: var(--text-xl);
    font-weight: 600;
}

/* ================= Buttons ================= */
.btn-primary {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--brand);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: 'Outfit', sans-serif;
}

.btn-primary:hover {
    background: var(--brand-hover);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

form .btn-primary {
    margin-top: var(--space-2);
}

.btn-danger {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    transition: background 0.2s;
}

.btn-danger:hover:not(:disabled) {
    background: var(--danger-hover);
}

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

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
}

.icon-btn:hover {
    color: var(--danger);
}

/* ================= Links ================= */
.form-links {
    text-align: center;
    margin-top: var(--space-4);
}

.form-links + .form-links {
    margin-top: var(--space-2);
}

.form-links-split {
    display: flex;
    justify-content: space-between;
}

.link-accent {
    color: var(--brand);
    text-decoration: none;
    font-weight: 500;
}

.link-accent:hover {
    text-decoration: underline;
}

.link-muted {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
}

.link-muted:hover {
    text-decoration: underline;
}

/* ================= Selected campground / watch form card ================= */
.form-card {
    max-width: 620px;
    margin: 0 auto var(--space-6);
    animation: fadeInUp 0.3s ease;
}

.selected-campground {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--brand-soft);
    border: 1px solid var(--brand-border);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
}

.camp-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.camp-name {
    font-weight: 600;
}

.badge {
    background: var(--text-primary);
    color: white;
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    flex-shrink: 0;
}

/* Booking-site tag: subtler than the state badge, informational only */
.badge-provider {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
    font-weight: 500;
}

/* ================= Watches ================= */
.watches-section {
    margin-top: var(--space-6);
}

.watches-section h2 {
    margin-bottom: var(--space-5);
}

.watches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-5);
}

.watch-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: fadeInUp 0.4s ease backwards;
    box-shadow: var(--shadow-sm);
}

.watch-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.watch-card-media {
    height: 140px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 60%, #6ee7b7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
}

.watch-card-media i {
    width: 40px;
    height: 40px;
    opacity: 0.6;
}

.watch-card-media {
    position: relative;
}

.watch-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watch-card-body {
    padding: var(--space-4) var(--space-5) var(--space-5);
}

.watch-card h3 {
    margin-bottom: var(--space-2);
    font-size: var(--text-lg);
    padding-right: var(--space-6);
}

.watch-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin-top: var(--space-1);
}

.watch-meta i {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.watch-meta.accent {
    color: var(--brand);
    font-weight: 500;
}

/* ================= Watch groups & lifecycle ================= */
.watch-group + .watch-group {
    margin-top: var(--space-6);
}

.watch-group-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    margin-bottom: var(--space-4);
    padding: var(--space-2) 0;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
}

.watch-group-header i {
    width: 17px;
    height: 17px;
    color: var(--text-secondary);
}

.group-chevron {
    transition: transform 0.2s;
    transform: rotate(-90deg);
}

.group-chevron.open {
    transform: rotate(0deg);
}

.group-count {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 1px var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.watch-subline {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: calc(-1 * var(--space-1));
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
    padding: 2px var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.status-pill i {
    width: 12px;
    height: 12px;
}

.status-pill.status-active {
    background: var(--brand-soft);
    border: 1px solid var(--brand-border);
    color: var(--brand);
}

.status-pill.status-paused {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
}

.status-pill.status-expired {
    background: var(--bg);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
}

/* Expired and paused watches are inert — muted so a live watch always reads
   as the brighter card, while the star and actions stay fully usable. */
.watch-card.status-expired .watch-card-media,
.watch-card.status-paused .watch-card-media {
    filter: grayscale(0.85);
}

.watch-card.status-expired .watch-card-body > *:not(.watch-actions):not(.status-pill),
.watch-card.status-paused .watch-card-body > *:not(.watch-actions):not(.status-pill) {
    opacity: 0.65;
}

.watch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.watch-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.15s, border-color 0.15s;
}

.watch-action:hover {
    background: var(--brand-soft);
    border-color: var(--brand-border);
    color: var(--brand);
}

.watch-action i {
    width: 14px;
    height: 14px;
}

.reschedule-btn {
    background: var(--brand-soft);
    border-color: var(--brand-border);
    color: var(--brand);
}

.star-btn {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    display: flex;
    padding: var(--space-2);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
    transition: color 0.15s, transform 0.15s;
}

.star-btn:hover {
    transform: scale(1.1);
}

.star-btn i {
    width: 16px;
    height: 16px;
}

.star-btn.on {
    color: #f59e0b;
}

.star-btn.on i {
    fill: currentColor;
}

/* Edit/copy context banner above the watch form */
.form-mode-banner {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--brand-soft);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--brand);
}

.form-mode-banner i {
    width: 16px;
    height: 16px;
    vertical-align: -3px;
}

.form-mode-cancel {
    margin-left: auto;
    padding: var(--space-1) var(--space-3);
    background: var(--surface);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-primary);
}

.form-mode-cancel:hover {
    background: var(--bg);
}

.site-restore-hint {
    color: var(--brand);
}

/* ================= Availability calendar ================= */
.avail-toggle {
    margin-top: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    width: 100%;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.15s;
}

.avail-toggle:hover {
    background: var(--brand-soft);
}

.avail-toggle i {
    width: 16px;
    height: 16px;
    color: var(--brand);
}

.avail-chevron {
    margin-left: auto;
    transition: transform 0.2s;
}

.avail-toggle.open .avail-chevron {
    transform: rotate(180deg);
}

.watch-availability {
    margin-top: var(--space-3);
    border-top: 1px solid var(--border);
    padding-top: var(--space-3);
}

.cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2);
}

.cal-title {
    font-weight: 600;
    font-size: var(--text-sm);
}

.cal-header .icon-btn:hover {
    color: var(--brand);
}

.cal-header .icon-btn:disabled {
    opacity: 0.3;
    cursor: default;
    color: var(--text-secondary);
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-dow {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding-bottom: 2px;
}

.cal-day {
    aspect-ratio: 1;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    background: var(--bg);
}

.cal-num {
    font-weight: 500;
}

.cal-count {
    font-size: 0.6rem;
    line-height: 1;
}

.cal-out {
    color: var(--text-muted);
    opacity: 0.45;
}

.cal-none {
    background: var(--bg);
    color: var(--text-muted);
}

.cal-some {
    background: #fef3c7;
    color: #92400e;
}

.cal-good {
    background: var(--brand-soft);
    color: var(--brand-hover);
}

.cal-matched {
    box-shadow: inset 0 0 0 2px var(--brand);
    font-weight: 600;
}

.cal-loading,
.cal-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-5);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.cal-error {
    color: var(--danger);
}

.cal-retry {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.cal-matches {
    margin-top: var(--space-3);
    font-size: var(--text-xs);
}

.cal-matches h4 {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xs);
    color: var(--brand-hover);
    margin-bottom: var(--space-1);
}

.cal-matches h4 i {
    width: 14px;
    height: 14px;
}

.cal-matches ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cal-no-matches {
    margin-top: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-3);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.cal-legend .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: -1px;
}

.dot-good {
    background: var(--brand-soft);
    border: 1px solid var(--brand-border);
}

.dot-some {
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

.dot-none {
    background: var(--bg);
    border: 1px solid var(--border);
}

.dot-matched {
    border: 2px solid var(--brand);
}

.delete-btn {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: rgba(255, 255, 255, 0.9);
    color: var(--danger);
    border: none;
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.delete-btn:hover {
    background: var(--danger);
    color: white;
}

/* ================= States ================= */
.loading-state {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-6);
    color: var(--text-secondary);
}

.spin {
    animation: spin 1s linear infinite;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-8);
    color: var(--text-secondary);
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-strong);
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-4);
    opacity: 0.4;
}

.error {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-6);
    color: var(--danger);
    background: var(--danger-soft);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--danger-border);
}

/* ================= Toast ================= */
.toast {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    background: var(--text-primary);
    color: white;
    border-left: 4px solid var(--brand);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    animation: slideInRight 0.3s ease forwards;
}

.toast i {
    color: var(--brand-border);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.error i {
    color: #fca5a5;
}

/* ================= Modals ================= */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    width: 100%;
    margin: var(--space-4);
    box-shadow: var(--shadow-lg);
    animation: fadeInDown 0.3s ease forwards;
}

.modal-sm {
    max-width: 400px;
}

.modal-md {
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-icon-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.modal-icon-header i {
    width: 48px;
    height: 48px;
    color: var(--brand);
    margin-bottom: var(--space-2);
}

.modal-icon-header .subtitle {
    font-size: var(--text-base);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-5);
}

.modal-header h2 {
    margin: 0;
}

/* ================= Account menu ================= */
.account-menu {
    position: relative;
}

.avatar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--brand);
    color: white;
    border: none;
    font-size: var(--text-base);
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.avatar-btn:hover {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.account-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + var(--space-2));
    min-width: 230px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    z-index: 1000;
    animation: fadeInDown 0.15s ease forwards;
}

.account-dropdown-email {
    padding: var(--space-2) var(--space-3);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-1);
    word-break: break-all;
}

.account-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.account-dropdown-item:hover {
    background: var(--bg);
}

.account-dropdown-item i {
    width: 16px;
    height: 16px;
}

/* ================= Settings modal sections ================= */
.settings-section {
    margin-bottom: var(--space-6);
}

.settings-section h3 {
    margin-bottom: var(--space-3);
}

.billing-banner {
    background: var(--brand-soft);
    border: 1px solid var(--brand-border);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    margin: var(--space-5) 0;
    font-size: var(--text-sm);
}

.billing-banner p {
    margin-bottom: var(--space-3);
    font-weight: 500;
}

.billing-banner-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.pending-email-banner {
    background: var(--brand-soft);
    border: 1px solid var(--brand-border);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
    font-size: var(--text-sm);
}

.pending-email-banner p {
    margin-bottom: var(--space-2);
}

.confirm-email-row {
    display: flex;
    gap: var(--space-2);
}

.confirm-email-row input {
    flex: 1;
}

.confirm-email-row .btn-primary {
    width: auto;
    margin: 0;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    margin-top: var(--space-2);
    color: var(--brand);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

.phone-verified-badge {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--brand);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-2);
}

.phone-verified-badge i {
    width: 15px;
    height: 15px;
}

.sms-toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

.sms-toggle-label i {
    width: 15px;
    height: 15px;
}

.sms-toggle-label:has(input:disabled) {
    color: var(--text-muted);
    cursor: not-allowed;
}

.sms-toggle {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    cursor: pointer;
    text-decoration: underline;
}

.sms-toggle.on {
    color: var(--brand);
    font-weight: 500;
}

.sms-toggle-static {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.coming-soon-badge {
    display: inline-block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1px 8px;
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    vertical-align: middle;
}

.danger-zone {
    background: var(--danger-soft);
    border: 1px solid var(--danger-border);
    border-left: 4px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
}

.danger-zone h3 {
    margin-bottom: var(--space-2);
}

/* ================= Animations ================= */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

@keyframes slideInRight {
    from { transform: translateX(110%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(110%); opacity: 0; }
}

/* ================= Onboarding tour ================= */
/* Sits above modals (2000) but below toasts (3000), so a toast fired mid-tour
   still reads. The blocker swallows background clicks; on anchored steps the
   spotlight paints the scrim itself via an oversized box-shadow, leaving its
   own box as the lit cut-out. */
.tour-blocker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2500;
}

/* Steps with no anchor have no cut-out, so the blocker carries the dim */
.tour-blocker-dim {
    background: rgba(15, 23, 42, 0.55);
}

.tour-spotlight {
    position: fixed;
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55), 0 0 0 3px var(--brand);
    pointer-events: none;
    transition: left 0.2s ease, top 0.2s ease, width 0.2s ease, height 0.2s ease;
    z-index: 2501;
}

.tour-card {
    position: fixed;
    width: min(360px, calc(100vw - 32px));
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-5);
    animation: fadeInDown 0.2s ease forwards;
    z-index: 2502;
}

/* The welcome and sign-off cards, which point at nothing */
.tour-card-centered {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: none;
}

.tour-card-title {
    font-size: var(--text-lg);
    margin: 0 0 var(--space-2);
}

.tour-card-body {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.tour-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.tour-card-footer .btn-link {
    margin-top: 0;
    color: var(--text-secondary);
}

.tour-card-nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.tour-card-step {
    font-size: var(--text-xs);
    color: var(--text-muted);
    white-space: nowrap;
}

.tour-back-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
}

.tour-next-btn {
    width: auto;
    padding: var(--space-2) var(--space-5);
    font-size: var(--text-sm);
}

/* ================= Responsive ================= */
@media (max-width: 900px) {
    .watches-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 0 var(--space-3) var(--space-6);
    }

    .hero {
        padding: var(--space-6) 0 var(--space-5);
    }

    .hero h1 {
        font-size: var(--text-xl);
    }

    .hero .subtitle {
        font-size: var(--text-base);
    }

    .card {
        padding: var(--space-5);
    }

    .modal-content {
        padding: var(--space-5);
        margin: var(--space-2);
    }

    .watches-grid {
        grid-template-columns: 1fr;
    }

    /* Once the count and buttons wrap, spreading them reads as misalignment */
    .filter-bar-footer {
        justify-content: flex-start;
    }

    .toast {
        left: var(--space-4);
        right: var(--space-4);
        bottom: var(--space-4);
    }

    /* Too little room to float the card beside an anchor — pin it to the
       bottom and let the spotlight do the pointing. !important beats the
       inline left/top the positioner writes. */
    .tour-card:not(.tour-card-centered) {
        left: var(--space-3) !important;
        right: var(--space-3);
        top: auto !important;
        bottom: var(--space-3);
        width: auto;
    }
}
