/* ============================================================
   Threshold Ad Portal — Matching CMS design
   ============================================================ */

/* ----- Basier Circle font-face ----- */
@font-face { font-family: 'Basier Circle'; src: url('../fonts/basier-circle-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Basier Circle'; src: url('../fonts/basier-circle-regular-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Basier Circle'; src: url('../fonts/basier-circle-medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Basier Circle'; src: url('../fonts/basier-circle-semibold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Basier Circle'; src: url('../fonts/basier-circle-bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Basier Circle'; src: url('../fonts/basier-circle-bold-italic.woff2') format('woff2'); font-weight: 700; font-style: italic; font-display: swap; }

/* ----- CSS Variables (dark mode — default) ----- */
:root {
    --bg-body: rgb(12, 12, 14);
    --bg-header: hsla(0, 0%, 25%, 0.75);
    --bg-card: #333;
    --bg-card-hover: #3a3a3a;
    --bg-input: #444;
    --bg-footer: #1a1a1a;
    --border: #555;
    --border-focus: #0074ff;
    --fg: #d4d4d4;
    --fg-dim: #aaa;
    --fg-bright: #fff;
    --accent: #0074ff;
    --accent-hover: #63aaff;
    --accent-dim: rgba(0, 116, 255, 0.15);
    --green: #4caf50;
    --green-dim: rgba(76, 175, 80, 0.15);
    --red: #ef5350;
    --red-dim: rgba(239, 83, 80, 0.15);
    --yellow: #ffb74d;
    --yellow-dim: rgba(255, 183, 77, 0.15);
    --blue: #0074ff;
    --blue-dim: rgba(0, 116, 255, 0.15);
    --red-hover: #db1b3e;
    --radius: 10px;
    --shadow: 1px 1px 4px rgba(255, 255, 255, 0.08);
    --shadow-hover: 0 2px 10px rgba(0, 116, 255, 0.3);
    --max-width: 1140px;
    --header-height: 70px;
    --font-body: 'Basier Circle', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Basier Circle', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ----- Light mode overrides ----- */
body:not(.dark-mode) {
    --bg-body: #ffffff;
    --bg-header: hsla(0, 0%, 96%, 0.85);
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5f5;
    --bg-input: #f3f3f3;
    --bg-footer: #f0f0f0;
    --border: #dddedf;
    --border-focus: #0074ff;
    --fg: #363636;
    --fg-dim: #777;
    --fg-bright: #001123;
    --accent: #0074ff;
    --accent-hover: #005acc;
    --accent-dim: rgba(0, 116, 255, 0.1);
    --green: #2e7d32;
    --green-dim: rgba(46, 125, 50, 0.1);
    --red: #d32f2f;
    --red-dim: rgba(211, 47, 47, 0.1);
    --yellow: #f57c00;
    --yellow-dim: rgba(245, 124, 0, 0.1);
    --blue: #0074ff;
    --blue-dim: rgba(0, 116, 255, 0.1);
    --shadow: 1px 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 2px 10px rgba(0, 116, 255, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--bg-body);
    color: var(--fg);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

.hidden { display: none !important; }

#app { flex: 1; }

/* ============================================================
   HEADER (matches CMS dark mode)
   ============================================================ */

#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 998;
}

.header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: var(--bg-header);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    flex: 1 1 0%;
}

.header-left { justify-content: flex-start; }
.header-right { justify-content: flex-end; gap: 20px; }

.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 0%;
}

.header-icon-link {
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.header-icon-link:hover { color: #fff; opacity: 0.8; }

.header-logo { display: flex; align-items: center; }

.site-logo {
    height: 50px;
    width: auto;
}
body:not(.dark-mode) .site-logo {
    filter: none;
}
.dark-mode .site-logo {
    filter: invert() grayscale(1);
}

body:not(.dark-mode) .header-icon-link,
body:not(.dark-mode) .burger-toggle {
    color: #001123;
}

body:not(.dark-mode) .toggle-dark-mode {
    background: rgba(0, 0, 0, 0.08);
}

body:not(.dark-mode) .toggle-dark-mode i {
    background: #001123;
    color: #fff;
}

/* Dark mode toggle pill */
.toggle-dark-mode {
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10em;
    padding: 5px;
    display: flex;
    align-items: center;
    cursor: pointer;
    align-self: center;
    transition: background 0.2s;
}

.toggle-dark-mode i {
    font-size: 11px;
    background: #fff;
    color: #333;
    border-radius: 10em;
    transition: margin-left 0.2s ease-in-out;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.dark-mode .toggle-dark-mode i {
    margin-left: 28px;
}

/* Burger menu icon (CSS bars → X morph) */
.burger-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    padding: 0;
}
.burger-toggle:hover { opacity: 0.8; }

.burger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

body:not(.dark-mode) .burger-bar {
    background: #001123;
}

/* X morph when nav is open */
.burger-toggle.open .burger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger-toggle.open .burger-bar:nth-child(2) {
    opacity: 0;
}
.burger-toggle.open .burger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   NAV POPUP (burger menu — matches CMS)
   ============================================================ */

.nav-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 997;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    pointer-events: none;
    visibility: hidden;
}

.nav-popup.open {
    pointer-events: auto;
    visibility: visible;
}

.nav-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.nav-popup.open .nav-popup-backdrop {
    opacity: 1;
}
body:not(.dark-mode) .nav-popup-backdrop {
    background: rgba(0, 0, 0, 0.3);
}

.nav-popup-content {
    position: relative;
    background: var(--bg-card);
    padding: 40px;
    margin-top: var(--header-height);
    width: 100%;
    max-width: var(--max-width);
    border-radius: 0 0 var(--radius) var(--radius);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.nav-popup.open .nav-popup-content {
    opacity: 1;
    transform: translateY(0);
}

.nav-popup-grid {
    display: flex;
    gap: 40px;
}

.nav-popup-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-popup-col h4 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--fg-bright);
    margin-bottom: 4px;
}

.nav-popup-col a {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
    color: var(--fg);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s, transform 0.2s;
}

.nav-popup-col a:hover {
    color: var(--red-hover);
    transform: translateY(-3px);
}

.nav-popup-col a i {
    width: 20px;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* Animations removed — using CSS transitions on .nav-popup.open instead */

/* ============================================================
   FOOTER (matches CMS)
   ============================================================ */

.footer {
    background: var(--bg-footer);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-links {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-links a {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--fg-bright);
    transition: color 0.2s, transform 0.2s;
}
.footer-links a:hover { color: #db1b3e; }

.footer-socials {
    flex: 1 1 0%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: #333;
    color: #ccc;
    font-size: 20px;
    transition: all 0.2s ease-in-out;
}
.footer-socials a:hover {
    color: #db1b3e;
    transform: translateY(-5px);
}

.footer-socials .social-patreon {
    background: rgb(255, 66, 77);
    color: #fff;
}
.footer-socials .social-patreon:hover {
    background: rgb(255, 66, 77);
    color: #fff;
    transform: translateY(-5px);
}

body:not(.dark-mode) .footer-socials a {
    background: #eee;
    color: #555;
}
body:not(.dark-mode) .footer-socials a:hover {
    color: #db1b3e;
}
body:not(.dark-mode) .footer-socials .social-patreon {
    background: rgb(255, 66, 77);
    color: #fff;
}
body:not(.dark-mode) .footer-links a {
    color: #001123;
}

.footer-copy {
    flex: 1 1 0%;
    font-family: var(--font-heading);
    font-size: 13px;
    color: var(--fg-dim);
    text-align: right;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: rgba(0, 116, 255, 0.6);
    color: white;
}
.btn-primary:hover { background: rgba(0, 116, 255, 0.8); color: white; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
    background: rgba(255, 255, 255, 0.15);
    color: var(--fg-bright);
    border: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.25); color: var(--fg-bright); }
body:not(.dark-mode) .btn-ghost {
    background: rgba(0, 0, 0, 0.06);
    color: var(--fg-bright);
}
body:not(.dark-mode) .btn-ghost:hover { background: rgba(0, 0, 0, 0.12); }

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: var(--radius);
}

/* ============================================================
   FORMS
   ============================================================ */

.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 13px;
    color: var(--fg-dim);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--fg);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--border-focus); }
.form-input::placeholder { color: var(--fg-dim); opacity: 0.6; }

/* ============================================================
   BADGES
   ============================================================ */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-active { background: var(--green-dim); color: var(--green); }
.badge-draft { background: var(--blue-dim); color: var(--blue); }
.badge-scheduled { background: var(--yellow-dim); color: var(--yellow); }
.badge-expired { background: var(--red-dim); color: var(--red); }
.badge-pending { background: var(--yellow-dim); color: var(--yellow); }
.badge-available { background: var(--green-dim); color: var(--green); }
.badge-booked { background: var(--red-dim); color: var(--fg-dim); }

/* ============================================================
   TABLES
   ============================================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--fg-dim);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-card-hover); }

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-dim { color: var(--fg-dim); }
.text-accent { color: var(--accent); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }

/* ============================================================
   STATS GRID
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 11px;
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--fg-bright);
}
.stat-value.accent { color: var(--accent); }

/* ============================================================
   PAGE LAYOUTS
   ============================================================ */

.page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px;
    padding-top: calc(var(--header-height) + 32px);
}

.content-box {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--fg-bright);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--fg-dim);
    margin-bottom: 24px;
}

/* ============================================================
   LANDING PAGE — CMS Banner Style
   ============================================================ */

.landing-hero {
    min-height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../img/hero-banner.jpg') center / cover no-repeat;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 11, 23, 0.35);
}
body:not(.dark-mode) .landing-hero::before {
    background: rgba(255, 255, 255, 0.25);
}

.landing-hero__content {
    position: relative;
    z-index: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

.landing-hero__right {
    flex: 0 0 340px;
}

/* Intro section (title + CTAs below banner) */
.landing-intro {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 32px;
    text-align: center;
}

.landing-intro__title {
    font-size: 42px;
    font-weight: 800;
    color: var(--fg-bright);
    margin-bottom: 16px;
    line-height: 1.15;
}

.landing-intro__subtitle {
    font-size: 18px;
    color: var(--fg-dim);
    margin-bottom: 32px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.landing-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.landing-hero__excerpt {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 28px;
    font-size: 16px;
    color: var(--fg);
    line-height: 1.7;
    border: none;
}

/* Section headings */
.section-heading {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--fg-bright);
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

/* Feature cards section */
.landing-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    transform: scale(1.025);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.feature-icon i {
    font-size: 20px;
    color: var(--fg-bright);
}
.feature-title { font-size: 20px; font-weight: 500; color: var(--fg-bright); margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--fg-dim); line-height: 1.6; }

/* ============================================================
   LIVE ANALYTICS SECTION
   ============================================================ */

.analytics-section {
    padding-top: 0;
}

.analytics-loading {
    text-align: center;
    color: var(--fg-dim);
    padding: 32px;
    font-size: 14px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.analytics-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.analytics-card:hover {
    transform: scale(1.025);
    box-shadow: var(--shadow-hover);
}

.analytics-period {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 12px;
}

.analytics-number {
    font-size: 40px;
    font-weight: 800;
    color: var(--fg-bright);
    line-height: 1.1;
    margin-bottom: 4px;
}

.analytics-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-dim);
    margin-bottom: 8px;
}

.analytics-sub {
    font-size: 13px;
    color: var(--fg-dim);
    opacity: 0.7;
}

/* Audience geography */
.analytics-audience {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.analytics-audience-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--fg-bright);
    margin-bottom: 4px;
}

.analytics-audience-sub {
    font-size: 13px;
    color: var(--fg-dim);
    margin-bottom: 24px;
}

.analytics-countries {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.country-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.country-name {
    flex: 0 0 120px;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
    text-align: right;
}

.country-bar-wrap {
    flex: 1;
    height: 24px;
    background: var(--accent-dim);
    border-radius: 6px;
    overflow: hidden;
}

.country-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 6px;
    transition: width 0.6s ease;
    min-width: 4px;
}

.country-pct {
    flex: 0 0 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--fg-bright);
    text-align: right;
}

/* Light mode analytics overrides */
body:not(.dark-mode) .analytics-card {
    background: #ededed;
    border: none;
}
body:not(.dark-mode) .analytics-audience {
    background: #ededed;
    border: none;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    padding-top: calc(var(--header-height) + 48px);
    min-height: 60vh;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--fg-bright);
    margin-bottom: 8px;
    text-align: center;
}

.login-subtitle {
    font-size: 14px;
    color: var(--fg-dim);
    margin-bottom: 28px;
    text-align: center;
    line-height: 1.5;
}

.login-error {
    background: var(--red-dim);
    color: var(--red);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
}

.login-success {
    background: var(--green-dim);
    color: var(--green);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

/* ============================================================
   SPOTS GRID
   ============================================================ */

.spots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.spot-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.spot-card:hover { transform: scale(1.015); box-shadow: var(--shadow-hover); }

.spot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.spot-name { font-weight: 600; color: var(--fg-bright); font-size: 14px; }
.spot-dims { font-size: 11px; color: var(--fg-dim); margin-bottom: 12px; }

.spot-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

.spot-price-label { color: var(--fg-dim); }
.spot-price-value { color: var(--fg-bright); font-weight: 600; }

/* ============================================================
   CURRENCY TOGGLE
   ============================================================ */

.currency-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.currency-btn {
    padding: 6px 14px;
    background: transparent;
    color: var(--fg-dim);
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}
.currency-btn:not(:last-child) { border-right: 1px solid var(--border); }
.currency-btn.active { background: var(--accent); color: white; }
.currency-btn:hover:not(.active) { color: var(--fg); background: var(--bg-card-hover); }

/* Page group headers */
.page-group-header {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 20px 0 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}
.page-group-header:first-child { padding-top: 0; }

/* ============================================================
   CHART
   ============================================================ */

.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    min-height: 200px;
    box-shadow: var(--shadow);
}

.chart-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 11px;
}

.chart-bar-label { width: 70px; text-align: right; color: var(--fg-dim); flex-shrink: 0; }
.chart-bar { height: 20px; background: var(--accent-dim); border-radius: 4px; position: relative; min-width: 2px; }
.chart-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s ease; }
.chart-bar-value { color: var(--fg-dim); font-size: 10px; flex-shrink: 0; width: 60px; }

/* ============================================================
   LOADING / EMPTY STATES
   ============================================================ */

.loading { text-align: center; padding: 60px 24px; color: var(--fg-dim); font-size: 14px; }
.empty-state { text-align: center; padding: 60px 24px; color: var(--fg-dim); }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--fg); margin-bottom: 8px; }

/* ============================================================
   CARD (generic)
   ============================================================ */

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--fg-bright);
}

/* ============================================================
   LIGHT MODE — element overrides
   ============================================================ */

body:not(.dark-mode) .landing-hero {
    background: url('../img/hero-banner.jpg') center / cover no-repeat;
}

body:not(.dark-mode) .landing-hero__excerpt {
    background: rgba(255, 255, 255, 0.45);
    border: none;
    color: #363636;
}

body:not(.dark-mode) .feature-card {
    background: #ededed;
    border: none;
}

body:not(.dark-mode) .content-box,
body:not(.dark-mode) .card,
body:not(.dark-mode) .login-card,
body:not(.dark-mode) .spot-card,
body:not(.dark-mode) .stat-card,
body:not(.dark-mode) .chart-container {
    border: 1px solid var(--border);
}

/* ============================================================
   DASHBOARD TABS
   ============================================================ */

.dash-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 28px;
}

.dash-tab {
    padding: 12px 28px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--fg-dim);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: color 0.2s, border-color 0.2s;
}

.dash-tab:hover { color: var(--fg-bright); }
.dash-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ============================================================
   PROFILE CARD
   ============================================================ */

.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 28px;
}

.profile-card__row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px 24px;
}

.profile-card__row + .profile-card__row {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.profile-card__label {
    display: block;
    font-size: 10px;
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.profile-card__value {
    font-size: 14px;
    color: var(--fg-bright);
}

body:not(.dark-mode) .profile-card { border: 1px solid var(--border); }

/* ============================================================
   VISUAL SITEMAP
   ============================================================ */

.sitemap-container {}

.sitemap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.sitemap-page-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.sitemap-tab {
    padding: 8px 22px;
    background: transparent;
    border: none;
    border-right: 1px solid var(--border);
    color: var(--fg-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.15s;
}

.sitemap-tab:last-child { border-right: none; }
.sitemap-tab.active { background: var(--accent); color: #fff; }
.sitemap-tab:hover:not(.active) { color: var(--fg-bright); background: rgba(255,255,255,0.05); }

/* Legend */
.sitemap-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 11px;
    color: var(--fg-dim);
}

.sitemap-legend__item { display: flex; align-items: center; gap: 6px; }

.sitemap-legend__swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.sitemap-legend__swatch--content {
    background: rgba(255,255,255,0.06);
    border: 1px dashed rgba(255,255,255,0.15);
}

.sitemap-legend__swatch--available {
    background: rgba(0,116,255,0.2);
    border: 2px solid rgba(0,116,255,0.5);
}

.sitemap-legend__swatch--booked {
    background: rgba(239,83,80,0.2);
    border: 2px solid rgba(239,83,80,0.5);
}

.sitemap-legend__swatch--selected {
    background: rgba(0,116,255,0.35);
    border: 2px solid var(--blue);
    box-shadow: 0 0 0 2px var(--accent);
}

body:not(.dark-mode) .sitemap-legend__swatch--content {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.15);
}

/* Body: wireframe + summary side by side */
.sitemap-body {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.sitemap-wireframe {
    flex: 1 1 0%;
    min-width: 0;
}

.sitemap-summary {
    flex: 0 0 300px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.sitemap-loading {
    text-align: center;
    padding: 40px;
    color: var(--fg-dim);
    font-size: 14px;
}

/* Page label */
.sitemap-page-label {
    font-size: 11px;
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* Header + footer placeholder bars */
.sitemap-header-bar,
.sitemap-footer-bar {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.sitemap-footer-bar { margin-top: 6px; margin-bottom: 0; }

body:not(.dark-mode) .sitemap-header-bar,
body:not(.dark-mode) .sitemap-footer-bar {
    background: rgba(0,0,0,0.05);
}

/* Full-width rows */
.sitemap-full { margin-bottom: 6px; }

/* Content blocks (content + sidebar) */
.sitemap-block {
    display: flex;
    gap: 1.3%;
    margin-bottom: 6px;
}

.sitemap-block--reverse {
    flex-direction: row-reverse;
}

.sitemap-col-content {
    flex: 0 0 65.8%;
}

.sitemap-col-sidebar {
    flex: 0 0 32.9%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Content placeholder */
.sitemap-content {
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    border: 1px dashed rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.sitemap-content__label {
    font-size: 10px;
    color: var(--fg-dim);
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body:not(.dark-mode) .sitemap-content {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
}

/* Widget placeholder (sidebar) */
.sitemap-widget {
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    border: 1px dashed rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1.1;
}

body:not(.dark-mode) .sitemap-widget {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}

/* --- Spot elements --- */

.sitemap-spot {
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    position: relative;
    transition: all 0.2s;
    box-sizing: border-box;
}

/* Shape classes */
.sitemap-spot--banner { aspect-ratio: 4.56; }       /* 1140/250 */
.sitemap-spot--banner-tall { aspect-ratio: 2.28; }   /* 1140/500 */
.sitemap-spot--separator { height: 22px; }
.sitemap-spot--tall { aspect-ratio: 0.6; }           /* compressed 375/750 */
.sitemap-spot--square { aspect-ratio: 1.1; }          /* compressed 375/375 */

/* Availability states */
.sitemap-spot--available {
    background: rgba(0,116,255,0.15);
    border: 2px solid rgba(0,116,255,0.4);
    cursor: pointer;
}

.sitemap-spot--available:hover {
    background: rgba(0,116,255,0.25);
    border-color: var(--blue);
    transform: scale(1.02);
    z-index: 1;
}

.sitemap-spot--booked {
    background: rgba(239,83,80,0.15);
    border: 2px solid rgba(239,83,80,0.35);
    cursor: not-allowed;
    opacity: 0.65;
}

.sitemap-spot--selected {
    background: rgba(0,116,255,0.3);
    border: 2px solid var(--blue);
    box-shadow: 0 0 0 2px var(--accent);
    cursor: pointer;
}

.sitemap-spot--selected:hover {
    background: rgba(0,116,255,0.35);
}

/* Labels */
.sitemap-spot__label {
    font-size: 10px;
    font-weight: 700;
    color: var(--fg-bright);
    text-align: center;
    line-height: 1;
}

.sitemap-spot__dims {
    font-size: 8px;
    color: var(--fg-dim);
    opacity: 0.7;
}

/* Separator spots — smaller label */
.sitemap-spot--separator .sitemap-spot__label { font-size: 9px; }
.sitemap-spot--separator .sitemap-spot__dims { display: none; }

/* Light mode overrides */
body:not(.dark-mode) .sitemap-spot--available {
    background: rgba(0,116,255,0.1);
    border-color: rgba(0,116,255,0.35);
}

body:not(.dark-mode) .sitemap-spot--booked {
    background: rgba(239,83,80,0.1);
    border-color: rgba(239,83,80,0.3);
}

body:not(.dark-mode) .sitemap-spot--selected {
    background: rgba(0,116,255,0.2);
}

/* ============================================================
   SUMMARY PANEL
   ============================================================ */

.sitemap-summary__inner {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
}

body:not(.dark-mode) .sitemap-summary__inner {
    border: 1px solid var(--border);
}

.sitemap-summary__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--fg-bright);
    margin-bottom: 16px;
}

.sitemap-summary__count {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.sitemap-summary__empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--fg-dim);
    font-size: 13px;
    line-height: 1.5;
}

.sitemap-summary__item {
    background: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

body:not(.dark-mode) .sitemap-summary__item {
    background: rgba(0,0,0,0.03);
}

.sitemap-summary__item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.sitemap-summary__item-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--fg-bright);
}

.sitemap-summary__remove {
    background: none;
    border: none;
    color: var(--fg-dim);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}

.sitemap-summary__remove:hover { color: #ef5350; }

.sitemap-summary__item-type {
    font-size: 11px;
    color: var(--fg-dim);
    margin-bottom: 8px;
}

.sitemap-summary__item-duration {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sitemap-summary__duration-select {
    padding: 5px 8px;
    font-size: 12px;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--fg);
    font-family: var(--font-body);
    cursor: pointer;
}

.sitemap-summary__duration-select:focus {
    border-color: var(--accent);
    outline: none;
}

.sitemap-summary__price {
    font-size: 13px;
    color: var(--fg);
    font-weight: 500;
}

.sitemap-summary__item-total {
    font-size: 11px;
    color: var(--fg-dim);
    margin-top: 6px;
    text-align: right;
}

.sitemap-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 0;
    margin-top: 8px;
    border-top: 2px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    color: var(--fg-bright);
}

.sitemap-summary__total-value {
    color: var(--accent);
    font-size: 20px;
}

.sitemap-summary__book {
    width: 100%;
    margin-top: 16px;
}

/* Confirmation */
.sitemap-confirmation {
    text-align: center;
    padding: 20px 0;
}

.sitemap-confirmation__icon {
    font-size: 48px;
    color: #4caf50;
    margin-bottom: 12px;
}

.sitemap-confirmation__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--fg-bright);
    margin-bottom: 8px;
}

.sitemap-confirmation__text {
    font-size: 13px;
    color: var(--fg-dim);
    line-height: 1.5;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    .header-inner {
        padding: 0 12px;
    }

    .header-left { flex: 0 0 auto; }
    .header-right { flex: 0 0 auto; gap: 12px; }
    .header-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .site-logo { height: 40px; max-width: 100px; }

    .header-icon-link { font-size: 22px; }
    .burger-toggle { font-size: 22px; }
    .toggle-dark-mode { width: 50px; height: 26px; }
    .toggle-dark-mode i { width: 16px; height: 16px; font-size: 14px; }
    .dark-mode .toggle-dark-mode i { margin-left: 22px; }

    /* Nav popup responsive */
    .nav-popup-content { padding: 24px; }
    .nav-popup-grid { flex-wrap: wrap; gap: 24px; }
    .nav-popup-col { flex: 1 1 calc(50% - 12px); min-width: 140px; }
    .nav-popup-col h4 { font-size: 18px; }
    .nav-popup-col a { font-size: 14px; }

    /* Footer responsive */
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    .footer-links { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 12px; }
    .footer-copy { text-align: center; }

    /* Landing hero */
    .landing-hero { min-height: 350px; }
    .landing-hero__content { justify-content: center; padding: 40px 20px; }
    .landing-hero__right { flex: none; width: 100%; max-width: 360px; }

    /* Landing intro */
    .landing-intro__title { font-size: 30px; }
    .landing-cta { justify-content: center; }
    .landing-hero__right { flex: none; width: 100%; max-width: 360px; }

    /* Feature cards */
    .landing-features { grid-template-columns: 1fr; }

    /* Analytics */
    .analytics-grid { grid-template-columns: 1fr; }
    .analytics-number { font-size: 32px; }
    .country-name { flex: 0 0 90px; font-size: 13px; }

    /* Page layouts */
    .page { padding: 24px 16px; }
    .content-box { padding: 20px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }

    /* Sitemap */
    .sitemap-body { flex-direction: column; }
    .sitemap-wireframe, .sitemap-summary { flex: none; max-width: 100%; width: 100%; }
    .sitemap-summary { position: static; }
    .sitemap-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .nav-popup-col { flex: 1 1 100%; }
    .landing-intro__title { font-size: 26px; }
    .stats-grid { grid-template-columns: 1fr; }
    .spots-grid { grid-template-columns: 1fr; }
    .sitemap-page-tabs { width: 100%; }
    .sitemap-tab { flex: 1; text-align: center; padding: 8px 12px; font-size: 12px; }
}
