﻿h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Map */
.map-container {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%; /* let flex drive final height */
}

.map-page {
    position: relative;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px);
    /* allow flex children to be sized correctly inside a flex container */
    min-height: 0;
}

/* "Loading map..." spinner shown over the map until the map and pins are ready */
.map-loading {
    position: absolute;
    inset: 0;
    z-index: 1100; /* above the Leaflet map and its controls */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.85);
    color: #444;
    font-size: 0.95rem;
}

/* Location panel — slides up from bottom */
.map-location-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    padding: 12px 20px 24px;
    z-index: 1000;
    transition: transform 0.3s ease;
    max-height: 50vh;
    overflow-y: auto;
}

.map-panel-handle {
    display: flex;
    justify-content: center;
    padding: 4px 0 12px;
    cursor: pointer;
}

.handle-bar {
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
}

.map-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

    .map-panel-header h2 {
        font-size: 1.2rem;
        margin: 0;
    }

.map-panel-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
}

.map-panel-description {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.map-panel-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

    .map-panel-actions .btn {
        flex: 1;
        min-width: 120px;
        font-size: 0.85rem;
    }

.map-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.map-nav-label {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

/* City selector */
.map-city-selector {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: white;
    border-radius: 8px;
    padding: 6px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Map pins */
.wh-pin {
    width: 28px;
    height: 28px;
    background: var(--pin-color, #3388ff);
    border: 3px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.wh-pin--visited {
    opacity: 0.65;
    filter: grayscale(0.6);
}

/* Map legend — collapsible key in the top-right corner */
.map-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    max-width: min(240px, calc(100% - 80px));
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-size: 0.85rem;
    overflow: hidden;
}

.map-legend-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 6px 10px;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 600;
    color: #333;
    cursor: pointer;
}

.map-legend-toggle:focus-visible {
    outline: 2px solid #3388ff;
    outline-offset: -2px;
}

.map-legend-dots {
    display: inline-flex;
}

.map-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid white;
    background: var(--pin-color, #3388ff);
    margin-left: -3px;
}

.map-legend-dot:first-child {
    margin-left: 0;
}

.map-legend-chevron {
    margin-left: auto;
    font-size: 0.75rem;
    color: #777;
}

.map-legend-list {
    list-style: none;
    margin: 0;
    padding: 2px 10px 8px;
    border-top: 1px solid #eee;
}

.map-legend-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    line-height: 1.2;
}

/* Miniature version of .wh-pin */
.map-legend-swatch {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    background: var(--pin-color, #3388ff);
    border: 2px solid white;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.35);
}

.map-legend-swatch--visited {
    background: #3388ff;
    opacity: 0.65;
    filter: grayscale(0.6);
}

.map-legend-visited {
    color: #666;
}

/* Leaflet popup */
.wh-popup {
    text-align: center;
    min-width: 160px;
}

.wh-popup-distance {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1D9E75;
    margin: 4px 0 8px;
}

.wh-popup-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.wh-popup-btn {
    padding: 4px 10px;
    background: #1D9E75;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82rem;
    text-decoration: none;
    display: inline-block;
}

.wh-popup-btn--outline {
    background: white;
    color: #1D9E75;
    border: 1px solid #1D9E75;
}

/* Distance badge */
.map-distance-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0faf6;
    border: 1px solid #1D9E75;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 12px;
}

.distance-arrow {
    font-size: 1.4rem;
    line-height: 1;
}

.distance-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1D9E75;
}

.distance-dir {
    font-size: 0.9rem;
    color: #555;
}

.map-locating {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 12px;
}

/* User position marker */
.wh-user-pin {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wh-user-dot {
    width: 16px;
    height: 16px;
    background: #4A90E2;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(74,144,226,0.25);
    position: absolute;
}

/* Fills the pin and turns around its centre; the ▲ sits at the top edge.
   No CSS transition: compass.js already smooths the movement. */
.wh-user-arrow {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1;
    color: #4A90E2;
    transform-origin: center;
    opacity: 0;
}

.wh-user-arrow--known {
    opacity: 1;
}

/* Navigation pointer in the location panel; compass.js sets its rotation */
.nav-pointer {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1D9E75;
    transform-origin: center;
}

.nav-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nav-text-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.nav-mode {
    font-size: 0.75rem;
    color: #666;
}

.nav-compass-enable {
    margin: -4px 0 12px;
}

/* Scan page */
.scan-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    padding: 24px;
    text-align: center;
}

.scan-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.scan-hint {
    color: #555;
    margin-bottom: 16px;
    max-width: 300px;
}

/* Camera viewport */
.scan-viewport {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

    .scan-viewport video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Corner markers overlay */
.scan-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.scan-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: #1D9E75;
    border-style: solid;
}

    .scan-corner.tl {
        top: 12px;
        left: 12px;
        border-width: 3px 0 0 3px;
    }

    .scan-corner.tr {
        top: 12px;
        right: 12px;
        border-width: 3px 3px 0 0;
    }

    .scan-corner.bl {
        bottom: 12px;
        left: 12px;
        border-width: 0 0 3px 3px;
    }

    .scan-corner.br {
        bottom: 12px;
        right: 12px;
        border-width: 0 3px 3px 0;
    }

/* Loading spinner */
.scan-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #1D9E75;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ── Location page ─────────────────────────────────────────── */

.location-loading,
.location-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    gap: 12px;
    text-align: center;
    padding: 24px;
}

.location-icon {
    font-size: 3.5rem;
}

/* Hero */
.location-hero {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.location-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.65));
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}

.location-back {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    align-self: flex-start;
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 20px;
}

.location-hero-content {
    color: white;
}

.location-city {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
    margin: 0 0 4px;
}

.location-hero-content h1 {
    margin: 0 0 4px;
    font-size: 1.6rem;
    line-height: 1.2;
}

.location-tagline {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tabs */
.location-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    background: white;
    position: sticky;
    top: 56px; /* below nav bar */
    z-index: 100;
}

.location-tab {
    flex: 1;
    padding: 12px 4px;
    border: none;
    background: none;
    font-size: 0.82rem;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}

    .location-tab.active {
        color: #1D9E75;
        border-bottom-color: #1D9E75;
        font-weight: 600;
    }

/* Content area */
.location-content {
    padding: 20px 16px 100px; /* bottom padding for action bar */
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.location-empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

/* History / Art cards */
.location-content-card {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #f0f0f0;
}

    .location-content-card:last-child {
        border-bottom: none;
    }

    .location-content-card h2 {
        font-size: 1.2rem;
        margin: 0 0 12px;
        color: #1a1a1a;
    }

.location-content-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 14px;
    max-height: 260px;
    object-fit: cover;
}

.location-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333;
}

    .location-body p {
        margin: 0 0 12px;
    }

        .location-body p:last-child {
            margin-bottom: 0;
        }

/* Facts grid */
.location-facts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .location-facts-grid {
        grid-template-columns: 1fr;
    }
}

.location-fact-card {
    background: #f8fffe;
    border: 1px solid #d0f0e6;
    border-radius: 10px;
    padding: 16px;
}

    .location-fact-card h3 {
        font-size: 0.95rem;
        margin: 0 0 8px;
        color: #1D9E75;
    }

/* Shopping */
.location-shopping-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.location-shop-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px 16px;
    gap: 12px;
}

.location-shop-info {
    flex: 1;
}

    .location-shop-info h3 {
        font-size: 1rem;
        margin: 0 0 4px;
    }

    .location-shop-info p {
        font-size: 0.85rem;
        color: #666;
        margin: 4px 0 0;
    }

.location-shop-category {
    font-size: 0.75rem;
    background: #f0faf6;
    color: #1D9E75;
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
}

.location-shop-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.location-shop-distance {
    font-size: 0.82rem;
    color: #888;
    white-space: nowrap;
}

/* Nearby shops are links to the shop's own page */
.location-shop-card--link {
    color: inherit;
    text-decoration: none;
}

    .location-shop-card--link:hover {
        border-color: #d81b60;
        color: inherit;
    }

    .location-shop-card--link .location-shop-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-top: 8px;
    }

.location-shop-deals {
    font-size: 0.8rem;
    font-weight: 600;
    color: #d81b60;
    background: #fdecf3;
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Deals tab */
.location-deals-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.location-deal-card {
    position: relative;
    background: white;
    border: 1px dashed #d81b60;
    border-radius: 10px;
    padding: 16px;
}

.location-deal-card--sponsored {
    border-style: solid;
    background: #fffafc;
}

    .location-deal-card h3 {
        font-size: 1.05rem;
        margin: 0 0 8px;
        padding-right: 80px; /* room for the Sponsored label */
    }

.location-deal-sponsored {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a8a8a;
}

.location-deal-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: #fdecf3;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
}

    .location-deal-code span {
        font-size: 0.75rem;
        color: #666;
    }

    .location-deal-code strong {
        font-size: 1.4rem;
        letter-spacing: 0.08em;
        color: #d81b60;
        word-break: break-all;
    }

.location-deal-valid {
    font-size: 0.8rem;
    color: #888;
    margin: 8px 0 0;
}

/* Bottom action bar */
.location-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 12px 16px;
    display: flex;
    gap: 10px;
    z-index: 200;
}

    .location-action-bar .btn {
        flex: 1;
    }

/* ── Admin ─────────────────────────────────────────────────── */

.admin-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

/* Sidebar */
.admin-sidebar {
    width: 200px;
    background: #1a1a2e;
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 0 0 16px;
}

.admin-sidebar-header {
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

    .admin-sidebar-header h2 {
        margin: 0 0 4px;
        font-size: 1.1rem;
        color: #1D9E75;
    }

    .admin-sidebar-header p {
        margin: 0;
        font-size: 0.75rem;
        opacity: 0.6;
        word-break: break-all;
    }

.admin-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-nav-item {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    width: 100%;
    transition: all 0.15s;
}

    .admin-nav-item:hover {
        background: rgba(255,255,255,0.08);
        color: white;
    }

    .admin-nav-item.active {
        background: #1D9E75;
        color: white;
    }

.admin-nav-item--logout {
    color: rgba(255,255,255,0.4);
    margin: 8px;
    width: auto;
}

/* Main */
.admin-main {
    flex: 1;
    padding: 24px;
    overflow: auto;
    background: #f8f9fa;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

    .admin-section-header h2 {
        margin: 0;
        font-size: 1.3rem;
    }

.admin-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* Table */
.admin-table-wrap {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

    .admin-table th {
        background: #f1f3f5;
        padding: 10px 14px;
        text-align: left;
        font-weight: 600;
        color: #555;
        border-bottom: 1px solid #e0e0e0;
    }

    .admin-table td {
        padding: 10px 14px;
        border-bottom: 1px solid #f0f0f0;
        vertical-align: middle;
    }

    .admin-table tr:last-child td {
        border-bottom: none;
    }

    .admin-table tr:hover td {
        background: #fafafa;
    }

.admin-qr {
    font-size: 0.75rem;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-all;
}

.admin-type-badge {
    background: #e8f5f0;
    color: #1D9E75;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.78rem;
}

/* Buttons */
.admin-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.15s;
}

    .admin-btn:hover {
        background: #f5f5f5;
    }

.admin-btn--primary {
    background: #1D9E75;
    color: white;
    border-color: #1D9E75;
}

    .admin-btn--primary:hover {
        background: #178a64;
    }

.admin-btn--danger {
    color: #dc3545;
    border-color: #dc3545;
}

    .admin-btn--danger:hover {
        background: #dc3545;
        color: white;
    }

.admin-btn--sm {
    padding: 4px 10px;
    font-size: 0.8rem;
    margin-right: 4px;
}

.admin-btn--full {
    width: 100%;
    padding: 12px;
}

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

/* Forms */
.admin-form-group {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .admin-form-group label {
        font-size: 0.85rem;
        font-weight: 500;
        color: #444;
    }

.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.admin-form-check {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.admin-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

    .admin-input:focus {
        outline: none;
        border-color: #1D9E75;
        box-shadow: 0 0 0 3px rgba(29,158,117,0.1);
    }

.admin-textarea {
    resize: vertical;
    font-family: monospace;
    font-size: 0.85rem;
    min-height: 180px;
}

/* Modal */
.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.admin-modal--wide {
    max-width: 700px;
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

    .admin-modal-header h3 {
        margin: 0;
    }

.admin-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 4px;
}

.admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

/* Alerts */
.admin-alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 14px;
}

.admin-alert--error {
    background: #fff0f0;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

/* Login page */
.admin-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f0f2f5;
}

.admin-login-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

    .admin-login-card h1 {
        margin: 0 0 4px;
        color: #1D9E75;
    }

.admin-login-subtitle {
    color: #888;
    margin: 0 0 24px;
    font-size: 0.9rem;
}

.admin-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    color: #888;
}

/* ── Auth pages ────────────────────────────────────────────── */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    background: #f0f2f5;
    padding: 24px;
}

.auth-card {
    background: white;
    padding: 36px 40px;
    border-radius: 14px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

.auth-logo {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 8px;
}

.auth-card h1 {
    text-align: center;
    margin: 0 0 4px;
    font-size: 1.5rem;
}

.auth-subtitle {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin: 0 0 24px;
}

/* Google button */
.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
    margin-bottom: 16px;
}

    .auth-google-btn:hover {
        background: #f5f5f5;
        color: #333;
    }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: #bbb;
    font-size: 0.8rem;
}

    .auth-divider::before,
    .auth-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #e8e8e8;
    }

/* Form */
.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

    .auth-form-group label {
        font-size: 0.85rem;
        font-weight: 500;
        color: #444;
    }

.auth-input {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

    .auth-input:focus {
        outline: none;
        border-color: #1D9E75;
        box-shadow: 0 0 0 3px rgba(29,158,117,0.1);
    }

/* Button */
.auth-btn {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 16px;
}

.auth-btn--primary {
    background: #1D9E75;
    color: white;
}

    .auth-btn--primary:hover {
        background: #178a64;
    }

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

/* Alert */
.auth-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.auth-alert--error {
    background: #fff0f0;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}

/* Switch link */
.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

    .auth-switch a {
        color: #1D9E75;
        text-decoration: none;
        font-weight: 500;
    }

.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Content area fills the space beside the sidebar (otherwise it shrinks to its content width on desktop) */
main {
    flex: 1;
    min-width: 0;
}

.sidebar {
    /*background-image: linear-gradient(180deg, #1a1a2e 0%, #16213e 70%);*/
        background-color: blue;
}

/* Menu links: white on the blue menu */
.sidebar .nav-link {
    color: #fff;
}

    .sidebar .nav-link:hover,
    .sidebar .nav-link:focus-visible {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.15);
        border-radius: 4px;
    }

    /* The page you're on */
    .sidebar .nav-link.active {
        color: #fff;
        font-weight: 600;
        background-color: rgba(255, 255, 255, 0.25);
        border-radius: 4px;
    }

.sidebar .nav-divider {
    border-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

/* Home page: room between the header and the headline */
.home-hero {
    padding-top: 1.5rem;
}

/* Signed-in user's email above the page content */
.signed-in-as {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 260px;
        height: 100vh;
        position: sticky;
        top: 0;
    }
}

/* ── Subscribe page ────────────────────────────────────────── */

.subscribe-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    background: #f0f2f5;
    padding: 24px;
}

.subscribe-card {
    background: white;
    padding: 36px 40px;
    border-radius: 14px;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    text-align: center;
}

.subscribe-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.subscribe-card h1 {
    margin: 0 0 8px;
    font-size: 1.6rem;
}

.subscribe-subtitle {
    color: #666;
    margin: 0 0 24px;
    line-height: 1.6;
}

.subscribe-features {
    text-align: left;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.subscribe-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.feature-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.subscribe-feature strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.subscribe-feature p {
    margin: 0;
    font-size: 0.83rem;
    color: #888;
}

.subscribe-price {
    margin-bottom: 20px;
}

.price-amount {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1D9E75;
}

.price-period {
    font-size: 1rem;
    color: #888;
}

.subscribe-btn {
    display: block;
    width: 100%;
    padding: 13px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 10px;
    border: none;
    transition: all 0.15s;
}

.subscribe-btn--primary {
    background: #1D9E75;
    color: white;
}

    .subscribe-btn--primary:hover {
        background: #178a64;
        color: white;
    }

.subscribe-btn--outline {
    background: white;
    color: #1D9E75;
    border: 1px solid #1D9E75;
}

    .subscribe-btn--outline:hover {
        background: #f0faf6;
    }

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

/* Visitor pass choices: name on the left, price on the right */
.pass-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 18px;
    padding-right: 18px;
    gap: 12px;
}

.pass-option--static {
    border: 1px solid #d7eee5;
    border-radius: 8px;
    padding-top: 11px;
    padding-bottom: 11px;
    margin-bottom: 10px;
}

.pass-name {
    font-weight: 500;
}

.pass-price {
    font-weight: 700;
    white-space: nowrap;
}

.subscribe-active {
    background: #f0faf6;
    color: #1D9E75;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-weight: 500;
}

.subscribe-cancel-note {
    font-size: 0.8rem;
    color: #aaa;
    margin: 8px 0 0;
}

.subscribe-error {
    color: #c0392b;
    font-size: 0.875rem;
    margin-top: 8px;
}

.subscribe-note {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 12px;
}

/* Paywall */
.location-paywall {
    text-align: center;
    padding: 48px 24px;
}

.paywall-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.location-paywall h2 {
    margin: 0 0 8px;
}

.location-paywall p {
    color: #666;
    margin-bottom: 20px;
}

.paywall-note {
    margin-top: 12px;
    font-size: 0.875rem;
    color: #888;
}

.subscribe-terms {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    text-align: left;
    font-size: 0.875rem;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Admin mobile ──────────────────────────────────────────── */

@media (max-width: 640px) {

    /* Stack layout: sidebar becomes a top header + tab bar */
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        flex-direction: column;
        padding: 0;
    }

    .admin-sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 16px;
    }

        .admin-sidebar-header h2 {
            font-size: 1rem;
        }

    /* Turn the nav into a horizontal tab strip */
    .admin-nav {
        flex-direction: row;
        padding: 0;
        gap: 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .admin-nav-item {
        flex: 1;
        text-align: center;
        padding: 10px 4px;
        border-radius: 0;
        font-size: 0.82rem;
        border-bottom: 3px solid transparent;
    }

        .admin-nav-item.active {
            background: none;
            border-bottom-color: #1D9E75;
            color: #1D9E75;
        }

    /* Hide sign-out from the sidebar footer; show it inline in the header */
    .admin-nav-item--logout {
        display: none;
    }

    /* Add sign-out back as a small header button — add this class in the Razor */
    .admin-sidebar-signout {
        display: flex;
        align-items: center;
    }

    /* Main area */
    .admin-main {
        padding: 14px 12px;
    }

    /* Replace table rows with stacked cards */
    .admin-table-wrap {
        box-shadow: none;
        background: none;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table,
    .admin-table tbody,
    .admin-table tr,
    .admin-table td {
        display: block;
        width: 100%;
    }

        .admin-table tr {
            background: white;
            border-radius: 10px;
            padding: 12px 14px;
            margin-bottom: 8px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.07);
            border: none;
        }

        .admin-table td {
            padding: 3px 0;
            border: none;
            font-size: 0.85rem;
        }

            /* Label each cell using data-label on the <td> */
            .admin-table td[data-label]::before {
                content: attr(data-label) ": ";
                font-weight: 600;
                font-size: 0.75rem;
                color: #888;
                text-transform: uppercase;
                letter-spacing: 0.03em;
            }

            /* Actions cell: no label prefix, just lay out buttons */
            .admin-table td:last-child {
                padding-top: 10px;
                border-top: 1px solid #f0f0f0;
                margin-top: 8px;
                display: flex;
                gap: 6px;
            }

                .admin-table td:last-child::before {
                    display: none;
                }

    .admin-btn--sm {
        flex: 1;
        text-align: center;
        padding: 7px 0;
        font-size: 0.82rem;
    }

    /* Filter row */
    .admin-filter {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Modals: slide up from bottom instead of floating centered */
    .admin-modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .admin-modal,
    .admin-modal--wide {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        padding: 20px 16px 32px;
    }

        /* Add a drag handle above the modal header */
        .admin-modal::before {
            content: '';
            display: block;
            width: 36px;
            height: 4px;
            background: #ddd;
            border-radius: 2px;
            margin: 0 auto 16px;
        }

    /* Form rows: single column on mobile */
    .admin-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* Modal actions: full-width stacked buttons */
    .admin-modal-actions {
        flex-direction: row;
    }

        .admin-modal-actions .admin-btn {
            flex: 1;
        }
}
.admin-coords-labelrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.admin-btn-locate {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: #e8f5f0;
    color: #0F6E56;
    border: 1px solid #9FE1CB;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

    .admin-btn-locate:hover:not(:disabled) {
        background: #d0ede3;
    }

    .admin-btn-locate:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.admin-locate-dot {
    width: 7px;
    height: 7px;
    background: #1D9E75;
    border-radius: 50%;
    animation: locate-pulse 1s ease-in-out infinite;
    display: inline-block;
}

@keyframes locate-pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.25;
    }
}

.admin-input--located {
    border-color: #1D9E75 !important;
    background: #f0faf6;
}

.admin-coords-hint {
    font-size: 0.78rem;
    color: #0F6E56;
    margin-top: 4px;
}

.admin-modal--confirm {
    max-width: 380px;
}

.admin-confirm-message {
    color: #555;
    font-size: 0.9rem;
    margin: 0 0 8px;
    line-height: 1.5;
}

/* Arrival banner */
.map-arrival-banner {
    background: linear-gradient(135deg, #1D9E75, #0d6e52);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    color: white;
    position: relative;
    overflow: hidden;
}

.arrival-pulse {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.2;
    }
}

.arrival-text strong {
    font-size: 1rem;
    display: block;
    margin-bottom: 2px;
}

.arrival-text p {
    margin: 0 0 12px;
    font-size: 0.82rem;
    opacity: 0.85;
}

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

.arrival-btn {
    background: white;
    color: #1D9E75;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.arrival-dismiss {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px;
}

/* Arrived marker pin */
.wh-pin--arrived {
    background: #ffd700 !important; /* gold — distinct from the orange History (With Audio Track) pins */
    animation: arrived-bounce 0.6s ease infinite alternate;
}

@keyframes arrived-bounce {
    from {
        transform: rotate(-45deg) translateY(0);
    }

    to {
        transform: rotate(-45deg) translateY(-4px);
    }
}

/* Arrived popup */
.wh-popup-arrived {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1D9E75;
    margin: 4px 0 8px;
}

/* ── Media Viewer ───────────────────────────────────────────── */

.media-viewer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

/* Images */
.media-image-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.media-image {
    width: 100%;
    border-radius: 8px;
    max-height: 300px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.15s;
}

    .media-image:hover {
        opacity: 0.92;
    }

.media-caption {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.media-description {
    font-size: 0.8rem;
    color: #888;
    margin: 0;
}

/* Audio */
.media-audio-wrap {
    background: #f8fffe;
    border: 1px solid #d0f0e6;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.media-audio-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1D9E75;
    margin: 0;
}

.media-audio {
    width: 100%;
    height: 40px;
    border-radius: 6px;
}

.media-download-link {
    font-size: 0.8rem;
    color: #1D9E75;
    text-decoration: none;
    align-self: flex-start;
}

    .media-download-link:hover {
        text-decoration: underline;
    }

/* Documents */
.media-document-wrap {
}

.media-document-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: white;
}

.media-doc-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.media-doc-info {
    flex: 1;
    min-width: 0;
}

.media-doc-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-doc-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.media-doc-btn {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    background: #1D9E75;
    color: white;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.media-doc-btn--outline {
    background: white;
    color: #1D9E75;
    border: 1px solid #1D9E75;
}

/* Lightbox */
.media-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lightbox-content--wide {
    width: 90vw;
    height: 90vh;
}

.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 6px;
}

.lightbox-caption {
    font-weight: 500;
    margin: 0;
}

.lightbox-description {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.lightbox-download {
    font-size: 0.85rem;
    color: #1D9E75;
    text-decoration: none;
    align-self: flex-start;
}

.media-pdf-frame {
    width: 100%;
    flex: 1;
    border: none;
    border-radius: 6px;
    min-height: 500px;
}

/* Admin media list */
.admin-media-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.admin-media-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
}

.admin-media-icon {
    font-size: 1.2rem;
}

.admin-media-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

    .admin-media-info span {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.admin-media-type {
    font-size: 0.75rem !important;
    color: #888;
}

.admin-media-add {
    background: #f8fffe;
    border: 1px dashed #1D9E75;
    border-radius: 8px;
    padding: 14px;
    margin-top: 8px;
}
/* ── Admin statistics ─────────────────────────────────────── */
.admin-stats-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .admin-stats-controls .admin-input {
        width: auto;
    }

.admin-stats-note,
.admin-stats-hint {
    font-size: 0.82rem;
    color: #666;
    margin: 0 0 16px;
}

.admin-stats-hint {
    margin: 10px 0 0;
}

.admin-stat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.admin-stat-tile {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-stats-card .admin-stat-tile {
    box-shadow: none;
    background: #f8f9fa;
}

.admin-stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #212529;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.admin-stat-label {
    font-size: 0.8rem;
    color: #666;
}

.admin-stats-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    padding: 16px;
    margin-bottom: 16px;
}

    .admin-stats-card h3 {
        font-size: 1rem;
        margin: 0 0 12px;
    }

    .admin-stats-card .admin-table-wrap {
        box-shadow: none;
        border: 1px solid #eee;
    }

.admin-stats-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: baseline;
}

.admin-table--stats td,
.admin-table--stats th {
    font-variant-numeric: tabular-nums;
}

.admin-stats-muted td {
    color: #999;
}

.admin-stats-more {
    margin-top: 10px;
}

/* Visitors-per-day bars: grey total, blue share with a pass */
.admin-stats-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 120px;
    border-bottom: 1px solid #ddd;
}

.admin-stats-bar {
    flex: 1 1 0;
    min-width: 2px;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.admin-stats-bar-total {
    width: 100%;
    background: #ced4da;
    border-radius: 3px 3px 0 0;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    min-height: 1px;
}

.admin-stats-bar-pass {
    width: 100%;
    background: #0d6efd;
}

.admin-stats-chart-axis {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.75rem;
    color: #666;
    margin-top: 6px;
}

.admin-stats-legend .sw {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin: 0 4px 0 10px;
    vertical-align: -1px;
}

.admin-stats-legend .sw--all { background: #ced4da; }
.admin-stats-legend .sw--pass { background: #0d6efd; }

/* Pass funnel */
.admin-funnel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-funnel-row {
    display: grid;
    grid-template-columns: minmax(140px, 260px) 1fr 80px;
    gap: 12px;
    align-items: center;
    font-size: 0.875rem;
}

.admin-funnel-track {
    background: #f1f3f5;
    border-radius: 4px;
    height: 14px;
    overflow: hidden;
}

.admin-funnel-fill {
    display: block;
    height: 100%;
    background: #0d6efd;
    border-radius: 4px;
}

.admin-funnel-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

    .admin-funnel-value small {
        color: #888;
        font-weight: 400;
        margin-left: 4px;
    }

@media (max-width: 640px) {
    .admin-section-header:has(.admin-stats-controls) {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Stats tables have no actions column, so the last cell is an ordinary value */
    .admin-table--stats td:last-child {
        display: block;
        border-top: none;
        margin-top: 0;
        padding-top: 3px;
    }

        .admin-table--stats td:last-child::before {
            display: inline;
        }

    .admin-funnel-row {
        grid-template-columns: 1fr auto;
    }

    .admin-funnel-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* ── Terms, refunds and privacy page ───────────────────────── */

.policies-page {
    max-width: 760px;
    padding: 1.5rem 0 3rem;
    line-height: 1.6;
}

.policies-page h2 {
    margin-top: 2rem;
    font-size: 1.35rem;
    scroll-margin-top: 1rem;
}

.policies-updated {
    color: #6c757d;
    font-size: 0.9rem;
}

.policies-toc {
    margin: 1rem 0;
    font-size: 0.95rem;
}

.subscribe-policies {
    margin: 20px 0 0;
    font-size: 0.85rem;
    color: #6c757d;
}
