/* -------- Theme tokens -------- */
:root {
    --accent: #ffc000;

    /* Light (darkened a touch for contrast) */
    --bg: #bcc0c4;
    --surface: #f7f8fa;
    --surface-2: #eceff3;
    --text: #0e1116;
    --muted: #4c5461;
    --border: #d6dae2;
    --ring: rgba(255, 192, 0, 0.35);

    --radius-lg: 24px;
    --radius-md: 14px;

    --shadow-1: 0 10px 25px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-2: 0 18px 40px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.08);

    --transition-fast: 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-slow: 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

html[data-theme="dark"] {
    --bg: #191e24;
    --surface: #1f252e;
    --surface-2: #1e242d;
    --text: #eef2f7;
    --muted: #98a3b3;
    --border: #2a303a;
    --ring: rgba(255, 192, 0, 0.45);

    --shadow-1: 0 12px 28px rgba(0, 0, 0, 0.45), 0 6px 12px rgba(0, 0, 0, 0.35);
    --shadow-2: 0 20px 44px rgba(0, 0, 0, 0.55), 0 8px 18px rgba(0, 0, 0, 0.45);

    background-color: #191e24;
}

html[data-theme="light"] {
    color-scheme: light;
}

/* -------- Base -------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
  background-color: #bcc0c4;
}

body {
    margin: 0;
    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        "Helvetica Neue",
        Arial,
        "Noto Sans",
        "Apple Color Emoji",
        "Segoe UI Emoji";
    background: var(--bg); /* solid fallback ensures no black flash */
    background:
        radial-gradient(
            1200px 800px at 80% -10%,
            rgba(255, 192, 0, 0.1),
            transparent 60%
        ),
        radial-gradient(
            900px 700px at -10% 120%,
            rgba(255, 192, 0, 0.06),
            transparent 50%
        ),
        var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

/* Focus styles */
:focus-visible {
    outline: 3px solid var(--ring);
    outline-offset: 2px;
    border-radius: 20px;
}

/* -------- Top bar -------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 2000;
    backdrop-filter: saturate(150%) blur(10px);
    background: color-mix(in oklab, var(--surface) 88%, transparent);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    margin: 0 auto;
    max-width: 1100px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text);
}

.logo {
    width: 70px;
    height: 70px;
    border-radius: 50px;
    border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--surface));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-name {
    font-weight: 700;
    letter-spacing: 0.2px;
    font-size: 1.5rem;
}

.actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Theme toggle */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: auto;          /* key change */
    padding: 0 16px;      /* give it pill padding */
    gap: 8px;             /* spacing between icons/text */
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-1);
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.icon-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-2);
}

.icon-button:active {
    transform: translateY(0);
}

/* The custom icon */
.theme-icon {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Sun icon (shown in dark mode) */
html[data-theme="dark"] .theme-icon {
    background: #ffc000;
    box-shadow:
        0 0 0 2px #ffc000,
        12px 0 0 -10px #ffc000,
        -12px 0 0 -10px #ffc000,
        0 12px 0 -10px #ffc000,
        0 -12px 0 -10px #ffc000,
        8px 8px 0 -10px #ffc000,
        -8px -8px 0 -10px #ffc000,
        8px -8px 0 -10px #ffc000,
        -8px 8px 0 -10px #ffc000;
}

/* Moon icon (shown in light mode) */
html[data-theme="light"] .theme-icon {
    background: transparent;
    box-shadow: inset -8px -2px 0 0 #ffc000;
    border: 2px solid #ffc000;
}

/* Hover effect */
.icon-button:hover .theme-icon {
    transform: rotate(15deg) scale(1.1);
}

/* -------- Layout -------- */
.page {
    margin: 40px 30px;
    padding: 20px 40px 40px;
    flex: 1 0 auto;
    overflow-anchor: none;
    overflow: hidden;
}

.card {
    box-sizing: border-box;
    width: 100%;
    min-width: fit-content;
    max-width: 560px;
    margin: 2.5rem auto;
    padding: 40px;
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--surface) 94%, transparent),
        var(--surface)
    );
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    border-radius: var(--radius-lg);
    transition:
        transform var(--transition-slow),
        box-shadow var(--transition-slow),
        background var(--transition-slow);
}
.card:hover {
    transform: translateY(-2px);
}

/* wider variant for overview pages */
.card.card--wide {
    max-width: 1000px;
    min-width: 400px;
    width: 100%;
}

/* Invisible / ghost card: keeps layout & width, drops chrome */
.card.card--ghost {
    background: transparent;
    border: none;
    box-shadow: none;
    margin-top: 2rem;
}

/* Email verification reminder card */
.card.card--verify {
    min-width: unset;
    border-color: color-mix(in srgb, #f5a623 55%, var(--border));
    background: color-mix(in srgb, #f5a623 5%, var(--surface));
}

.card--verify .badge-admin {
    display: inline-block;
    margin-bottom: 20px;
}

.card--verify p {
    margin: 0 0 8px;
}

.card--verify a {
    color: inherit;
    text-decoration: underline;
}

.card--verify .card--verify__hint {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.75;
}

.hero h1 {
    margin: 4px 0 8px;
    font-size: clamp(1.6rem, 2.2vw + 1rem, 2.4rem);
    letter-spacing: -0.02em;
}

.hero .form-title { margin-bottom: 8px; }
.hero .form-title:last-of-type { margin-bottom: 16px; }

.muted {
    color: var(--muted);
    margin: 0 0 0px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

/* Buttons */
.button {
    --btn-bg: var(--surface-2);
    --btn-fg: var(--text);
    min-width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 18px;
    font-weight: 700;
    line-height: 1.2;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--btn-fg);
    background: var(--btn-bg);
    box-shadow: var(--shadow-1);
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast);
}
button.button,
.button[type="button"],
.button[type="submit"] {
    -webkit-appearance: none;
    appearance: none;
    line-height: inherit;
}
.button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-2);
}
.button:active {
    transform: translateY(0);
}

.button.primary {
    --btn-bg: color-mix(in srgb, var(--accent) 92%, white 8%);
    --btn-fg: #1b1200;
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}
html[data-theme="dark"] .button.primary {
    --btn-fg: #1a1a1a;
}

/* red variant for destructive actions, same style as primary */
.button.danger {
    color: #ef4444;
    border-color: color-mix(in srgb, #ef4444 55%, var(--border));
    background: color-mix(in srgb, #ef4444 8%, var(--surface));
}

html[data-theme="dark"] .button.danger {
    --btn-fg: #ffffff;
}

.button.ghost {
    background: transparent;
}

.map {
    height: 100%;
    min-height: 520px; /* keeps a nice minimum on large screens */
    width: 100%;
    border-radius: calc(var(--radius-lg) - 2px);
    overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--accent) 45%, var(--border));
    margin-top: 0;
    box-shadow: var(--shadow-1);
}

.fineprint {
    margin-top: 30px;
    color: var(--muted);
    font-size: 0.95rem;
}

/* -------- Footer -------- */
.footer {
    position: static;
    top: auto;
    border-top: 1px solid var(--border);
    background: color-mix(in oklab, var(--surface) 90%, transparent);
    backdrop-filter: blur(8px);
    padding: 20px;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 6px;
}

.footer a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
    transition:
        border-color var(--transition-fast),
        color var(--transition-fast);
}
.footer a:hover {
    color: var(--text);
    border-color: var(--accent);
}

.footer-copy {
    color: var(--muted);
    font-size: 0.92rem;
}

/* -------- Leaflet tweaks for theme -------- */
.leaflet-container {
    background: var(--surface-2);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-1);
}

/* --- Language toggle (pill) --- */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-1);
    overflow: hidden;
}

.lang-btn,
.lang-btn:link,
.lang-btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 12px;
    text-decoration: none;
    font-weight: 700;
    color: var(--muted);
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

.lang-btn:hover {
    color: var(--text);
    transform: translateY(-1px);
}

.lang-btn.active {
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
    box-shadow: inset 0 0 0 1px
        color-mix(in srgb, var(--accent) 55%, var(--border));
}

.lang-btn + .lang-btn {
    border-left: 1px solid var(--border);
}

.flag {
    font-size: 16px;
    line-height: 1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Language dropdown --- */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

/* --- Theme dropdown reusing language menu card --- */
.theme-dropdown {
    position: relative;
    display: inline-block;
}

/* Align theme menu directly under theme button, left-aligned */
.lang-menu.theme-menu {
    right: 0;
    left: auto;
}

#theme-toggle span {
    display: inline-block;
    margin: 0 4px;
}

/* Small, subtle slash separator between sun and moon */
.theme-separator {
    opacity: 0.7;
    font-size: 0.9em;
    margin: 0 1px;
}

.lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    height: 50px;
    padding: 0 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-1);
    color: var(--text);
    cursor: pointer;
    transition:
        background var(--transition-fast),
        box-shadow var(--transition-fast);
}

.lang-trigger:hover {
    box-shadow: var(--shadow-2);
    transform: translateY(-1px);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-2);
    padding: 15px 15px 15px 15px;
    list-style: none;
    margin: 0;
    z-index: 50;
    width: max-content;
    min-width: 180px;
    max-width: 90vw;
    white-space: nowrap;
    overflow-x: auto;
}

.lang-menu a,
.lang-menu a * {
    white-space: nowrap;
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: background var(--transition-fast);
}

.lang-menu a:hover {
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

/* --- Theme menu options (look like language entries) --- */
.theme-option {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 14px;
    border-radius: 12px;

    font: inherit;
    font-weight: 600;
    color: var(--text);

    cursor: pointer;
    transition: background var(--transition-fast);
}

.theme-option:hover {
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.theme-option[aria-selected="true"] {
    background: color-mix(in srgb, var(--accent) 24%, var(--surface));
}

.lang-menu[hidden] {
    display: none !important;
}

.lang-trigger {
    height: 50px;
    padding: 0 16px;
    min-width: 110px;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
    width: max-content;
    min-width: 180px;
    max-width: 90vw;
}

.lang-trigger .label {
    letter-spacing: 0.2px;
}

.form {
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form label {
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 1.05rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: 1.05rem;
    outline: none;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.form input::placeholder,
.form textarea::placeholder {
    color: color-mix(in srgb, var(--text) 55%, transparent);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
    box-shadow: 0 0 0 3px var(--ring);
}

/* Style only the inner "Choose Files" button */
.form input[type="file"]::file-selector-button {
    margin-right: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 0.45rem 0.9rem;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

/* Safari / older WebKit fallback */
.form input[type="file"]::-webkit-file-upload-button {
    margin-right: 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 0.45rem 0.9rem;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

html[data-theme="dark"] .form input,
html[data-theme="dark"] .form select,
html[data-theme="dark"] .form textarea {
    background: #121820;
    border-color: #2a303a;
    color: var(--text);
}

html[data-theme="dark"] .form input:focus,
html[data-theme="dark"] .form select:focus,
html[data-theme="dark"] .form textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
    box-shadow:
        0 0 0 3px var(--ring),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.form-help a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}
.form-help a:hover {
    text-decoration: underline;
}

.form .checkbox-row {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.form .checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--accent);
}

.form-title {
    margin: 0;
    margin-bottom: 40px;
    font-weight: 800;
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text, #fff);
    text-align: left;
}

/* keep brand + user on one line with some space */
.brand-and-user {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 60px;
}

/* user dropdown — exact copy of language dropdown */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-1);
    color: var(--text);
    cursor: pointer;
    transition:
        background var(--transition-fast),
        box-shadow var(--transition-fast);
    white-space: nowrap;
    width: max-content;
    min-width: 180px;
    max-width: 90vw;
}
.user-trigger:hover {
    box-shadow: var(--shadow-2);
    transform: translateY(-1px);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-2);
    padding: 15px 15px 15px 15px;
    list-style: none;
    margin: 0;
    z-index: 3000;
    width: max-content;
    min-width: 180px;
    max-width: 90vw;
    white-space: nowrap;
    overflow-x: auto;
}
.user-dropdown[hidden] {
    display: none !important;
}

.user-dropdown a,
.user-dropdown a * {
    white-space: nowrap;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    transition: background var(--transition-fast);
}
.user-dropdown a:hover {
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.user-dropdown .divider {
    height: 1px;
    background: var(--border);
    margin: 8px 2px;
}

/* Make the trigger buttons fit their text exactly */
.user-trigger,
.lang-trigger {
    width: fit-content;
    min-width: 0;
    max-width: none;
    white-space: nowrap;
}

/* --- Dashboard search bar --- */
.search-wrap {
    max-width: fit-content;
    min-width: 400px;
    margin: 18px auto 0;
    padding: 25px 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 52px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-2);
    padding: 0 10px 0 16px;
    transition:
        box-shadow var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.search-bar:focus-within {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
    box-shadow:
        0 0 0 3px var(--ring),
        var(--shadow-2);
    background: color-mix(in srgb, var(--surface) 98%, transparent);
}

.search-bar input {
    flex: 1 1 auto;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 1.05rem;
    padding: 0 8px;
}

.search-bar input::placeholder {
    color: color-mix(in srgb, var(--text) 55%, transparent);
}

.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 50px;
    border: none;
    background: none;
    color: color-mix(in srgb, var(--text) 55%, transparent);
    cursor: pointer;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast);
}

.search-btn:hover {
    transform: translateY(-1px);
}

html[data-theme="dark"] .search-bar {
    background: #1f252e;
}

/* --- Simple grid helpers for forms --- */
.grid {
    display: grid;
    gap: 1.25rem;
}
.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 720px) {
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* 2-column layout for the search page: form + map (same width, equal height) */
.content-2col {
    display: grid;
    grid-template-columns: repeat(2, 560px);
    gap: 24px;
    align-items: stretch;
    justify-content: center;
}
@media (max-width: 980px) {
    .content-2col {
        grid-template-columns: 1fr;
    }
}

/* Use cards inside grids without outer vertical margins, and let them stretch */
.card--inline {
    margin: 0;
    min-width: fit-content;
    display: flex;
    flex-direction: column;
}

/* add once to style.css */
.error {
    color: #b00;
    font-weight: 600;
    margin-top: 6px;
    display: block;
}

/* Floating Support FAB */
.support-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 3000;
    height: 52px;
    width: 52px;
    border-radius: 14px;
    box-shadow: var(--shadow-2);
}

/* Support panel */
.support-panel {
    position: fixed;
    right: 20px;
    bottom: 84px; /* sits above the FAB */
    z-index: 3000;
    width: min(92vw, 360px);
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
    transition:
        transform var(--transition-slow),
        opacity var(--transition-slow);
    transform: translateY(10px);
    opacity: 0;
}

.support-panel[aria-hidden="false"] {
    transform: translateY(0);
    opacity: 1;
}

.support-panel__inner {
    padding: 18px;
}

.support-panel__title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 800;
}

.support-panel__close {
    margin-top: 12px;
    width: 100%;
}

/* Tables inside cards */

.table-wrapper {
    margin-top: 24px;
    width: 100%;
    overflow-x: auto; /* keeps things usable on small screens */
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.98rem;
    table-layout: auto;
}

.table thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
    white-space: nowrap;
}

.table tbody td {
    padding: 10px 14px;
    vertical-align: middle;
}

/* --- Status icons for Yes / No --- */

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    border: 1px solid transparent;
}

.status-icon--yes {
    color: #0f9d58; /* green */
    background: color-mix(in srgb, #0f9d58 15%, var(--surface));
    border-color: color-mix(in srgb, #0f9d58 55%, var(--border));
}

.status-icon--no {
    color: #d93025; /* red */
    background: color-mix(in srgb, #d93025 12%, var(--surface));
    border-color: color-mix(in srgb, #d93025 55%, var(--border));
}

/* Base status icons already exist:
   .status-icon, .status-icon--yes, .status-icon--no
   We just add a "large" modifier + centering container. */

.status-icon--large {
    width: 3rem;
    height: 3rem;
    font-size: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.success-card .success-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Center those columns in the table */
.table td.col-center,
.table th.col-center {
    text-align: center;
}

/* row dividers */
.table tbody tr + tr td {
    border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

/* subtle hover highlight */
.table tbody tr:hover td {
    background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

/* numeric + centered columns */
.table .col-num {
    text-align: right;
    white-space: nowrap;
}
.table .col-center {
    text-align: center;
}
.table .col-actions {
    text-align: right;
    white-space: nowrap;
}

/* ------- Shared icon styles for table action buttons ------- */

.icon-btn,
.icon-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50px;
    border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
    background: color-mix(in srgb, var(--surface-2) 90%, transparent);
    font-size: 16px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    color: var(--muted);
    text-decoration: none;
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.icon-btn:hover,
.icon-delete:hover {
    color: #1b1200;
    background: color-mix(in srgb, var(--accent) 24%, var(--surface));
    border-color: color-mix(in srgb, var(--accent) 70%, var(--border));
    box-shadow: var(--shadow-1);
    transform: translateY(-1px);
}

html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .icon-delete:hover {
    color: #1a1a1a;
}

/* Make upload edit button highlight when hovering the wrapper (file input sits on top) */
.upload-btn-wrapper:hover .icon-btn {
    color: #1b1200;
    background: color-mix(in srgb, var(--accent) 24%, var(--surface));
    border-color: color-mix(in srgb, var(--accent) 70%, var(--border));
    box-shadow: var(--shadow-1);
    transform: translateY(-1px);
}

html[data-theme="dark"] .upload-btn-wrapper:hover .icon-btn {
    color: #1a1a1a;
}

/* ----- Custom map markers (accessible) ----- */
.map-marker {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    border: 2px solid rgba(0, 0, 0, 0.4);
}

/* Search center: rounded square with “S” */
.map-marker--search {
    border-radius: 50px;
    background: #f5961e;
    color: black;
}

/* Spot marker: circle with “P” */
.map-marker--spot {
    border-radius: 50%;
    background: #1d3661;
}

/* Dark theme tweak */
html[data-theme="dark"] .map-marker--search {
    background: #f5961e;
}
html[data-theme="dark"] .map-marker--spot {
    background: #1d3661;
}

/* Favorite marker as a HEART silhouette, keep the "P" */
.map-marker--favorite {
  /* keep your base .map-marker centering */
  position: relative;
  isolation: isolate;          /* lets pseudo-elements sit behind text safely */
  width: 26px;
  height: 26px;

  /* text stays */
  color: #fff;

  /* remove any old shape behavior if other classes are present */
  border-radius: 0 !important;
  background: transparent !important;
}

/* One reusable heart mask */
.map-marker--favorite {
  --heart-mask: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\
<path d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/>\
</svg>");
}

/* Outline (pseudo behind) */
.map-marker--favorite::before {
  content: "";
  position: absolute;
  inset: -2px;                 /* outline thickness */
  background: rgba(0,0,0,0.45);
  -webkit-mask: var(--heart-mask) center / contain no-repeat;
          mask: var(--heart-mask) center / contain no-repeat;
  z-index: -2;
  filter: drop-shadow(0 2px 8px rgba(220, 38, 38, 0.25));
}

/* Filled heart */
.map-marker--favorite::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #dc2626;
  -webkit-mask: var(--heart-mask) center / contain no-repeat;
          mask: var(--heart-mask) center / contain no-repeat;
  z-index: -1;
}

/* Remove base marker chrome for heart variant */
.map-marker.map-marker--favorite {
  border: none;
  box-shadow: none;
}

/* -------- Profile Picture Styles -------- */

/* Profile picture containers */
.profile-picture-display {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

/* Main profile picture (account page) */
.profile-picture {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid color-mix(in srgb, var(--accent) 40%, var(--surface));
    box-shadow: var(--shadow-1);
    background: var(--surface-2);
}

/* Header profile picture (inside user dropdown trigger) */
.profile-picture-header {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
    background: var(--surface-2);
    flex-shrink: 0;
}

/* Initials fallback - main size */
.profile-initials {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--accent) 85%, #ffc000),
        var(--accent)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1b1200;
    font-size: 38px;
    font-weight: 800;
    border: 3px solid color-mix(in srgb, var(--accent) 40%, var(--surface));
    box-shadow: var(--shadow-1);
    letter-spacing: 0.5px;
}

html[data-theme="dark"] .profile-initials {
    color: #1a1a1a;
}

/* Initials fallback - header size */
.profile-initials-header {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--accent) 85%, #ff8800),
        var(--accent)
    );
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1b1200;
    font-size: 14px;
    font-weight: 800;
    border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
    flex-shrink: 0;
    letter-spacing: 0.3px;
}

html[data-theme="dark"] .profile-initials-header {
    color: #1a1a1a;
}

/* Upload controls */
.profile-upload-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.upload-btn-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.upload-btn-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Image preview before upload */
.image-preview-container {
    margin-top: 16px;
    display: none;
}

.image-preview-container.show {
    display: block;
}

.image-preview {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid color-mix(in srgb, var(--accent) 40%, var(--surface));
    box-shadow: var(--shadow-1);
}

/* Account sections */
.account-section {
    margin-bottom: 32px;
}

.account-section h2 {
    margin: 0 0 16px;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-info-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
}

/* ensure little gap between label/value and edit icon */
.account-info-row .icon-btn {
    margin-left: 6px;
}

.account-info-label {
    font-weight: 700;
    color: var(--muted);
    min-width: 100px;
}

.account-info-value {
    color: var(--text);
}

/* Danger zone styling */
.danger-zone {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid color-mix(in srgb, #a80a0a 25%, var(--border));
}

.danger-zone h2 {
    margin: 0 0 12px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #a80a0a;
}

.danger-zone p {
    color: var(--muted);
    margin-bottom: 16px;
}

/* Thin vertical divider in the top bar */
.topbar-divider {
    width: 1px;
    height: 28px;
    background: color-mix(in srgb, var(--border) 85%, transparent);
    opacity: 0.9;
}

/* Avatar-only trigger in the top bar */
.user-avatar-trigger {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-trigger .profile-picture-header,
.user-avatar-trigger .profile-initials-header {
    width: 70px;
    height: 70px;
}

.my-spots-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* put items at the top */
    gap: 16px;
}

/* Minimal, thin “+” */
.my-spots-add {
    font-size: 1.8rem; /* smaller & thinner than before */
    font-weight: 300;
    line-height: 1;
    text-decoration: none;
    color: var(--muted);
    margin-top: 4px; /* nudge it down a bit from the top edge */
}

.my-spots-add:hover {
    opacity: 0.85;
}

/*-----------My spots table------------*/
/*Make rows feel clickable */
.spot-row {
    cursor: pointer;
}

/* details row is a normal table row, but inner div animates */
.spot-details-row {
    background: transparent;
}

/* collapse padding/border so closed rows don't create gaps */
.table .spot-details-row td {
    padding: 0;
    border-top: none;
}

.spot-details-inner {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s ease;
}

/* add top spacing only when the row is open */
.spot-details-row.is-open .spot-details-inner {
    padding-top: 0.75rem;
}

/* the actual card */
.spot-details-card {
    margin-top: 0;
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    background: var(--card-bg, #151823);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.spot-details-meta {
    flex: 1 1 auto;
}

.spot-details-images {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.spot-details-image img {
    display: block;
    max-width: 140px;
    max-height: 100px;
    border-radius: 0.75rem;
    object-fit: cover;
}

.spot-details-title {
    margin: 0 0 0.75rem;
}

.spot-details-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem 1.5rem;
    margin: 0;
}

.spot-details-list dt {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

.spot-details-list dd {
    margin: 0;
}

/* ============================================================================
   ADMIN DASHBOARD STYLES
   ============================================================================ */

.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
}

.stat-label {
    color: var(--text-muted, #6b7280);
    margin-top: 0.5rem;
}

.stat-value.danger {
    color: #ef4444;
}

.stat-value.primary {
    color: #8b5cf6;
}

.admin-search-box {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.admin-search-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.admin-search-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 0.5rem;
    background: var(--input-bg, white);
    color: var(--text-color, #111827);
}

.admin-table-card {
    padding: 2.5rem;
}

.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color, #d1d5db);
}

.tab-btn {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-muted, #6b7280);
    transition: all 0.2s;
}

.tab-btn:hover {
    background: var(--hover-bg, rgba(0,0,0,0.05));
}

.tab-btn.active {
    border-bottom-color: var(--primary-color, #3b82f6);
    color: var(--primary-color, #3b82f6);
    font-weight: 600;
}

.admin-table-wrapper {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead tr {
    border-bottom: 2px solid var(--border-color, #d1d5db);
}

.admin-table th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
}

.admin-table th.center {
    text-align: center;
}

.admin-table th.right {
    text-align: right;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--border-color, #d1d5db);
}

.admin-table td {
    padding: 1rem;
}

.admin-table td.center {
    text-align: center;
}

.admin-table td.right {
    text-align: right;
}

.admin-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-admin {
    background: #8b5cf6;
    color: white;
}

.badge-user {
    background: #3b82f6;
    color: white;
}

.badge-banned {
    background: #ef4444;
    color: white;
}

.badge-active {
    background: #50b450;
    color: white;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #d1d5db);
    background: var(--card-bg, white);
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--hover-bg, rgba(0,0,0,0.05));
}

.action-btn.danger {
    color: #ef4444;
    border-color: #ef4444;
}

.action-btn.danger:hover {
    background: #ef4444;
    color: white;
}

.action-btn.success {
    color: #10b981;
    border-color: #10b981;
}

.action-btn.success:hover {
    background: #10b981;
    color: white;
}

.admin-loading {
    text-align: center;
    padding: 2rem;
}

.admin-error {
    color: #ef4444;
}

.admin-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted, #6b7280);
}

/* Ban Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    margin: 2rem;
}

.modal-title {
    margin-bottom: 1rem;
}

.modal-text {
    margin-bottom: 1rem;
    color: var(--text-muted, #6b7280);
}

.modal-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.modal-textarea {
    width: 100%;
    padding: 1.05rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 1.05rem;
    outline: none;
    margin-bottom: 1.5rem;
    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.modal-textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
    box-shadow: 0 0 0 3px var(--ring);
}

/* Dark mode specific */
html[data-theme="dark"] .modal-textarea {
    background: #121820;
    border-color: #2a303a;
}

html[data-theme="dark"] .modal-textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 65%, var(--border));
    box-shadow:
        0 0 0 3px var(--ring),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color, #d1d5db);
    background: var(--card-bg, white);
    border-radius: 0.5rem;
    cursor: pointer;
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .admin-search-input,
    .action-btn,
    .btn-secondary {
        background: var(--card-bg, #1f2937);
        color: var(--text-color, #f9fafb);
    }
}

/* ============================================================================
   ADMIN DASHBOARD — theme-token overrides (fix light mode)
   Put this at the very end of style.css
   ============================================================================ */

/* Use real theme tokens (your app uses --muted, not --text-muted, etc.) */
.admin-container { color: var(--text); }
.stat-label { color: var(--muted); }

/* Admin action buttons */
.admin-actions .action-btn {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-1);
}

.admin-actions .action-btn:hover {
    background: color-mix(in srgb, var(--surface-2) 55%, transparent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-2);
}

/* Danger / Success keep readable in BOTH themes */
.admin-actions .action-btn.danger {
    color: #ef4444;
    border-color: color-mix(in srgb, #ef4444 55%, var(--border));
    background: color-mix(in srgb, #ef4444 8%, var(--surface));
}

.admin-actions .action-btn.danger:hover {
    background: color-mix(in srgb, #ef4444 14%, var(--surface));
}

/* Orange accent variant - mirrors danger but in orange, for Update buttons */
.admin-actions .action-btn.accent {
    color: #f5961e;
    border-color: color-mix(in srgb, #f5961e 55%, var(--border));
    background: color-mix(in srgb, #f5961e 8%, var(--surface));
}

.admin-actions .action-btn.accent:hover {
    background: color-mix(in srgb, #f5961e 14%, var(--surface));
}

.admin-actions .action-btn.success {
    color: #10b981;
    border-color: color-mix(in srgb, #10b981 55%, var(--border));
    background: color-mix(in srgb, #10b981 8%, var(--surface));
}

.admin-actions .action-btn.success:hover {
    background: color-mix(in srgb, #10b981 14%, var(--surface));
}

/* ============================================================================
   BADGE STYLING - Outlined style matching action buttons
   ============================================================================ */

/* Base badge - outlined style instead of filled */
.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-1);
    transition: all 0.2s;
}

/* Admin badge - orange outlined */
.badge-admin {
    color: #f5961e;
    border-color: color-mix(in srgb, #f5961e 55%, var(--border));
    background: color-mix(in srgb, #f5961e 8%, var(--surface));
    box-shadow: none;
}

/* User badge - teal outlined */
.badge-user {
    color: #00a5b4;
    border-color: color-mix(in srgb, #00a5b4 55%, var(--border));
    background: color-mix(in srgb, #00a5b4 8%, var(--surface));
    box-shadow: none;
}

/* Banned badge - red outlined */
.badge-banned {
    color: #ef4444;
    border-color: color-mix(in srgb, #ef4444 55%, var(--border));
    background: color-mix(in srgb, #ef4444 8%, var(--surface));
    box-shadow: none;
}

/* Active badge - green outlined */
.badge-active {
    color: #10b981;
    border-color: color-mix(in srgb, #10b981 55%, var(--border));
    background: color-mix(in srgb, #10b981 8%, var(--surface));
    box-shadow: none;
}

/* ============================================================================
   Booking Payment Status Badges (matching admin dashboard)
   ============================================================================ */

/* Unpaid status - matches banned badge (red) */
.badge-unpaid {
    color: #ef4444;
    border-color: color-mix(in srgb, #ef4444 55%, var(--border));
    background: color-mix(in srgb, #ef4444 8%, var(--surface));
    box-shadow: none;
}

/* Paid status - matches active badge (green) */
.badge-paid,
.badge-succeeded {
    color: #10b981;
    border-color: color-mix(in srgb, #10b981 55%, var(--border));
    background: color-mix(in srgb, #10b981 8%, var(--surface));
    box-shadow: none;
}

/* Pending/Processing status - orange/warning */
.badge-pending,
.badge-processing {
    color: #f5961e;
    border-color: color-mix(in srgb, #f5961e 55%, var(--border));
    background: color-mix(in srgb, #f5961e 8%, var(--surface));
    box-shadow: none;
}

.th-filter{position:relative;display:inline-block}
.th-filter-btn{
  all:unset;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  color:inherit;
  font:inherit;
  letter-spacing:inherit;
  text-transform:inherit;
  opacity:.9;
}
.th-filter-btn:focus-visible{outline:2px solid var(--ring);outline-offset:3px;border-radius:10px}
.th-filter-value{opacity:.95}
.th-filter-caret{opacity:.7}

.th-filter-popover{
  position:absolute;
  top:calc(100% + .5rem);
  left:50%;
  transform:translateX(-50%);
  min-width: 160px;
  max-height: 220px;
  overflow:auto;
  display:none;
  padding:.4rem;
  border-radius:14px;
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow);
  z-index:50;
}
.th-filter.open .th-filter-popover{display:block}

.th-filter-opt{
  width:100%;
  text-align:left;
  background:transparent;
  border:0;
  color:var(--text);
  padding:.55rem .7rem;
  border-radius:12px;
  cursor:pointer;
}
.th-filter-opt:hover{background:var(--surface-2)}
.th-filter-opt[aria-selected="true"]{background:rgba(34,197,94,.18)}

/* Payment success: lock spot-details-list to a stable 2-column layout (no auto-fit) */
.payment-success .spot-details-list{
  grid-template-columns: 220px 1fr !important;
  gap: 16px 36px;
  align-items: baseline;
}

/* Payment success page – vertical rhythm (CSS owns spacing; no inline overrides) */
.payment-success .booking-success-header{
  text-align: center;
  margin-bottom: 5rem;   /* adjust: 4rem–6rem */
}

.payment-success .booking-success-header .form-title{
  text-align: center;
  margin-bottom: 0.5rem;
}

.payment-success .booking-summary{
  margin-bottom: 3.5rem;
}

.payment-success .booking-summary .h4{
  margin-bottom: 0.75rem;
}

.payment-success .cta-row{
  margin-top: 1.75rem;
}

/* ============================================================================
   Favorite heart button
   ============================================================================ */

.heart-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  margin: 0;
  color: #dc2626;
  line-height: 1;
  transition: transform 0.2s;
}

.heart-btn:hover {
  transform: scale(1.2);
}

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

.heart-btn:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================================================
   Earnings-estimator
   ============================================================================ */

.earnings-estimator .muted { margin: 0; } /* don’t inherit the big global 40px bottom margin */

.earnings-estimator__header { margin-bottom: 1.5rem; }
.earnings-estimator__title { margin: 0 0 .35rem; }
.earnings-estimator__subtitle { margin: 0; }

.earnings-estimator__grid{
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 980px){
  .earnings-estimator__grid{ grid-template-columns: 1fr; }
}

.earnings-estimator__inputs{
  display: grid;
  gap: 1.25rem;
}

.earnings-estimator__label{
  display: grid;
  gap: .6rem;
  font-weight: 600;
}

.earnings-estimator__label-text{
  font-weight: 700;
}

.earnings-estimator__money,
.earnings-estimator__unit{
  display: flex;
  align-items: center;
  gap: 10px;
}

.earnings-estimator__suffix{
  font-weight: 800;
  color: var(--muted);
  white-space: nowrap;
}

.earnings-estimator__slider-row{
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Range slider styled to behave like your other input fields (light + dark) */
.earnings-estimator__slider{
  width: 100%;
  accent-color: var(--accent);

  -webkit-appearance: none;
  appearance: none;

  height: 44px;                 /* input-like field height */
  padding: 0 12px;              /* space so thumb isn't flush to edges */

  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);

  outline: none;
}

/* Chrome/Safari track */
.earnings-estimator__slider::-webkit-slider-runnable-track{
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 12%, var(--surface-2));
}

/* Chrome/Safari thumb */
.earnings-estimator__slider::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;

  width: 22px;
  height: 22px;
  border-radius: 999px;

  margin-top: -7px; /* centers thumb on 8px track */
  background: var(--accent);
  border: 2px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: var(--shadow-1);
}

/* Firefox track */
.earnings-estimator__slider::-moz-range-track{
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 12%, var(--surface-2));
}

/* Firefox progress fill */
.earnings-estimator__slider::-moz-range-progress{
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 55%, var(--surface-2));
}

/* Firefox thumb */
.earnings-estimator__slider::-moz-range-thumb{
  width: 22px;
  height: 22px;
  border-radius: 999px;

  background: var(--accent);
  border: 2px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: var(--shadow-1);
}

/* Match your focus ring behavior */
.earnings-estimator__slider:focus-visible{
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.earnings-estimator__slider-value{
  min-width: 4ch;
  font-weight: 800;
  color: var(--text);
  text-align: right;
}

.earnings-estimator__help{
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.earnings-estimator__results{
  display: grid;
  gap: 14px;
}

.earnings-estimator__result-card{
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
  padding: 16px 18px;
}

.earnings-estimator__result-label{
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
  margin-bottom: 6px;
}

.earnings-estimator__result-value{
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.1;
}

.earnings-estimator__cta{
  margin-top: .5rem;
  display: grid;
  gap: 10px;
}

.earnings-estimator__fineprint{
  margin: 0;
  font-size: .95rem;
}

.earnings-estimator__label-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Day/Week segmented control */
.earnings-estimator__seg{
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.earnings-estimator__seg-btn{
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
}

.earnings-estimator__seg-btn.is-active{
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.card-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.card-cta__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-cta__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Hidden state */
.is-hidden {
  display: none;
}

/* Mobile: stack + full-width button */
@media (max-width: 720px) {
  .card-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .card-cta__actions .button {
    width: 100%;
  }
}

/* ============================================================================
   Flatpickr Custom Styling
   ============================================================================ */
.flatpickr-calendar {
  background: var(--surface-2, #1f2937) !important;
  border: 2px solid #121820 !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
  font-family: inherit !important;
  font-size: 14px !important;
}

.flatpickr-months {
  background: var(--surface-3, #374151) !important;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1)) !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 8px 0 !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
}

.flatpickr-month {
  color: var(--text, #f9fafb) !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
}

.flatpickr-current-month {
  font-size: 14px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: var(--surface-3, #374151) !important;
  color: var(--text, #f9fafb) !important;
  font-size: 14px !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  top: 0 !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 10px !important;
}

.flatpickr-weekdays {
  background: var(--surface-2, #1f2937) !important;
}

span.flatpickr-weekday {
  color: var(--text-muted, #9ca3af) !important;
  font-size: 13px !important;
}

.flatpickr-day {
  color: var(--text, #ffffff) !important;
  border-radius: 8px !important;
  font-size: 14px !important;
}

.flatpickr-calendar .dayContainer {
  padding: 15px;
  box-sizing: border-box;
}

.flatpickr-day:hover:not(.flatpickr-disabled) {
  background: var(--primary, #ffc000) !important;
  color: var(--surface-1, #111827) !important;
  border-color: var(--primary, #ffc000) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--primary, #ffc000) !important;
  color: var(--surface-1, #111827) !important;
  border-color: var(--primary, #ffc000) !important;
  font-weight: 600 !important;
}

.flatpickr-day.today {
  border: 1px solid var(--primary, #ffc000) !important;
  background: transparent !important;
}

.flatpickr-day.today:hover {
  background: var(--primary, #ffc000) !important;
  color: var(--surface-1, #111827) !important;
}

/* Disabled / past days: clearly muted */
.flatpickr-day.disabled,
.flatpickr-day.disabled:hover,
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: color-mix(in srgb, var(--text) 35%, transparent) !important;
  background: color-mix(in srgb, var(--surface-2) 65%, transparent) !important;
  border-color: transparent !important;
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}


.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--primary, #ffc000) !important;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  fill: var(--text, #f9fafb) !important;
}

/* Light mode adjustments */
[data-theme="light"] .flatpickr-calendar {
  background: var(--surface-1, #ffffff) !important;
}

[data-theme="light"] .flatpickr-months {
  background: var(--surface-2, #f3f4f6) !important;
}

[data-theme="light"] .flatpickr-weekdays {
  background: var(--surface-1, #ffffff) !important;
}

[data-theme="light"] .flatpickr-day {
  color: var(--text, #111827) !important;
}

[data-theme="light"] .flatpickr-current-month .flatpickr-monthDropdown-months {
  background: var(--surface-2, #f3f4f6) !important;
  color: var(--text, #111827) !important;
}

[data-theme="light"] .flatpickr-months .flatpickr-prev-month svg,
[data-theme="light"] .flatpickr-months .flatpickr-next-month svg {
  fill: var(--text, #111827) !important;
}

/* Flatpickr Year Dropdown */
.flatpickr-current-month .numInputWrapper {
  display: inline-block !important;
  width: 60px !important;
  margin-left: 4px !important;
}

.flatpickr-current-month .numInputWrapper input {
  background: var(--surface-3, #374151) !important;
  color: var(--text, #f9fafb) !important;
  border: none !important;
  font-size: 14px !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
}

.flatpickr-current-month .numInputWrapper:hover input {
  background: var(--surface-4, #4b5563) !important;
}

.flatpickr-current-month .numInputWrapper span {
  display: none !important;
}

/* Light mode */
[data-theme="light"] .flatpickr-current-month .numInputWrapper input {
  background: var(--surface-2, #f3f4f6) !important;
  color: var(--text, #111827) !important;
}

[data-theme="light"] .flatpickr-current-month .numInputWrapper:hover input {
  background: var(--surface-3, #e5e7eb) !important;
}

/* ============================================================================
   Custom Time Picker
   ============================================================================ */
.time-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface-2, #1f2937);
  border: 2px solid #121820;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 100;
  padding: 8px;
}

.time-picker-option {
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text, #ffffff);
  transition: background var(--transition-fast);
}

.time-picker-option:hover {
  background: var(--primary, #ffc000);
  color: var(--surface-1, #111827);
}

/* Light mode */
[data-theme="light"] .time-picker-dropdown {
  background: var(--surface-1, #ffffff);
}

[data-theme="light"] .time-picker-option {
  color: var(--text, #111827);
}

/* Scrollbar styling for time picker */
.time-picker-dropdown::-webkit-scrollbar {
  width: 8px;
}

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

.time-picker-dropdown::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 4px;
}

.time-picker-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

/* ============================================================================
   Toast notifications
   ============================================================================ */

#toast-container{
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 9999;

  display: flex;
  flex-direction: column;
  gap: .75rem;

  pointer-events: none;
  max-width: min(420px, calc(100vw - 2.5rem));
}

.toast{
  pointer-events: auto;

  display: flex;
  align-items: flex-start;
  gap: .75rem;

  padding: .9rem 1rem;
  border-radius: 14px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  color: var(--text);
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);

  transform: translateY(-6px);
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible{
  transform: translateY(0);
  opacity: 1;
}

html[data-theme="dark"] .toast{
  background: linear-gradient(
    180deg,
    rgba(30,36,46,0.92),
    rgba(18,22,29,0.92)
  );
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.toast__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: .35rem;
  flex: 0 0 auto;
}

.toast[data-type="success"] .toast__dot{ background: rgba(34,197,94,0.95); }
.toast[data-type="error"]   .toast__dot{ background: rgba(239,68,68,0.95); }
.toast[data-type="warning"] .toast__dot{ background: rgba(245,158,11,0.95); }
.toast[data-type="info"]    .toast__dot{ background: rgba(59,130,246,0.95); }

.toast__body{ flex: 1 1 auto; }

.toast__text{
  font-size: .95rem;
  line-height: 1.35;
}

.toast__close{
  margin-left: .5rem;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.75;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.toast__close:hover{ opacity: 1; }

.toast__close:focus-visible{
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ============================================================================
   NOTIFICATION BELL
   ============================================================================ */

.notif-wrap {
    position: relative;
    display: inline-block;
}

/* The bell button inherits .icon-button sizing/hover already */
.notif-trigger {
    position: relative;
}

/* Unread badge */
.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
    /* Sits on top of everything in the topbar */
    z-index: 10;
}

/* Dropdown panel */
.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(340px, 92vw);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
    z-index: 3000;
    overflow: hidden;
}

.notif-panel[hidden] {
    display: none !important;
}

.notif-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border);
}

.notif-panel__title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--text);
}

.notif-mark-all {
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background var(--transition-fast);
}

.notif-mark-all:hover {
    background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

/* List */
.notif-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    max-height: 340px;
    overflow-y: auto;
}

.notif-list::-webkit-scrollbar { width: 6px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 3px;
}

/* Empty state */
.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Individual notification item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--transition-fast);
    background: color-mix(in srgb, var(--surface-2) 60%, transparent);
    margin-bottom: 4px;
}

.notif-item:last-child { margin-bottom: 0; }

.notif-item:hover {
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.notif-item--read {
    background: transparent;
    opacity: 0.65;
}

.notif-item--read:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}

/* Coloured dot */
.notif-item__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-top: 5px;
    flex: 0 0 auto;
}

.notif-item__dot--success  { background: rgba(34,197,94,0.95); }
.notif-item__dot--error    { background: rgba(239,68,68,0.95); }
.notif-item__dot--warning  { background: rgba(245,158,11,0.95); }
.notif-item__dot--info     { background: rgba(59,130,246,0.95); }

.notif-item__body {
    flex: 1 1 auto;
    min-width: 0;
}

.notif-item__msg {
    margin: 0 0 3px;
    font-size: 0.88rem;
    line-height: 1.35;
    color: var(--text);
    word-break: break-word;
}

.notif-item__time {
    font-size: 0.75rem;
    color: var(--muted);
}

/* ============================================================================
   PHASE 1 ADDITIONS — classes used in templates but previously undefined
   Append these to the bottom of style.css
   ============================================================================ */

/* --- .form-subtitle (my_bookings.html) ------------------------------------ */
/* Used as a section heading inside cards, smaller than .form-title           */
.form-subtitle {
    margin: 0 0 1rem;
    font-weight: 700;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    letter-spacing: -0.01em;
    color: var(--text);
}

/* --- .map-tall (search_spot.html) ----------------------------------------- */
/* Taller map variant for the search page on large screens                    */
.map-tall {
    min-height: 620px;
}

/* --- .h4 (index.html, payments/success.html) ------------------------------ */
/* Utility class to style any element with h4-level type.                     */
/* Used on <h2 class="h4"> to get semantic heading + visual size.             */
.h4 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.5rem;
}

/* --- .error-message (register.html, my_account.html) ---------------------- */
/* Inline form error block. Replaces the <style> block in register.html       */
/* and the bare inline style in my_account.html.                              */
.error-message {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, #dc2626 12%, var(--surface));
    border: 1px solid color-mix(in srgb, #dc2626 35%, var(--border));
    border-radius: var(--radius-md);
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: pre-line;
}

/* --- .password-requirements (register.html) ------------------------------- */
/* Replaces the entire <style> block currently in register.html               */
.password-requirements {
    margin-top: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.password-requirements > p {
    color: var(--muted);
    margin: 0 0 0.75rem 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.password-requirements ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: none;
}

.password-requirements li {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.6;
    transition: color var(--transition-fast);
    position: relative;
    padding-left: 0.5rem;
}

.password-requirements li::before {
    content: '○';
    position: absolute;
    left: -1.25rem;
    font-weight: bold;
    transition: all var(--transition-fast);
}

.password-requirements li.valid {
    color: var(--text);
    font-weight: 600;
}

.password-requirements li.valid::before {
    content: '✓';
    color: var(--accent);
}

/* --- .theme-svg-icon (private_base.html, base.html) ----------------------- */
/* Currently defined in an inline <style> block in both base templates.       */
/* Moving here means the inline block in each can be removed entirely.        */
.theme-svg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.theme-svg-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html {
    scroll-behavior: auto !important;
}