@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(22, 27, 34, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent-blue: #58a6ff;
    --accent-purple: #bc8cff;
    --success: #3fb950;
    --danger: #f85149;
    --gradient-primary: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    --gradient-accent: linear-gradient(135deg, #7928CA 0%, #FF0080 100%);
    --gradient-blue: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-image: 
        radial-gradient(at 10% 20%, rgba(88, 166, 255, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 80%, rgba(188, 140, 255, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Glassmorphism Header */
header {
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

header nav {
    display: flex;
    gap: 24px;
}

header nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 20px;
}

header nav a:hover, header nav a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* Main Dashboard Wrapper */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.dashboard-header p {
    color: var(--text-secondary);
    margin: 5px 0 0 0;
}

/* Sleek Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    font-size: 14px;
}

.btn-primary {
    background: var(--gradient-blue);
    color: white;
    box-shadow: 0 4px 14px rgba(42, 82, 152, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 82, 152, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-danger {
    background: rgba(248, 81, 73, 0.15);
    color: var(--danger);
    border: 1px solid rgba(248, 81, 73, 0.3);
}

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

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 6px;
}

/* Glass Card Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 166, 255, 0.2);
    box-shadow: 0 12px 40px 0 rgba(88, 166, 255, 0.1);
}

.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    background-color: #000;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.card-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--card-border);
    padding-top: 15px;
    margin-top: auto;
    font-size: 12px;
    color: var(--text-secondary);
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(188, 140, 255, 0.15);
    color: var(--accent-purple);
}

/* Modals & Dialogs */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: #0d1117;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    width: 500px;
    max-width: 90%;
    padding: 30px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-backdrop.show .modal {
    transform: scale(1);
}

/* ── Bootstrap 5 conflict resolution ────────────────────────────────────────
   Bootstrap's .modal class sets: display:none, position:fixed, height:100%,
   overflow-y:auto, width:100%, top:0, left:0, z-index:1055.
   These properties silently override the admin custom modal styles and cause:
     • The dialog to be invisible (display:none not cleared)
     • The dialog to escape flexbox centering (position:fixed)
     • The dialog to fill the full screen height (height:100%)
   Using the child combinator (.modal-backdrop > .modal) gives specificity
   0,2,0 vs Bootstrap's 0,1,0, so these rules win in the cascade without
   needing !important or renaming classes.
──────────────────────────────────────────────────────────────────────────── */
.modal-backdrop > .modal {
    display: block;     /* Reset Bootstrap's display:none                            */
    position: relative; /* Reset Bootstrap's position:fixed → allows flex centering  */
    height: auto;       /* Reset Bootstrap's height:100%                             */
    width: 500px;       /* Re-assert custom width (Bootstrap sets width:100%)        */
    max-width: 90vw;
    overflow: visible;  /* Reset Bootstrap's overflow-y:auto                         */
    top: auto;          /* Reset Bootstrap's top:0                                   */
    left: auto;         /* Reset Bootstrap's left:0                                  */
    z-index: auto;      /* Reset Bootstrap's z-index:1055 (parent manages stacking)  */
    outline: none;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 22px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* Forms styling */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

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

/* File Upload input */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--card-border);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-wrapper:hover {
    border-color: var(--accent-blue);
    background: rgba(88, 166, 255, 0.02);
}

.file-upload-wrapper i {
    font-size: 40px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

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

/* Toast Message */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #161b22;
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--accent-blue);
    padding: 16px 24px;
    border-radius: 8px;
    color: var(--text-primary);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

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

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

/* ═══════════════════════════════════════════════════════════════════════════
   ADMIN PAGES — RESPONSIVE / MOBILE OPTIMISATION
   ─────────────────────────────────────────────────────────────────────────
   Breakpoints
     ≤ 768px  Tablet  — stack layouts, reduce padding, 2-col grid
     ≤ 576px  Mobile  — single-column, bottom-sheet modal, touch targets
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 768px) ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Tighter container padding */
    .container {
        padding: 20px 16px;
    }

    /* Dashboard header: stack title block above the CTA button */
    .dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 24px;
    }

    .dashboard-header h1 {
        font-size: 24px;
    }

    /* "Create New Tour" button spans full width when stacked */
    .dashboard-header > .btn,
    .dashboard-header .btn {
        width: 100%;
        justify-content: center;
    }

    /* Grid: allow 2-column layout down to 280px card width */
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

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

    /* Admin section: less padding */
    .admin-section {
        padding: 20px 16px;
        margin-top: 12px;
    }

    /* Modal: slightly wider on tablet */
    .modal-backdrop > .modal {
        width: min(480px, 94vw) !important;
        max-width: 94vw;
        padding: 26px 22px;
    }
}

/* ── Mobile (≤ 576px) ──────────────────────────────────────────────────────── */
@media (max-width: 576px) {

    /* ── Layout ─────────────────────────────────────────── */

    .container {
        padding: 14px 12px;
    }

    .admin-section {
        padding: 16px 12px;
        border-radius: 12px;
        margin-top: 8px;
    }

    .dashboard-header h1 {
        font-size: 20px;
    }

    .dashboard-header p {
        font-size: 13px;
    }

    /* ── Tour cards grid: single column ─────────────────── */

    .grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .card {
        padding: 18px 16px;
    }

    .card-title {
        font-size: 17px;
    }

    /* ── Card action buttons ─────────────────────────────── */

    /*
     * .card-actions is the wrapping div around "Edit Scenes",
     * "Settings", and the delete form. On mobile we make:
     *   - "Edit Scenes" spans full width (first row)
     *   - "Settings" and delete share the second row
     */
    .card-actions {
        flex-wrap: wrap;
        gap: 8px !important;
    }

    /* "Edit Scenes" primary button: full width */
    .card-actions > a.btn-primary {
        flex: 1 1 100%;
        justify-content: center;
    }

    /* Settings button: grow to fill remaining space */
    .card-actions > button.btn-secondary {
        flex: 1 1 auto;
        justify-content: center;
    }

    /* Delete form + button: fixed-width icon button */
    .card-actions > form {
        display: contents;   /* Participate in parent flex directly */
    }

    .card-actions > form > button.btn-danger {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ── Buttons: 44 px minimum touch target ─────────────── */

    .btn {
        padding: 11px 18px;
        font-size: 13px;
        min-height: 44px;
    }

    .btn-sm {
        padding: 10px 12px;
        font-size: 12px;
        min-height: 40px;
    }

    /* ── Modal → bottom sheet ─────────────────────────────── */

    /*
     * On narrow phones the centred modal dialog is hard to
     * interact with. Convert it to a bottom sheet that slides
     * up from the screen bottom — easier for thumbs.
     */
    .modal-backdrop {
        align-items: flex-end;      /* Anchor children to bottom            */
        padding: 0;
    }

    .modal-backdrop > .modal {
        width: 100vw !important;    /* Full screen width                    */
        max-width: 100vw;
        max-height: 90dvh;          /* Never taller than 90% of screen      */
        overflow-y: auto;
        border-radius: 18px 18px 0 0 !important;  /* Rounded top corners   */
        border-bottom: none;
        padding: 20px 18px 36px;    /* Extra bottom padding for home-bar    */
        /* Re-anchor animation: slide up from bottom instead of scale */
        transform: translateY(40px) !important;
        transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    }

    .modal-backdrop.show > .modal {
        transform: translateY(0) !important;
    }

    /* Drag handle indicator at top of bottom sheet */
    .modal-backdrop > .modal::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: rgba(255,255,255,0.2);
        border-radius: 2px;
        margin: 0 auto 20px auto;
    }

    /* Form controls: full width, larger tap area */
    .form-control {
        padding: 13px 14px;
        font-size: 15px;    /* Prevents iOS auto-zoom on focus (≥16px safe, 15px near) */
    }

    /* Checkbox label alignment */
    .form-group[style*="flex"] {
        align-items: flex-start !important;
    }

    input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-top: 2px;
        flex-shrink: 0;
    }

    /* Modal footer buttons: stack vertically */
    .modal > form > div[style*="justify-content: flex-end"] {
        flex-direction: column-reverse;
        gap: 8px !important;
    }

    .modal > form > div[style*="justify-content: flex-end"] > .btn {
        width: 100%;
        justify-content: center;
    }

    /* ── Toast notification: full-width strip ────────────── */

    .toast {
        left: 10px;
        right: 10px;
        bottom: 10px;
        font-size: 13px;
        padding: 12px 14px;
        border-radius: 10px;
    }

    /* ── Badge reposition on card ───────────────────────── */

    .card .badge {
        top: 14px !important;
        right: 14px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REDESIGNED ADMIN COMPONENTS — v2
   New visual system for manageVirtual.jsp + editor.jsp
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Stats Bar ─────────────────────────────────────────────────────────── */
.stats-bar {
    display: flex;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
}
.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 20px;
    gap: 4px;
    border-right: 1px solid var(--card-border);
    transition: background 0.2s ease;
    cursor: default;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: rgba(255, 255, 255, 0.03); }
.stat-number {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.stat-item.stat-published .stat-number { color: var(--success); }
.stat-item.stat-draft    .stat-number { color: var(--accent-purple); }

/* ── Section Heading ───────────────────────────────────────────────────── */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--card-border);
}
.section-heading h2 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

/* ── Tour Card Variants (published / draft left-border accent) ─────────── */
.card.card-published { border-left: 3px solid var(--success); }
.card.card-draft     { border-left: 3px solid var(--accent-purple); }

/* ── Card Header Row ───────────────────────────────────────────────────── */
.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.card-tour-id {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.55;
}

/* ── Card Action Structure ─────────────────────────────────────────────── */
.card-action-primary {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-bottom: 8px;
}
.card-action-secondary {
    display: flex;
    gap: 8px;
}
.card-action-secondary .btn        { flex: 1; justify-content: center; }
.card-action-secondary form        { flex: 0 0 auto; }
.card-action-secondary form .btn   { flex: none; }

/* ── Empty State Card ──────────────────────────────────────────────────── */
.empty-state-card {
    text-align: center;
    padding: 60px 40px;
    background: var(--card-bg);
    border: 1px dashed rgba(255, 255, 255, 0.07);
    border-radius: var(--border-radius);
}
.empty-state-icon {
    font-size: 56px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    opacity: 0.35;
}
.empty-state-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px 0;
}
.empty-state-card > p {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 auto 24px;
    max-width: 400px;
    line-height: 1.7;
}
.empty-checklist {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    margin-bottom: 4px;
}
.empty-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}
.empty-checklist-item i { font-size: 16px; flex-shrink: 0; }

/* ── Editor Header: 3-zone grid ─────────────────────────────────────────── */
header.editor-header {
    display: grid !important;           /* override admin.css flex header   */
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    padding: 0 20px !important;         /* override admin.css 40px padding  */
    height: 54px;
    min-height: 54px;
    background: rgba(11, 15, 25, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.editor-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    min-width: 0;
}
.editor-back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.editor-back-link:hover { color: var(--text-primary); }
.editor-back-link i { font-size: 11px; }
.editor-tour-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.editor-breadcrumb-sep {
    color: var(--text-secondary);
    opacity: 0.25;
    font-size: 20px;
    font-weight: 200;
    flex-shrink: 0;
}
.editor-breadcrumb-chip {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-blue);
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    padding: 3px 9px;
    border-radius: 4px;
    white-space: nowrap;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}
.editor-header-center {
    display: flex;
    justify-content: center;
    align-items: center;
}
.editor-header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

/* ── Mode Toggle Group (replaces pill-style buttons in header) ───────────── */
.mode-toggle-group {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}
.mode-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 34px;
}
.mode-toggle-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.mode-toggle-btn.active {
    background: rgba(88, 166, 255, 0.12);
    color: var(--accent-blue);
    border-color: rgba(88, 166, 255, 0.25);
}
/* Edit mode button gets purple accent when active */
#btn-edit-mode.active {
    background: rgba(188, 140, 255, 0.12);
    color: var(--accent-purple);
    border-color: rgba(188, 140, 255, 0.25);
}

/* ── Body layout for editor page (flexbox column so banner shifts layout) ── */
body.editor-page {
    height: 100dvh;
    overflow: hidden;
    display: flex !important;
    flex-direction: column !important;
}
/* Override viewer.css calc() height — flex child fills remaining space */
body.editor-page .editor-layout {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
}

/* ── Edit Mode Banner ──────────────────────────────────────────────────── */
.edit-mode-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 9px 18px;
    background: rgba(188, 140, 255, 0.07);
    border-bottom: 1px solid rgba(188, 140, 255, 0.2);
    font-size: 13px;
    color: var(--accent-purple);
    flex-shrink: 0;
    z-index: 89;
}
.edit-mode-banner.show { display: flex; }
.edit-mode-banner-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.edit-mode-banner-content strong { font-weight: 700; }

/* ── Sidebar: Sticky Action Header ────────────────────────────────────── */
.sidebar-sticky-header {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px 14px 12px;
    background: #0d1117;
    border-bottom: 1px solid var(--card-border);
    flex-shrink: 0;
}

/* ── Scene List: Ordinal Badge ─────────────────────────────────────────── */
.scene-ordinal {
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.scene-list-item.active .scene-ordinal {
    background: rgba(88, 166, 255, 0.2);
    color: var(--accent-blue);
}

/* ── Scene List: Larger Thumbnail ──────────────────────────────────────── */
.scene-list-item img {
    width: 80px !important;
    height: 50px !important;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
    pointer-events: none;   /* click handled by parent row */
}
.scene-list-item { cursor: pointer; }

/* ── Scene List: Properly-sized Action Buttons ─────────────────────────── */
.scene-list-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.scene-list-item-actions .btn {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    min-height: unset !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}
.scene-list-item-actions form { margin: 0; }

/* ── Editor Bottom Bar (replaces floating .editor-hud overlay) ──────────── */
.editor-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 18px;
    /* Gradient fades to transparent so panorama is visible behind */
    background: linear-gradient(to top, rgba(11, 15, 25, 0.82) 0%, transparent 100%);
    pointer-events: none;
}
.editor-bottom-bar > * { pointer-events: auto; }
.editor-bottom-scene-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(240, 246, 252, 0.85);
    background: rgba(11, 15, 25, 0.72);
    backdrop-filter: blur(8px);
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 280px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.editor-bottom-scene-info i { color: var(--accent-blue); flex-shrink: 0; }

/* ── Responsive overrides for editor header ────────────────────────────── */
@media (max-width: 768px) {
    header.editor-header {
        grid-template-columns: 1fr auto;
        padding: 0 14px !important;
    }
    .editor-header-right { display: none; }
    .editor-tour-name { max-width: 120px; }
    .editor-breadcrumb-chip { display: none; }

    .stats-bar { flex-wrap: wrap; }
    .stat-item { flex: 1 1 33%; border-bottom: 1px solid var(--card-border); }

    .empty-state-card { padding: 40px 20px; }
}

@media (max-width: 576px) {
    header.editor-header { grid-template-columns: 1fr; height: auto; padding: 10px 14px !important; }
    .editor-header-center { justify-content: flex-start; }
    .mode-toggle-btn { padding: 6px 10px; font-size: 12px; }

    .stat-item { padding: 12px 14px; }
    .stat-number { font-size: 24px; }
}
