/* ═══════════════════════════════════════════════════════════════════════════
   Transfer — Design System
   Dark mode premium, inspiré NLE (Premiere Pro / DaVinci / Frame.io)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 1. Google Fonts fallback ───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── 2. Variables CSS (Design Tokens) ───────────────────────────────────── */
:root {
    /* Couleurs de fond */
    --bg-0:           #07090D;   /* fond le plus sombre — body */
    --bg-1:           #0D0F14;   /* fond principal */
    --bg-2:           #141720;   /* panneaux, cartes */
    --bg-3:           #1C2030;   /* éléments surélevés */
    --bg-4:           #242838;   /* hover, focus, active */
    --bg-5:           #2E3348;   /* sélectionné */

    /* Accents */
    --accent:         #4A9EFF;   /* bleu électrique — action principale */
    --accent-dim:     #2A6FCC;   /* bleu foncé */
    --accent-glow:    rgba(74, 158, 255, 0.18);
    --accent-warm:    #FF6B4A;   /* orange — alertes / danger */
    --accent-green:   #3DDC84;   /* succès / résolu */
    --accent-yellow:  #FFD166;   /* avertissement */

    /* Texte */
    --text-1:         #F0F2F8;   /* primaire */
    --text-2:         #A8B0C4;   /* secondaire */
    --text-3:         #5A6478;   /* muet */
    --text-4:         #3A4258;   /* très muet */

    /* Bordures */
    --border-1:       #1E2436;   /* très subtile */
    --border-2:       #2A3040;   /* normale */
    --border-3:       #3A4258;   /* visible */

    /* Timeline */
    --timeline-bg:    #050709;
    --timeline-ruler: #1A1E2A;
    --timeline-head:  var(--accent);
    --timeline-lane-height: 18px;
    --marker-size:    10px;

    /* Typographie */
    --font-sans:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:      'Courier New', 'Consolas', monospace;

    /* Tailles de fonte */
    --fs-xs:    11px;
    --fs-sm:    12px;
    --fs-base:  13px;
    --fs-md:    14px;
    --fs-lg:    16px;
    --fs-xl:    20px;
    --fs-2xl:   26px;

    /* Espacements */
    --space-1:  4px;
    --space-2:  8px;
    --space-3:  12px;
    --space-4:  16px;
    --space-5:  20px;
    --space-6:  24px;

    /* Rayons */
    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    --radius-full: 9999px;

    /* Transitions */
    --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
    --t-fast:     120ms;
    --t-normal:   220ms;
    --t-slow:     380ms;

    /* Layout Review */
    --panel-left-w:    220px;
    --panel-right-w:   320px;
    --header-h:        48px;
    --timeline-h:      88px;
    --topbar-h:        40px;  /* barre de breadcrumb Review */
}

/* ─── 3. Reset & Base ────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent !important;
}

:focus:not(:focus-visible) {
    outline: none !important;
}

html {
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-1);
    background: var(--bg-0);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--t-fast) var(--ease);
}
a:hover { color: #fff; }

button {
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: var(--font-sans);
}

img { display: block; max-width: 100%; }

/* ─── 4. Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-3); }

/* ─── 5. Sélection ───────────────────────────────────────────────────────── */
::selection {
    background: var(--accent-dim);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. COMPOSANTS PARTAGÉS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 7px var(--space-4);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: background var(--t-fast) var(--ease),
                color var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease),
                transform var(--t-fast) var(--ease);
    user-select: none;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover:not(:disabled) {
    background: #62AEFF;
    box-shadow: 0 0 20px var(--accent-glow);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-3);
    color: var(--text-2);
    border: 1px solid var(--border-2);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--bg-4);
    color: var(--text-1);
    border-color: var(--border-3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-3);
    border: 1px solid transparent;
}
.btn-ghost:hover:not(:disabled) {
    background: var(--bg-3);
    color: var(--text-1);
    border-color: var(--border-2);
}

.btn-danger {
    background: rgba(255, 74, 107, 0.12);
    color: #FF6B88;
    border: 1px solid rgba(255, 74, 107, 0.2);
}
.btn-danger:hover:not(:disabled) {
    background: rgba(255, 74, 107, 0.22);
    border-color: rgba(255, 74, 107, 0.4);
}

.btn-success {
    background: rgba(61, 220, 132, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(61, 220, 132, 0.2);
}
.btn-success:hover:not(:disabled) {
    background: rgba(61, 220, 132, 0.22);
}

.btn-icon {
    padding: 6px;
    border-radius: var(--radius-sm);
    width: 28px;
    height: 28px;
    justify-content: center;
}

.btn-icon-sm {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.12s ease;
}
.btn-icon-sm:hover {
    background: var(--bg-4);
    color: var(--text-1);
}

.btn-sm { padding: 4px 10px; font-size: var(--fs-xs); }
.btn-full { width: 100%; justify-content: center; }

/* Formulaires */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-input {
    width: 100%;
    padding: 9px var(--space-3);
    background: var(--bg-1);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text-1);
    font-size: var(--fs-md);
    transition: border-color var(--t-fast) var(--ease),
                box-shadow var(--t-fast) var(--ease);
    outline: none;
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder { color: var(--text-4); }

.form-input-wrap {
    position: relative;
}
.form-input-wrap .form-input {
    padding-right: 40px;
}

.form-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    opacity: 0.6;
    transition: opacity var(--t-fast);
    padding: 4px;
}
.form-eye:hover { opacity: 1; color: var(--text-2); }

textarea.form-input {
    resize: vertical;
    min-height: 72px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
}
.badge-blue   { background: rgba(74,158,255,.15); color: var(--accent); }
.badge-green  { background: rgba(61,220,132,.15); color: var(--accent-green); }
.badge-orange { background: rgba(255,107,74,.15); color: var(--accent-warm); }
.badge-gray   { background: var(--bg-4); color: var(--text-3); }

/* Dividers */
.divider {
    height: 1px;
    background: var(--border-1);
    margin: var(--space-4) 0;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-5);
    color: var(--text-1);
    font-size: var(--fs-xs);
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-2);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--t-fast);
    z-index: 100;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   7. PAGE LOGIN
   ═══════════════════════════════════════════════════════════════════════════ */

.page-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Fond animé */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--bg-0);
    overflow: hidden;
}

.login-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: floatGlow 12s ease-in-out infinite;
}
.login-glow-1 {
    width: 500px; height: 500px;
    top: -150px; left: -100px;
    background: radial-gradient(circle, #1E3F8C, transparent);
    animation-delay: 0s;
}
.login-glow-2 {
    width: 400px; height: 400px;
    bottom: -100px; right: -80px;
    background: radial-gradient(circle, #2A1E60, transparent);
    animation-delay: -4s;
}
.login-glow-3 {
    width: 300px; height: 300px;
    top: 40%; left: 40%;
    background: radial-gradient(circle, #0A3060, transparent);
    animation-delay: -8s;
    opacity: 0.15;
}

@keyframes floatGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(30px, -40px) scale(1.05); }
    66%       { transform: translate(-20px, 20px) scale(0.95); }
}

.login-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    width: 100%;
    max-width: 380px;
    padding: var(--space-6);
}

/* Logo */
.login-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-1);
}
.login-logo-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 8px 24px rgba(74,158,255,0.3);
}
.login-logo-text {
    font-size: var(--fs-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-1);
}

/* Card */
.login-card {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-xl);
    padding: 28px var(--space-6);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03),
        0 20px 60px rgba(0,0,0,0.6),
        0 4px 16px rgba(0,0,0,0.4);
    backdrop-filter: blur(20px);
    animation: slideUp 0.4s var(--ease-out) both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-title {
    font-size: var(--fs-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-1);
}
.login-subtitle {
    font-size: var(--fs-sm);
    color: var(--text-3);
    margin-bottom: var(--space-6);
}

.login-alert {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 10px var(--space-3);
    background: rgba(255, 107, 74, 0.1);
    border: 1px solid rgba(255, 107, 74, 0.25);
    border-radius: var(--radius-sm);
    color: #FF8A6A;
    font-size: var(--fs-sm);
    margin-bottom: var(--space-4);
    animation: shake 0.4s var(--ease);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.login-form .btn-primary {
    margin-top: var(--space-2);
    padding: 11px var(--space-4);
    font-size: var(--fs-md);
}

.login-footer {
    font-size: var(--fs-xs);
    color: var(--text-4);
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. LAYOUT REVIEW (review.php) — Style NLE Premiere Pro
   ═══════════════════════════════════════════════════════════════════════════ */

.page-review {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-0);
}

/* Barre du haut : Logo + Breadcrumb + User */
.review-topbar {
    height: var(--topbar-h);
    min-height: var(--topbar-h);
    background: var(--bg-2);
    border-bottom: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    gap: var(--space-4);
    flex-shrink: 0;
    z-index: 10;
}

.review-topbar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    flex-shrink: 0;
}
.review-topbar-logo-icon {
    width: 24px; height: 24px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.review-topbar-logo-text {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: 0.04em;
}

.review-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    color: var(--text-3);
    flex: 1;
    overflow: hidden;
}
.review-breadcrumb a {
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.review-breadcrumb a:hover { color: var(--text-1); }
.review-breadcrumb-sep {
    color: var(--text-4);
    flex-shrink: 0;
}
.review-breadcrumb-current {
    color: var(--text-2);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-topbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}
.review-topbar-username {
    font-size: var(--fs-xs);
    color: var(--text-3);
}
.review-topbar-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--bg-4);
    border: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
}

/* Zone principale (3 colonnes) */
.review-workspace {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

/* ── Panneau gauche : liste vidéos ── */
.review-panel-left {
    width: var(--panel-left-w);
    min-width: var(--panel-left-w);
    flex-shrink: 0;
    background: var(--bg-2);
    border-right: 1px solid var(--border-1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: var(--space-3) var(--space-3) var(--space-2);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.video-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-1) 0;
}

.video-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 7px var(--space-3);
    cursor: pointer;
    transition: background var(--t-fast) var(--ease);
    border-left: 2px solid transparent;
    user-select: none;
}
.video-list-item:hover { background: var(--bg-3); }
.video-list-item.active {
    background: var(--bg-4);
    border-left-color: var(--accent);
}
.video-list-item.active .video-list-title { color: var(--text-1); }

.video-list-play {
    width: 16px;
    flex-shrink: 0;
    color: var(--text-4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-list-item.active .video-list-play { color: var(--accent); }

.video-list-title {
    flex: 1;
    font-size: var(--fs-sm);
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.video-list-duration {
    font-size: var(--fs-xs);
    color: var(--text-4);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

/* Mode sélection */
.video-select-bar {
    padding: var(--space-2) var(--space-3);
    border-top: 1px solid var(--border-1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.video-select-bar.hidden { display: none; }

.video-list-check {
    width: 14px; height: 14px;
    border: 1.5px solid var(--border-3);
    border-radius: 3px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast);
    background: transparent;
}
.video-list-item.selected .video-list-check {
    background: var(--accent);
    border-color: var(--accent);
}
.video-list-item.selected .video-list-check::after {
    content: '';
    width: 8px; height: 5px;
    border-left: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
    display: block;
}

/* ── Panneau central : lecteur ── */
.review-panel-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-1);
    min-width: 0;
    overflow: hidden;
}

.video-player-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.video-player-wrap video {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    color: var(--text-4);
    font-size: var(--fs-sm);
}
.video-placeholder svg {
    opacity: 0.2;
}

/* Barre de contrôles vidéo */
.video-controls {
    height: 44px;
    background: var(--bg-2);
    border-top: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    padding: 0 var(--space-3);
    gap: var(--space-3);
    flex-shrink: 0;
}

.video-ctrl-btn {
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    border-radius: var(--radius-sm);
    transition: all var(--t-fast);
}
.video-ctrl-btn:hover { color: var(--text-1); background: var(--bg-4); }

.video-timecode {
    font-family: var(--font-mono);
    font-size: var(--fs-sm);
    color: var(--text-1);
    letter-spacing: 0.04em;
    min-width: 90px;
}

.video-volume {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    margin-left: auto;
}
.video-volume input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 70px;
    height: 3px;
    background: var(--bg-4);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.video-volume input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--text-2);
    cursor: pointer;
}

/* ── Panneau droit : remarques ── */
.review-panel-right {
    width: var(--panel-right-w);
    min-width: var(--panel-right-w);
    flex-shrink: 0;
    background: var(--bg-2);
    border-left: 1px solid var(--border-1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.remarks-header {
    padding: var(--space-3);
    border-bottom: 1px solid var(--border-1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.remarks-header-title {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.remarks-count {
    background: var(--bg-4);
    color: var(--text-3);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.remarks-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-2) 0;
}

.remark-item {
    padding: var(--space-3);
    border-bottom: 1px solid var(--border-1);
    cursor: pointer;
    transition: background var(--t-fast);
    position: relative;
}
.remark-item:hover { background: var(--bg-3); }
.remark-item.active { background: rgba(74,158,255,0.06); }
.remark-item.resolved { opacity: 0.45; }

.remark-item-bar {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    border-radius: 0 2px 2px 0;
}

.remark-item-head {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: 4px;
}

.remark-item-tc {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--text-3);
    background: var(--bg-3);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.remark-item-title {
    flex: 1;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.remark-item.resolved .remark-item-title {
    text-decoration: line-through;
    color: var(--text-3);
}

.remark-item-desc {
    font-size: var(--fs-xs);
    color: var(--text-3);
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.remark-item-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.remark-item-author {
    font-size: 10px;
    color: var(--text-4);
    flex: 1;
}
.remark-item-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity var(--t-fast);
}
.remark-item:hover .remark-item-actions { opacity: 1; }
.remark-item-actions .btn-icon {
    width: 24px; height: 24px;
}

/* Formulaire ajout remarque */
.remark-add-zone {
    padding: var(--space-3);
    border-top: 1px solid var(--border-1);
    flex-shrink: 0;
}

.remark-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.remark-form.hidden { display: none; }

.remark-form-row {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.remark-color-picker {
    width: 30px; height: 30px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-2);
    padding: 2px;
    cursor: pointer;
    background: none;
    flex-shrink: 0;
}
.remark-color-picker::-webkit-color-swatch-wrapper { padding: 0; border-radius: 3px; }
.remark-color-picker::-webkit-color-swatch { border: none; border-radius: 3px; }

.remark-tc-display {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--accent);
    background: rgba(74,158,255,0.1);
    border: 1px solid rgba(74,158,255,0.2);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.remark-form-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: flex-end;
}

/* ── Timeline (pleine largeur) ── */
.review-timeline {
    height: var(--timeline-h);
    min-height: var(--timeline-h);
    background: var(--timeline-bg);
    border-top: 1px solid var(--border-1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    user-select: none;
}

.timeline-controls {
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 var(--space-3);
    gap: var(--space-2);
    border-bottom: 1px solid var(--border-1);
    background: var(--bg-2);
    flex-shrink: 0;
}

.timeline-tc {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-1);
    letter-spacing: 0.08em;
    min-width: 90px;
    font-weight: 500;
}

.timeline-zoom {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
    color: var(--text-3);
    font-size: var(--fs-xs);
}
.timeline-zoom input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 3px;
    background: var(--bg-4);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.timeline-zoom input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--text-2);
    cursor: pointer;
    transition: background var(--t-fast);
}
.timeline-zoom input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--text-1);
}

/* Canvas de la timeline */
.timeline-canvas-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

.timeline-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Tête de lecture (overlay CSS) */
.timeline-playhead {
    position: absolute;
    top: 0; bottom: 0;
    width: 1px;
    background: var(--accent);
    pointer-events: none;
    z-index: 5;
}
.timeline-playhead::before {
    content: '';
    position: absolute;
    top: 0;
    left: -5px;
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   9. DASHBOARD CLIENT (dashboard.php)
   ═══════════════════════════════════════════════════════════════════════════ */

.page-dashboard {
    min-height: 100vh;
    background: var(--bg-0);
}

/* Barre de nav dashboard */
.dash-nav {
    height: 56px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    padding: 0 var(--space-6);
    gap: var(--space-4);
    position: sticky;
    top: 0;
    z-index: 10;
}

.dash-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
}
.dash-logo-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--accent-dim), var(--accent));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.dash-logo-text {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.01em;
}

.dash-nav-spacer { flex: 1; }

.dash-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--fs-sm);
    color: var(--text-3);
}
.dash-user-name { font-weight: 500; color: var(--text-2); }

/* Contenu dashboard */
.dash-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--space-6);
}

.dash-section {
    margin-bottom: var(--space-6) * 2;
}

.dash-section-title {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.project-card {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    cursor: pointer;
    transition: all var(--t-normal) var(--ease);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    position: relative;
    overflow: hidden;
}
.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(74,158,255,0.03), transparent);
    opacity: 0;
    transition: opacity var(--t-normal);
}
.project-card:hover {
    border-color: var(--border-3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.project-card:hover::before { opacity: 1; }

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.project-card-icon {
    width: 40px; height: 40px;
    background: var(--bg-4);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
}

.project-card-title {
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 4px;
}
.project-card-desc {
    font-size: var(--fs-sm);
    color: var(--text-3);
    line-height: 1.5;
    flex: 1;
}
.project-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--fs-xs);
    color: var(--text-4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   10. ADMIN PAGES
   ═══════════════════════════════════════════════════════════════════════════ */

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-0);
}

/* Sidebar admin */
.admin-sidebar-bottom {
    margin-top: auto;
    padding: 12px 16px;
    border-top: 1px solid var(--border-1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar {
    width: 220px;
    min-width: 220px;
    background: var(--bg-2);
    border-right: 1px solid var(--border-1);
    display: flex;
    flex-direction: column;
    padding: var(--space-4) 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-sidebar-logo {
    padding: var(--space-3) var(--space-4) var(--space-4);
    border-bottom: 1px solid var(--border-1);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 9px var(--space-4);
    color: var(--text-3);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--t-fast);
    border-left: 2px solid transparent;
}
.admin-nav-item:hover {
    color: var(--text-1);
    background: var(--bg-3);
}
.admin-nav-item.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(74,158,255,0.06);
}

.admin-main {
    flex: 1;
    min-width: 0;
    padding: var(--space-6);
    overflow-y: auto;
}

.admin-page-title {
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-6);
}

/* Tables admin */
.admin-table-wrap {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    padding: 10px var(--space-4);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
    background: var(--bg-3);
    border-bottom: 1px solid var(--border-1);
}

.admin-table td {
    padding: 11px var(--space-4);
    font-size: var(--fs-sm);
    color: var(--text-2);
    border-bottom: 1px solid var(--border-1);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-3); }

/* Cards admin stats */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.admin-stat-card {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
}
.admin-stat-value {
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 4px;
}
.admin-stat-label {
    font-size: var(--fs-xs);
    color: var(--text-4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

/* Remarques globales (todolist admin) */
.remark-global-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 10px var(--space-4);
    border-bottom: 1px solid var(--border-1);
    transition: background var(--t-fast);
}
.remark-global-item:hover { background: var(--bg-3); }
.remark-global-item:last-child { border-bottom: none; }

.remark-global-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.remark-global-path {
    font-size: var(--fs-xs);
    color: var(--text-4);
    flex-shrink: 0;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.remark-global-title {
    font-size: var(--fs-sm);
    color: var(--text-2);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.remark-global-tc {
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--text-4);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   11. MODALS
   ═══════════════════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    animation: fadeIn var(--t-normal) var(--ease);
}
.modal-overlay.hidden { display: none; }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal {
    background: var(--bg-2);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    width: 100%;
    max-width: 440px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
    animation: modalSlide var(--t-normal) var(--ease-out);
}

@keyframes modalSlide {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.modal-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: var(--space-4);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.modal-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: flex-end;
    margin-top: var(--space-2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   12. NOTIFICATIONS (Toast)
   ═══════════════════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    bottom: calc(var(--timeline-h) + 16px);
    right: 16px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: var(--bg-4);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    padding: 10px var(--space-4);
    font-size: var(--fs-sm);
    color: var(--text-1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    animation: toastIn 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 220px;
    pointer-events: auto;
}
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error   { border-left: 3px solid var(--accent-warm); }
.toast.info    { border-left: 3px solid var(--accent); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   13. UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.hidden      { display: none !important; }
.sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-3); }
.text-danger { color: var(--accent-warm); }
.text-success { color: var(--accent-green); }
.fw-500      { font-weight: 500; }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mono        { font-family: var(--font-mono); }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1       { gap: var(--space-1); }
.gap-2       { gap: var(--space-2); }
.gap-3       { gap: var(--space-3); }
.gap-4       { gap: var(--space-4); }
.mt-1        { margin-top: var(--space-1); }
.mt-2        { margin-top: var(--space-2); }
.mt-3        { margin-top: var(--space-3); }
.mt-4        { margin-top: var(--space-4); }
.mt-6        { margin-top: var(--space-6); }

/* ═══════════════════════════════════════════════════════════════════════════
   14. NLE REVIEW WORKSPACE (Premiere Pro / Frame.io Style)
   ═══════════════════════════════════════════════════════════════════════════ */

.review-body {
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-0);
}

#reviewApp {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Navigation Bar */
.review-top-bar {
    height: 52px;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    flex-shrink: 0;
    z-index: 100;
}

.review-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-base);
    color: var(--text-2);
}

.review-breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-2);
    text-decoration: none;
    transition: color 0.15s ease;
    font-weight: 500;
}
.review-breadcrumb-link:hover {
    color: var(--text-1);
}

.breadcrumb-sep {
    color: var(--text-4);
}

.review-video-active-title {
    color: var(--text-1);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.review-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Main 3-Column Layout with Resizers */
.review-workspace {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: var(--bin-width, 280px) 6px 1fr 6px var(--remarks-width, 340px);
    overflow: hidden;
    position: relative;
    transition: grid-template-columns 0.18s cubic-bezier(0.2, 0, 0, 1);
}

.review-workspace.is-resizing-col {
    transition: none !important;
    user-select: none;
}

.review-workspace.bin-collapsed {
    grid-template-columns: 0px 0px 1fr 6px var(--remarks-width, 340px);
}
.review-workspace.remarks-collapsed {
    grid-template-columns: var(--bin-width, 280px) 6px 1fr 0px 0px;
}
.review-workspace.bin-collapsed.remarks-collapsed,
.review-workspace.theater-mode {
    grid-template-columns: 0px 0px 1fr 0px 0px !important;
}

/* Draggable Column Dividers */
.col-resizer {
    width: 6px;
    background: var(--bg-1);
    cursor: col-resize;
    position: relative;
    z-index: 50;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.col-resizer:hover, .col-resizer.is-dragging {
    background: var(--accent);
}
.col-resizer::after {
    content: '';
    width: 2px;
    height: 32px;
    border-radius: 1px;
    background: var(--border-3);
    transition: background 0.15s ease;
}
.col-resizer:hover::after, .col-resizer.is-dragging::after {
    background: #ffffff;
}

/* Resizers are naturally hidden when grid column is 0px */

/* ─── Column 1: Video Bin / Playlist ─────────────────────────────────────── */
.video-bin {
    background: var(--bg-1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    transition: opacity 0.15s ease;
}
.review-workspace.bin-collapsed .video-bin,
.review-workspace.theater-mode .video-bin {
    opacity: 0;
    pointer-events: none;
}

.bin-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--fs-sm);
    color: var(--text-2);
    font-weight: 600;
}

/* Video Bin Search Bar */
.bin-search-bar {
    padding: 7px 10px;
    border-bottom: 1px solid var(--border-1);
    background: rgba(0, 0, 0, 0.22);
    display: flex;
    align-items: center;
    gap: 7px;
    position: relative;
}

.bin-search-icon {
    color: var(--text-3);
    flex-shrink: 0;
    pointer-events: none;
}

.bin-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 11.5px;
    color: var(--text-1);
    font-family: var(--font-sans);
    padding: 2px 0;
}

.bin-search-input::placeholder {
    color: var(--text-3);
    font-size: 11px;
}

.bin-search-input::-webkit-search-cancel-button {
    display: none;
}

.bin-search-clear {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 13px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.bin-search-clear:hover {
    color: #fff;
    background: var(--bg-4);
}

.bin-no-results {
    padding: 24px 12px;
    text-align: center;
    color: var(--text-3);
    font-size: 11.5px;
    line-height: 1.5;
}

.bin-no-results span {
    color: var(--accent);
    font-weight: 500;
}

/* Live Presence indicator */
.user-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 9px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    font-size: 11px;
    font-weight: 600;
    color: #10B981;
}
.live-dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulse 1.8s infinite;
}
@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}
.live-view-hint {
    color: var(--text-2);
    font-size: 10px;
    font-weight: 400;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.video-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-md);
    background: var(--bg-2);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    user-select: none;
}

.video-item:hover {
    background: var(--bg-3);
    border-color: var(--border-2);
}

.video-item.active {
    background: var(--bg-4);
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-glow);
}

.video-item-check {
    display: flex;
    align-items: center;
    padding-right: 2px;
}
.video-item-check input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--accent);
}

.video-thumb-wrap {
    width: 80px;
    height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-0);
    position: relative;
    flex-shrink: 0;
}

.video-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-duration-pill {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(2px);
    color: var(--text-1);
    font-size: 10px;
    font-family: var(--font-mono);
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.2;
}

.video-item-info {
    flex: 1;
    min-width: 0;
}

.video-item-title {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.video-item-meta {
    font-size: var(--fs-xs);
    color: var(--text-3);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.video-remarks-badge {
    background: var(--bg-4);
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border: 1px solid var(--border-2);
}

.bin-footer {
    padding: 10px 14px;
    border-top: 1px solid var(--border-1);
    background: var(--bg-1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ─── Column 2: Player & Timeline ────────────────────────────────────────── */
.player-col {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-0);
    position: relative;
    min-height: 0;
}

.player-viewport-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
    overflow: hidden;
}

#playerContainer {
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#reviewVideo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    outline: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    transform-origin: center center;
    transform: rotate(var(--video-rotate, 0deg)) scale(var(--video-rotate-scale, 1));
}

#reviewVideo.fit-cover {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
}

#reviewVideo.fit-original {
    max-width: none !important;
    max-height: none !important;
}

#reviewVideo.scale-125 { transform: rotate(var(--video-rotate, 0deg)) scale(calc(1.25 * var(--video-rotate-scale, 1))); }
#reviewVideo.scale-150 { transform: rotate(var(--video-rotate, 0deg)) scale(calc(1.50 * var(--video-rotate-scale, 1))); }
#reviewVideo.scale-200 { transform: rotate(var(--video-rotate, 0deg)) scale(calc(2.00 * var(--video-rotate-scale, 1))); }
#reviewVideo.scale-custom { transform: rotate(var(--video-rotate, 0deg)) scale(calc(var(--video-zoom, 1) * var(--video-rotate-scale, 1))); }

/* Transport Controls Bar */
.player-controls-bar {
    height: 48px;
    background: var(--bg-1);
    border-top: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    flex-shrink: 0;
}

.transport-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-transport {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-transport:hover {
    background: var(--bg-3);
    color: var(--text-1);
    border-color: var(--border-2);
}
.btn-transport.btn-transport-play {
    background: var(--bg-3);
    color: var(--text-1);
    border-color: var(--border-2);
}
.btn-transport.btn-transport-play:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-transport .icon-pause { display: none; }
.btn-transport.is-playing .icon-play { display: none; }
.btn-transport.is-playing .icon-pause { display: block; }

.timecode-readout {
    font-family: var(--font-mono);
    font-size: var(--fs-md);
    background: var(--bg-0);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}
.timecode-current {
    color: var(--accent);
    font-weight: 700;
}
.timecode-sep {
    color: var(--text-4);
}
.timecode-total {
    color: var(--text-3);
}

.transport-spacer {
    flex: 1;
}

.transport-extra-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.speed-select {
    background: var(--bg-0);
    color: var(--text-2);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    font-size: var(--fs-xs);
    font-weight: 500;
    cursor: pointer;
    outline: none;
}
.speed-select:hover {
    border-color: var(--border-2);
    color: var(--text-1);
}

/* Draggable Timeline Resizer */
.timeline-resizer {
    height: 7px;
    background: var(--bg-1);
    border-top: 1px solid var(--border-1);
    border-bottom: 1px solid var(--border-1);
    cursor: row-resize;
    position: relative;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    flex-shrink: 0;
}
.timeline-resizer:hover, .timeline-resizer.is-dragging {
    background: var(--accent);
}
.timeline-resizer-handle {
    width: 38px;
    height: 3px;
    border-radius: 2px;
    background: var(--border-3);
    pointer-events: none;
    transition: background 0.15s ease;
}
.timeline-resizer:hover .timeline-resizer-handle,
.timeline-resizer.is-dragging .timeline-resizer-handle {
    background: #ffffff;
}

/* Premiere Pro Style Timeline */
.timeline-section,
.timeline-section *,
.timeline-section *::before,
.timeline-section *::after,
.timeline-resizer,
.timeline-resizer * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    -webkit-touch-callout: none !important;
}

.timeline-section ::selection,
.timeline-resizer ::selection {
    background: transparent !important;
    color: inherit !important;
}

.timeline-section {
    height: var(--timeline-height, 170px);
    min-height: 50px;
    max-height: 50vh;
    background: var(--timeline-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
}

/* Theater / Maximize Video Mode */
.review-workspace.theater-mode .timeline-resizer {
    display: none !important;
}
.review-workspace.theater-mode .timeline-section {
    height: 52px !important;
    min-height: 52px !important;
}
.review-workspace.theater-mode .timeline-header-bar {
    display: none !important;
}
.review-workspace.theater-mode .timeline-ruler-track {
    height: 18px;
}
.review-workspace.theater-mode .timeline-markers-track {
    height: 18px;
}
.review-workspace.theater-mode .timeline-scrubber-track {
    min-height: 16px;
}
.btn-transport.is-active-mode {
    background: var(--accent-glow);
    color: var(--accent);
    border-color: var(--accent);
}

.timeline-header-bar {
    height: 32px;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 12px;
    font-size: var(--fs-xs);
    color: var(--text-3);
}

.timeline-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-zoom-slider {
    width: 90px;
    accent-color: var(--accent);
    cursor: pointer;
}

.timeline-height-presets {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
}
.btn-preset {
    background: var(--bg-3);
    border: 1px solid var(--border-1);
    color: var(--text-3);
    font-size: 10px;
    font-weight: 500;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-preset:hover {
    color: var(--text-1);
    background: var(--bg-4);
}
.btn-preset.active {
    background: var(--accent-glow);
    color: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}

.timeline-viewport {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    background: var(--timeline-bg);
}
.timeline-viewport::-webkit-scrollbar {
    height: 14px;
}
.timeline-viewport::-webkit-scrollbar-track {
    background: var(--bg-0);
}
.timeline-viewport::-webkit-scrollbar-thumb {
    background: var(--bg-4);
    border-radius: 7px;
    border: 3px solid var(--bg-0);
}

.timeline-track-wrap {
    min-width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.timeline-hover-guide {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    z-index: 45;
    display: none;
}
.timeline-hover-guide.visible {
    display: block;
}
.hover-guide-tc {
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-4);
    color: var(--text-1);
    border: 1px solid var(--border-2);
    border-radius: 3px;
    padding: 1px 5px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* Ruler Track */
.timeline-ruler-track {
    height: 24px;
    background: var(--timeline-ruler);
    border-bottom: 1px solid var(--border-1);
    position: relative;
    width: 100%;
}

.timeline-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-2);
}
.timeline-tick.major {
    background: var(--border-3);
}
.timeline-tick-label {
    position: absolute;
    left: 4px;
    top: 3px;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-3);
    pointer-events: none;
    white-space: nowrap;
}

/* Markers Track */
.timeline-markers-track {
    min-height: calc(5 * var(--timeline-lane-height, 18px));
    max-height: calc(5 * var(--timeline-lane-height, 18px));
    position: relative;
    border-bottom: 1px dashed var(--border-1);
    background: rgba(20, 23, 32, 0.4);
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.timeline-lane-bg {
    height: var(--timeline-lane-height, 18px);
    min-height: var(--timeline-lane-height, 18px);
    flex: 0 0 var(--timeline-lane-height, 18px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
    box-sizing: border-box;
}

.lane-number {
    position: absolute;
    left: 4px;
    top: 3px;
    font-size: 9px;
    color: rgba(255,255,255,0.2);
    font-family: var(--font-mono);
    pointer-events: none;
}

.timeline-marker {
    position: absolute;
    top: calc(var(--lane, 0) * var(--timeline-lane-height, 18px) + 2px);
    height: calc(var(--timeline-lane-height, 18px) - 4px);
    width: 0;
    cursor: pointer;
    z-index: 10;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
    -webkit-touch-callout: none !important;
}

.timeline-marker.is-range {
    width: auto;
    border-radius: 2px;
}

.marker-range-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 3px;
    border-top: 2px solid var(--marker-color, #4A9EFF);
    border-bottom: 2px solid var(--marker-color, #4A9EFF);
    background: color-mix(in srgb, var(--marker-color, #4A9EFF) 26%, transparent);
    pointer-events: all;
    transition: background 0.15s ease;
}

.marker-range-title {
    position: absolute;
    top: 0;
    left: 8px;
    right: 8px;
    bottom: 0;
    display: flex;
    align-items: center;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.timeline-marker.is-range:hover .marker-range-bar {
    background: color-mix(in srgb, var(--marker-color, #4A9EFF) 42%, transparent);
    cursor: grab;
}
.timeline-marker.is-range .marker-range-bar:active {
    cursor: grabbing;
}

.marker-handle {
    width: 6px;
    height: 14px;
    position: absolute;
    top: 0;
    background: var(--marker-color, #4A9EFF);
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
    z-index: 2;
    cursor: ew-resize;
    touch-action: none !important;
}
.marker-handle::after {
    content: '';
    position: absolute;
    top: -6px;
    bottom: -6px;
    left: -10px;
    right: -10px;
    cursor: ew-resize;
    touch-action: none;
}
.marker-handle.handle-in {
    left: 0;
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}
.marker-handle.handle-out {
    right: 0;
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
}

.marker-range-bar {
    touch-action: none !important;
}

.marker-pin {
    width: 10px;
    height: 12px;
    position: absolute;
    top: 2px;
    left: -5px;
    border-radius: 2px 2px 5px 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: transform 0.15s ease;
    touch-action: none !important;
}
.marker-pin::after {
    content: '';
    position: absolute;
    top: -8px;
    bottom: -8px;
    left: -10px;
    right: -10px;
    touch-action: none;
}
.timeline-marker:hover .marker-pin {
    transform: scale(1.3);
}

.marker-line {
    position: absolute;
    top: 14px;
    height: 600px;
    left: 0;
    border-left: 1px dashed;
    opacity: 0.6;
    pointer-events: none;
}

.marker-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: var(--bg-4);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    display: none;
    flex-direction: column;
    gap: 2px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
    pointer-events: none;
}
.timeline-marker:hover .marker-tooltip {
    display: flex;
}
.tooltip-tc {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--accent);
}
.tooltip-title {
    font-size: 12px;
    color: var(--text-1);
}
.tooltip-author {
    font-size: 10px;
    color: var(--text-3);
}

/* Playhead Scrubber Track & Playhead */
.timeline-scrubber-track {
    flex: 1;
    min-height: 35px;
    position: relative;
    background: rgba(13, 15, 20, 0.6);
    width: 100%;
}

.timeline-progress-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    background: rgba(74, 158, 255, 0.08);
    pointer-events: none;
}

.timeline-playhead {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 50;
}

.playhead-head {
    width: 14px;
    height: 16px;
    background: var(--accent);
    clip-path: polygon(0 0, 100% 0, 100% 65%, 50% 100%, 0 65%);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 6px rgba(74, 158, 255, 0.5);
    pointer-events: auto;
    touch-action: none;
    cursor: grab;
}
.playhead-head:active {
    cursor: grabbing;
}
.playhead-head::after {
    content: '';
    position: absolute;
    top: -12px;
    bottom: -16px;
    left: -16px;
    right: -16px;
    cursor: grab;
    pointer-events: auto;
    touch-action: none;
}

/* ─── Column 3: Remarks Panel ────────────────────────────────────────────── */
.remarks-panel {
    background: var(--bg-1);
    border-left: 1px solid var(--border-1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    transition: opacity 0.18s ease;
}
.review-workspace.remarks-collapsed .remarks-panel,
.review-workspace.theater-mode .remarks-panel {
    opacity: 0;
    pointer-events: none;
}

/* ─── Responsive Media Queries ───────────────────────────────────────────── */
@media (max-height: 820px) {
    .review-top-bar { height: 44px; padding: 0 12px; }
    .player-controls-bar { height: 40px; padding: 0 12px; }
    .timeline-section { height: var(--timeline-height, 135px); }
    .timecode-readout { font-size: var(--fs-sm); padding: 2px 8px; }
}

@media (max-width: 1240px) {
    .review-workspace {
        --bin-width: 240px;
        --remarks-width: 300px;
    }
}

.remarks-panel-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remarks-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.remarks-panel-title {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--text-1);
}
.remarks-count-pill {
    background: var(--bg-3);
    color: var(--text-2);
    font-size: var(--fs-xs);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* Premiere Sync Notification Banner */
.premiere-sync-banner {
    padding: 8px 12px;
    background: rgba(167, 139, 250, 0.08);
    border-bottom: 1px solid rgba(167, 139, 250, 0.22);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--text-2);
}
.premiere-sync-banner.hidden {
    display: none !important;
}
.premiere-sync-info {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.premiere-sync-info strong {
    color: #C4B5FD;
}

/* Dropdown Menu */
.dropdown-menu {
    border-radius: 6px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}
.dropdown-item {
    transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-item:hover {
    background: var(--bg-3) !important;
    color: var(--text-1) !important;
}

/* Filter Tabs & Premiere Toggle */
.remarks-filter-bar {
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    background: var(--bg-2);
}

.remarks-filter-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
}

.remark-filter-tab {
    padding: 4px 8px;
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
}
.remark-filter-tab:hover {
    color: var(--text-1);
}
.remark-filter-tab.active {
    background: var(--bg-4);
    color: var(--text-1);
    font-weight: 600;
}

/* Premiere Pro Marker Filter Toggle */
.premiere-filter-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.premiere-filter-toggle input {
    display: none;
}
.premiere-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 12px;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    color: var(--text-4);
    transition: all 0.15s ease;
}
.premiere-filter-toggle input:checked + .premiere-filter-badge {
    background: rgba(167, 139, 250, 0.15);
    border-color: rgba(167, 139, 250, 0.45);
    color: #C4B5FD;
}
.premiere-filter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Remark Source Badges */
.badge-source {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    line-height: 1.2;
}
.badge-source.premiere {
    background: rgba(167, 139, 250, 0.18);
    color: #C4B5FD;
    border: 1px solid rgba(167, 139, 250, 0.4);
}
.badge-source.cloned {
    background: rgba(56, 189, 248, 0.18);
    color: #7DD3FC;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Add Remark Drawer / Form */
.add-remark-drawer {
    padding: 14px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border-2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: drawerSlideDown 0.2s ease-out;
}

.add-remark-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.add-remark-drawer-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
}

.remark-duration-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg-1);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}

.remark-duration-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-2);
    cursor: pointer;
    user-select: none;
}

.remark-duration-fields {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 6px;
    border-top: 1px dashed var(--border-1);
}

.remark-range-input-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.remark-range-preview {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    margin-left: auto;
}

.remark-tc-range-sub {
    font-size: 10px;
    color: var(--text-3);
    font-family: var(--font-mono);
    margin-left: 2px;
}

@keyframes drawerSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.add-remark-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.add-remark-tc-badge {
    background: var(--bg-4);
    border: 1px solid var(--border-2);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.color-picker-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease;
}
.color-picker-dot:hover {
    transform: scale(1.2);
}
.color-picker-dot.selected {
    border-color: #fff;
    transform: scale(1.2);
}

.add-remark-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 4px;
}

/* Remarks Scrollable List */
.remarks-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.remark-item {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    border-left: 3px solid var(--item-color, var(--accent));
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    cursor: pointer;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

.remark-item *,
.remark-item *::before,
.remark-item *::after {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

.remark-item ::selection {
    background: transparent !important;
    color: inherit !important;
}

.remark-item:hover {
    border-color: var(--border-2);
    background: var(--bg-3);
}

.remark-item.active-playhead {
    border-color: var(--accent);
    background: var(--bg-4);
    box-shadow: 0 0 0 1px var(--accent-glow);
}

.remark-item.flash-highlight {
    animation: flashBorder 1.2s ease-out;
}

@keyframes flashBorder {
    0% { border-color: var(--accent); box-shadow: 0 0 12px var(--accent); }
    100% { border-color: var(--border-1); box-shadow: none; }
}

.remark-item.is-resolved {
    opacity: 0.55;
}
.remark-item.is-resolved:hover {
    opacity: 0.9;
}

/* Meta bar (Top line: author, date, actions) */
.remark-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    user-select: none;
}

.remark-user-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.remark-avatar-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.author-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-sep {
    font-size: 8px;
    color: var(--text-3);
    opacity: 0.5;
}

.remark-date {
    font-size: 10px;
    color: var(--text-3);
    white-space: nowrap;
}

.remark-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.remark-actions button,
.remark-actions .remark-action-btn,
.remark-actions .resolve-btn,
.remark-actions .btn-icon-sm {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all var(--t-fast);
    touch-action: manipulation;
}
.remark-actions button:hover,
.remark-actions .remark-action-btn:hover,
.remark-actions .btn-icon-sm:hover {
    background: var(--bg-4);
    color: var(--text-1);
    border-color: var(--border-2);
}
.remark-actions .resolve-btn.is-resolved,
.remark-actions .resolve-btn.resolved {
    color: var(--accent-green);
    background: rgba(61, 220, 132, 0.12);
    border-color: rgba(61, 220, 132, 0.25);
}
.remark-actions .edit-btn:hover {
    color: var(--accent);
    background: var(--accent-glow);
    border-color: rgba(74, 158, 255, 0.3);
}
.remark-actions .delete-btn:hover {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Content Wrap (Timecode + Title + Desc) */
.remark-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.remark-headline {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.remark-tc-tag {
    background: rgba(74, 158, 255, 0.1);
    border: 1px solid rgba(74, 158, 255, 0.35);
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    line-height: 1.4;
    transition: all 0.12s ease;
    flex-shrink: 0;
}
.remark-tc-tag:hover {
    filter: brightness(1.25);
    border-color: currentColor;
}
.tc-play-icon {
    opacity: 0.8;
}
.tc-arrow {
    opacity: 0.6;
    font-size: 9px;
}
.tc-duration-pill {
    background: rgba(255, 255, 255, 0.12);
    padding: 0 4px;
    border-radius: 2px;
    font-size: 9px;
    margin-left: 2px;
    color: var(--text-2);
}

.remark-title-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-1);
    line-height: 1.35;
    word-break: break-word;
}

/* Expandable Description */
.remark-desc-wrap {
    margin-top: 1px;
}

.remark-desc-text {
    font-size: 11px;
    color: var(--text-2);
    line-height: 1.45;
    word-break: break-word;
    white-space: pre-wrap;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

.remark-item.is-expanded .remark-desc-text {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

.remark-expand-indicator {
    font-size: 10px;
    color: var(--accent);
    font-weight: 500;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 2px;
    user-select: none;
}
.remark-expand-indicator:hover {
    text-decoration: underline;
}

.expand-text-less {
    display: none;
}
.remark-item.is-expanded .expand-text-more {
    display: none;
}
.remark-item.is-expanded .expand-text-less {
    display: inline;
}

.remark-resolved-meta {
    font-size: 10px;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

/* Empty State */
.remarks-empty {
    text-align: center;
    padding: 40px 16px;
    color: var(--text-3);
}
.remarks-empty .empty-icon {
    margin-bottom: 12px;
    opacity: 0.3;
}
.remarks-empty h4 {
    font-size: var(--fs-sm);
    color: var(--text-2);
    margin-bottom: 6px;
}
.remarks-empty p {
    font-size: var(--fs-xs);
    line-height: 1.5;
}
.remarks-empty kbd {
    background: var(--bg-4);
    border: 1px solid var(--border-2);
    color: var(--text-1);
    font-family: var(--font-mono);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
}

/* ── Virtual Folders ── */
.video-folder {
    margin-bottom: var(--space-1);
}
.video-folder-header {
    display: flex;
    align-items: center;
    padding: 6px var(--space-3);
    cursor: pointer;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-1);
    user-select: none;
    transition: background var(--t-fast);
}
.video-folder-header:hover { background: rgba(255,255,255,0.05); }
.video-folder-header:hover .folder-action-btn { opacity: 1 !important; }
.folder-icon { color: var(--accent); margin-right: 6px; }
.folder-name { font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); }
.video-folder-content {
    min-height: 20px;
    transition: height var(--t-fast);
}
.video-folder.collapsed .video-folder-content { display: none; }
.empty-folder-hint {
    padding: 10px;
    text-align: center;
    font-size: var(--fs-xs);
    color: var(--text-4);
    border: 1px dashed var(--border-2);
    margin: 4px; border-radius: 4px;
}
.root-dropzone { min-height: 40px; padding-bottom: 20px; }
.drag-over { background: rgba(74, 158, 255, 0.1) !important; outline: 1px dashed var(--accent); }

.video-item.dragging,
.video-folder.dragging {
    opacity: 0.45 !important;
}

.drag-insert-above {
    position: relative !important;
}
.drag-insert-above::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 4px;
    right: 4px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(74, 158, 255, 0.7);
}

.drag-insert-below {
    position: relative !important;
}
.drag-insert-below::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 4px;
    right: 4px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 6px rgba(74, 158, 255, 0.7);
}

/* ── Color Picker Popover ── */
.color-picker-popover {
    position: fixed;
    z-index: 10000;
    background: var(--bg-2);
    border: 1px solid var(--border-3);
    border-radius: var(--radius-md);
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    display: flex;
    gap: 6px;
}
.color-picker-popover.hidden { display: none; }
.video-color-btn:hover { border-color: var(--accent) !important; }


/* Hide mobile-specific buttons on desktop */
.mobile-only {
    display: none !important;
}

/* -- Responsive Admin Area -- */
@media (max-width: 768px) {
    .mobile-only {
        display: flex !important;
    }

    .admin-layout {
        padding-top: 50px;
        padding-bottom: env(safe-area-inset-bottom, 20px);
        margin-bottom: 60px; /* Space for bottom tab bar */
        display: block;
    }
    
    .admin-sidebar {
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        padding: 0; border: none;
        background: transparent;
        pointer-events: none; /* Let clicks pass through to main content */
        z-index: 1000;
    }
    
    .admin-sidebar > * {
        pointer-events: auto; /* Re-enable clicks on header and nav */
    }
    
    /* Mobile Header (Logo & Top info) */
    .admin-mobile-header-wrap {
        position: fixed;
        top: 0; left: 0; right: 0;
        height: 50px;
        background: var(--bg-1);
        border-bottom: 1px solid var(--border-1);
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 16px;
        margin: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    .admin-sidebar-logo {
        border-bottom: none;
        padding: 0;
        margin: 0;
    }
    
    .admin-mobile-action {
        color: var(--text-2);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px; height: 32px;
        border-radius: var(--radius-sm);
        background: var(--bg-2);
        border: 1px solid var(--border-1);
        text-decoration: none;
    }

    /* Hide desktop bottom actions */
    .admin-sidebar-bottom {
        display: none !important;
    }
    
    /* Mobile Tab Bar */
    .admin-sidebar > nav {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: calc(60px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--bg-1);
        border-top: 1px solid var(--border-1);
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    }
    
    .admin-nav-item {
        flex: 1;
        flex-direction: column;
        justify-content: center;
        padding: 4px 0;
        gap: 4px;
        font-size: 10px;
        border-left: none !important;
        border-top: 2px solid transparent;
        background: transparent !important;
        color: var(--text-3);
    }
    
    .admin-nav-item.active {
        color: var(--accent);
        border-top-color: var(--accent);
    }
    
    .admin-nav-item svg {
        width: 20px;
        height: 20px;
        margin: 0 auto;
    }

    .admin-main {
        padding: 16px;
    }

    .admin-stats {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .admin-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-md);
    }

    .admin-table th, .admin-table td {
        white-space: nowrap;
        padding: 12px;
    }

    .remark-global-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .remark-global-title {
        flex: 1 1 100%;
        order: -1;
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    .admin-page-title {
        margin-bottom: 16px;
        font-size: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE REVIEW WORKSPACE & CLIENT DASHBOARD (Smartphones & Tablets < 768px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    :root {
        --timeline-lane-height: 28px;
    }

    /* ─── 1. General & Dashboard ─────────────────────────────────────────── */
    .dash-nav {
        padding: 0 14px;
        height: 52px;
    }
    .dash-user-name {
        display: none;
    }
    .dash-content {
        padding: 16px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .project-card {
        padding: 14px;
    }

    /* ─── 2. Review Top Bar ──────────────────────────────────────────────── */
    .review-layout {
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        position: relative;
        padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    }
    .review-top-bar {
        height: 46px;
        min-height: 46px;
        padding: 0 10px;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .review-breadcrumb {
        font-size: 11px;
    }
    .review-video-active-title {
        max-width: 130px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        vertical-align: middle;
    }
    /* Hide non-critical desktop buttons on top bar */
    .review-top-actions button#toggleRemarksBtn,
    .review-top-actions button#shortcutsBtn,
    .review-top-actions a#downloadActiveBtn,
    .review-top-actions a[title*="ZIP"] {
        display: none !important;
    }

    /* ─── 3. Review Workspace (Column Layout to Mobile Stack) ─────────────── */
    .review-workspace {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        overflow: hidden;
        position: relative;
    }
    .col-resizer,
    .timeline-resizer {
        display: none !important;
    }

    /* ─── 4. Player Column (Dominant Top View) ────────────────────────────── */
    .player-col {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 100% !important;
        overflow: hidden;
        background: #000;
    }
    .player-viewport-wrap {
        flex: 1 1 auto;
        min-height: 140px;
        max-height: calc(100vh - 46px - 44px - 200px - 58px);
        display: flex;
        align-items: center;
        justify-content: center;
        background: #000;
        position: relative;
    }
    #playerContainer {
        width: 100%;
        height: 100%;
        max-height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    #reviewVideo {
        width: 100%;
        height: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    /* ─── 5. Player Controls & Touch Transport ───────────────────────────── */
    .player-col {
        position: relative;
    }
    .player-controls-bar {
        position: static;
        padding: 6px 10px;
        height: 44px;
        gap: 4px;
        background: var(--bg-1);
        border-top: 1px solid var(--border-1);
        border-bottom: 1px solid var(--border-1);
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .transport-btns {
        gap: 3px;
        display: flex;
        align-items: center;
    }
    .btn-transport {
        width: 32px !important;
        height: 32px !important;
        border-radius: var(--radius-sm);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .btn-transport-play {
        width: 34px !important;
        height: 34px !important;
        border-radius: 50% !important;
        background: var(--accent) !important;
        color: #fff !important;
        box-shadow: 0 0 10px var(--accent-glow);
    }
    /* Sleek Floating Timecode HUD on top-left of video */
    .timecode-readout {
        position: absolute;
        top: 8px;
        left: 10px;
        z-index: 35;
        background: rgba(13, 15, 20, 0.82);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: var(--radius-sm);
        padding: 3px 8px;
        font-size: 11px;
        letter-spacing: 0.5px;
        color: var(--text-1);
        pointer-events: none;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    }
    .transport-extra-controls {
        display: flex !important;
        align-items: center;
        gap: 4px;
    }
    /* Rotate 90° Video Button */
    .transport-extra-controls #rotateVideoBtn {
        display: flex !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: var(--radius-sm);
        background: var(--bg-2);
        color: var(--text-2);
        border: 1px solid var(--border-1);
    }
    .transport-extra-controls #rotateVideoBtn:active {
        color: var(--accent);
        background: var(--bg-3);
    }
    /* Video Scale / Zoom Selector */
    .transport-extra-controls div[title*="Scaling"] {
        display: inline-flex !important;
        align-items: center;
        height: 30px !important;
    }
    .transport-extra-controls select#videoScaleSelector {
        display: inline-block !important;
        width: 56px !important;
        height: 30px !important;
        font-size: 11px !important;
        font-weight: 500;
        padding: 0 4px !important;
        border-radius: var(--radius-sm) !important;
        background: var(--bg-2) !important;
        color: var(--text-1) !important;
        border: 1px solid var(--border-2) !important;
        cursor: pointer;
    }
    .transport-extra-controls input#videoScaleInput {
        display: none !important;
    }
    /* Fullscreen Button */
    .transport-extra-controls #fullscreenBtn {
        display: flex !important;
        width: 32px !important;
        height: 32px !important;
    }
    /* Quick + Remark Button */
    .mobile-quick-remark-btn {
        display: inline-flex !important;
        align-items: center;
        gap: 3px;
        padding: 4px 8px !important;
        border-radius: var(--radius-full);
        font-size: 11px;
        font-weight: 600;
        background: var(--accent);
        color: #fff;
        border: none;
        cursor: pointer;
        flex-shrink: 0;
        height: 30px;
    }
    /* Hide desktop-only controls */
    .transport-extra-controls select#playbackSpeedSelector,
    .transport-extra-controls #theaterModeBtn,
    .transport-extra-controls #removeLaneBtn,
    .transport-extra-controls #addLaneBtn {
        display: none !important;
    }

    /* ─── 6. Mobile Timeline Strip ───────────────────────────────────────── */
    .timeline-section {
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
        background: var(--timeline-bg);
        flex-shrink: 0;
        border-top: 1px solid var(--border-2);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .timeline-header-bar {
        display: flex !important;
        height: 28px !important;
        min-height: 28px !important;
        padding: 0 10px !important;
        align-items: center;
        justify-content: space-between;
        background: var(--bg-1);
        border-bottom: 1px solid var(--border-1);
        font-size: 11px;
    }
    .timeline-zoom-controls {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
    }
    .timeline-zoom-slider {
        width: 80px !important;
        height: 4px !important;
        accent-color: var(--accent);
    }
    .timeline-header-bar .btn-preset,
    .timeline-header-bar .timeline-hint-text,
    .timeline-header-bar #timelineAddRemarkBtn {
        display: none !important;
    }

    .timeline-viewport {
        flex: 1 1 auto !important;
        height: calc(100% - 28px) !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y !important;
        position: relative;
    }
    .timeline-track-wrap {
        height: 100% !important;
        min-width: 100%;
        position: relative;
        display: flex;
        flex-direction: column;
    }

    .timeline-ruler-track {
        height: 20px !important;
        min-height: 20px !important;
        flex-shrink: 0;
        cursor: pointer;
        touch-action: none;
    }

    .timeline-markers-track {
        height: calc(5 * var(--timeline-lane-height, 28px)) !important;
        max-height: calc(5 * var(--timeline-lane-height, 28px)) !important;
        flex-shrink: 0;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        position: relative;
    }

    .timeline-lane-bg {
        height: var(--timeline-lane-height, 28px) !important;
        min-height: var(--timeline-lane-height, 28px) !important;
        flex: 0 0 var(--timeline-lane-height, 28px) !important;
    }
    .lane-number {
        font-size: 11px !important;
        top: 6px !important;
        left: 6px !important;
        color: rgba(255, 255, 255, 0.35) !important;
        font-weight: 600;
    }

    .timeline-marker {
        top: calc(var(--lane, 0) * var(--timeline-lane-height, 28px) + 3px) !important;
        height: calc(var(--timeline-lane-height, 28px) - 6px) !important;
        cursor: pointer;
        touch-action: none !important;
    }
    .timeline-marker::before {
        content: '';
        position: absolute;
        top: -8px;
        bottom: -8px;
        left: -8px;
        right: -8px;
        z-index: 1;
        pointer-events: none;
        touch-action: none;
    }
    .timeline-marker .marker-pin {
        width: 18px !important;
        height: 20px !important;
        top: 2px !important;
        left: -9px !important;
        border-radius: 3px 3px 6px 6px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.8) !important;
        touch-action: none !important;
        z-index: 15 !important;
    }
    .timeline-marker .marker-pin::after {
        content: '';
        position: absolute;
        top: -12px;
        bottom: -12px;
        left: -14px;
        right: -14px;
        touch-action: none;
    }
    .timeline-marker .marker-handle {
        width: 12px !important;
        height: calc(var(--timeline-lane-height, 28px) - 6px) !important;
        touch-action: none !important;
        z-index: 20 !important;
    }
    .timeline-marker .marker-handle::after {
        content: '';
        position: absolute;
        top: -12px;
        bottom: -12px;
        left: -14px;
        right: -14px;
        touch-action: none;
    }
    .marker-range-bar {
        border-radius: 4px !important;
        touch-action: none !important;
        z-index: 10 !important;
    }
    .marker-range-title {
        font-size: 11px !important;
        font-weight: 600 !important;
        padding-left: 4px;
        touch-action: none;
    }

    .timeline-scrubber-track {
        height: 12px !important;
        min-height: 12px !important;
        flex: 0 0 12px !important;
        cursor: pointer;
        touch-action: none;
    }

    .playhead-head {
        width: 18px !important;
        height: 20px !important;
        pointer-events: auto !important;
        touch-action: none !important;
        cursor: grab !important;
        z-index: 60;
    }
    .playhead-head::after {
        content: '';
        position: absolute;
        top: -16px;
        bottom: -20px;
        left: -20px;
        right: -20px;
        cursor: grab;
        pointer-events: auto;
        touch-action: none;
    }

    /* ─── 7. Fullscreen Overlays for Panels (Remarks & Videos) ────────────── */
    .remarks-panel,
    .video-bin {
        position: fixed;
        inset: 0;
        z-index: 1200;
        background: var(--bg-0);
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        display: none;
        flex-direction: column;
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
        border: none;
        overflow: hidden;
    }
    .remarks-panel.mobile-active,
    .video-bin.mobile-active {
        display: flex !important;
        animation: mobilePanelSlideUp 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes mobilePanelSlideUp {
        from { transform: translateY(100%); opacity: 0.5; }
        to { transform: translateY(0); opacity: 1; }
    }

    .mobile-panel-top-bar {
        height: 50px;
        min-height: 50px;
        background: var(--bg-1);
        border-bottom: 1px solid var(--border-2);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
    }
    .close-mobile-panel-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--accent);
        font-weight: 600;
        font-size: 13px;
        cursor: pointer;
    }
    .remarks-panel-header {
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-1);
        background: var(--bg-1);
    }
    .remarks-list {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px;
        gap: 10px;
    }
    .remark-item {
        padding: 14px;
        border-radius: var(--radius-md);
    }
    .remark-item .remark-actions {
        display: flex !important;
        opacity: 1 !important;
        gap: 6px;
    }
    .remark-item .remark-actions button,
    .remark-item .remark-actions .remark-action-btn,
    .remark-item .remark-actions .resolve-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        background: var(--bg-3) !important;
        border: 1px solid var(--border-2) !important;
        color: var(--text-2) !important;
        border-radius: var(--radius-sm) !important;
    }
    .remark-item .remark-actions button svg,
    .remark-item .remark-actions .remark-action-btn svg,
    .remark-item .remark-actions .resolve-btn svg {
        width: 14px !important;
        height: 14px !important;
    }
    .remark-item .remark-actions .delete-btn {
        color: #F87171 !important;
        background: rgba(239, 68, 68, 0.12) !important;
        border-color: rgba(239, 68, 68, 0.28) !important;
    }
    .remark-item .remark-actions .delete-btn:active {
        background: rgba(239, 68, 68, 0.35) !important;
        color: #FFFFFF !important;
    }
    .remark-item .remark-actions .edit-btn:active {
        background: var(--accent) !important;
        color: #FFFFFF !important;
    }
    .video-list {
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px;
    }
    .video-item {
        padding: 10px 12px;
        border-radius: var(--radius-md);
        margin-bottom: 6px;
    }
    .add-remark-drawer {
        position: relative;
        border-radius: var(--radius-lg);
        margin: 10px 14px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    }

    /* ─── 8. Fixed Bottom Navigation Bar ─────────────────────────────────── */
    .mobile-review-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(58px + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(13, 15, 20, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-2);
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        z-index: 1800;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.6);
    }
    .mobile-nav-btn {
        flex: 1;
        height: 100%;
        background: none;
        border: none;
        color: var(--text-2);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        font-size: 11px;
        font-weight: 500;
        cursor: pointer;
        text-decoration: none;
        transition: all 0.15s ease;
    }
    .mobile-nav-btn:active,
    .mobile-nav-btn.active {
        color: var(--accent);
    }
    .mobile-nav-icon-wrap {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .mobile-badge {
        position: absolute;
        top: -4px;
        right: -10px;
        background: var(--accent);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        padding: 1px 5px;
        border-radius: 9999px;
        min-width: 16px;
        text-align: center;
        line-height: 1.2;
    }

    /* ─── 9. Long Press Timeline Popover (Card) ──────────────────────────── */
    .timeline-longpress-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        z-index: 2500;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: 16px;
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
        transition: opacity 0.2s ease;
    }
    .timeline-longpress-overlay.hidden {
        display: none !important;
    }
    .timeline-longpress-card {
        background: var(--bg-2);
        border: 1px solid var(--border-3);
        border-radius: var(--radius-lg);
        width: 100%;
        max-width: 420px;
        padding: 18px;
        box-shadow: 0 16px 40px rgba(0,0,0,0.7);
        animation: mobileLongPressCardIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        color: var(--text-1);
    }
    @keyframes mobileLongPressCardIn {
        from { transform: translateY(30px) scale(0.95); opacity: 0; }
        to { transform: translateY(0) scale(1); opacity: 1; }
    }
    .tlp-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 8px;
    }
    .tlp-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        display: inline-block;
        background: var(--accent);
    }
    .tlp-tc {
        font-family: var(--font-mono);
        font-size: 13px;
        font-weight: 700;
        color: var(--accent);
    }
    .tlp-close-btn {
        background: none;
        border: none;
        color: var(--text-3);
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        padding: 0 4px;
    }
    .tlp-close-btn:hover { color: #fff; }
    .tlp-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-1);
        margin-bottom: 4px;
    }
    .tlp-desc {
        font-size: 12px;
        color: var(--text-2);
        line-height: 1.4;
        margin-bottom: 8px;
        max-height: 100px;
        overflow-y: auto;
    }
    .tlp-author {
        font-size: 11px;
        color: var(--text-3);
        margin-bottom: 14px;
    }
    .tlp-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    .tlp-actions button {
        flex: 1 1 calc(50% - 6px);
        min-width: 80px;
        height: 38px;
        font-size: 12px;
        font-weight: 600;
    }

    /* Quick Move / Snap Box inside Mobile Long-Press Card */
    .tlp-move-box {
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid var(--border-2);
        border-radius: var(--radius-md);
        padding: 10px 12px;
        margin-bottom: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .tlp-snap-btn {
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-size: 12px;
        font-weight: 600;
        color: var(--accent);
        border: 1px solid var(--accent);
        background: rgba(74, 158, 255, 0.08);
        height: 34px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all 0.15s ease;
    }
    .tlp-snap-btn:hover, .tlp-snap-btn:active {
        background: var(--accent);
        color: #fff;
    }
    .tlp-nudge-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    .tlp-nudge-label {
        font-size: 11px;
        color: var(--text-3);
        font-weight: 500;
    }
    .tlp-nudge-btns {
        display: flex;
        gap: 5px;
    }
    .btn-nudge {
        background: var(--bg-3);
        border: 1px solid var(--border-2);
        color: var(--text-1);
        font-size: 11px;
        font-weight: 600;
        padding: 3px 8px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all 0.15s ease;
    }
    .btn-nudge:hover, .btn-nudge:active {
        background: var(--accent);
        color: #fff;
        border-color: var(--accent);
    }

/* Floating HUD above finger during mobile marker drag */
.timeline-drag-hud {
    position: fixed;
    z-index: 99999;
    transform: translate(-50%, -100%);
    pointer-events: none;
    background: rgba(13, 16, 24, 0.95);
    border: 1px solid var(--accent);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.75), 0 0 10px rgba(74, 158, 255, 0.3);
    border-radius: 6px;
    padding: 5px 11px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    display: none;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.timeline-drag-hud.visible {
    display: flex;
}
.timeline-drag-hud::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--accent) transparent transparent transparent;
}
.timeline-drag-hud .drag-hud-tc {
    color: var(--accent);
    font-size: 12px;
}
.timeline-drag-hud .drag-hud-dur {
    color: var(--text-2);
    font-size: 10px;
    font-weight: 500;
}

.timeline-marker.is-dragging-touch {
    z-index: 150 !important;
    filter: drop-shadow(0 4px 12px rgba(74, 158, 255, 0.6));
    opacity: 0.95;
}
.timeline-marker.is-dragging-touch .marker-pin {
    transform: scale(1.4) !important;
}
}

/* ─── Media Offline & Safe Video Delete Styles ───────────────────────── */
.media-offline-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
    margin-left: 4px;
    vertical-align: middle;
}
.video-item.is-offline .video-thumb-img {
    filter: grayscale(0.8) opacity(0.5);
}
#mediaOfflineScreen {
    position: absolute;
    inset: 0;
    background: #0B0D13;
    background-image: 
        radial-gradient(rgba(239, 68, 68, 0.08) 1px, transparent 1px),
        linear-gradient(135deg, rgba(20, 24, 33, 0.8) 0%, rgba(11, 13, 19, 0.95) 100%);
    background-size: 20px 20px, 100% 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10;
}
.offline-card {
    max-width: 500px;
    width: 100%;
    background: rgba(23, 27, 38, 0.94);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
    padding: 28px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.offline-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.offline-title {
    font-size: 19px;
    font-weight: 700;
    color: #F8FAFC;
    letter-spacing: -0.3px;
    margin: 0 0 6px 0;
}
.offline-subtitle {
    font-size: 12px;
    color: var(--text-2);
    margin: 0 0 14px 0;
    line-height: 1.5;
}
.offline-file-box {
    width: 100%;
    background: rgba(11, 13, 19, 0.85);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    padding: 10px 14px;
    text-align: left;
    margin-bottom: 14px;
}
.offline-file-label {
    font-size: 10px;
    font-weight: 700;
    color: #EF4444;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
}
.offline-file-name {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: #F1F5F9;
    word-break: break-all;
}
.offline-file-path {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-4);
    margin-top: 3px;
    word-break: break-all;
}
.offline-hint {
    font-size: 11.5px;
    color: var(--text-3);
    line-height: 1.45;
    margin: 0 0 18px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 8px 12px;
}
.offline-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}
.video-item:hover .video-delete-btn {
    opacity: 0.7 !important;
}
.video-delete-btn:hover {
    opacity: 1 !important;
    color: #EF4444 !important;
    background: rgba(239, 68, 68, 0.12) !important;
}

/* ─── Projects Filter & Search Toolbar (Admin) ───────────────────────────── */
.projects-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.projects-status-filters {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-1);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-md);
    padding: 3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.status-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.status-filter-btn:hover {
    color: var(--text-1);
    background: var(--bg-3);
}

.status-filter-btn.active {
    background: var(--bg-4);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.status-filter-btn .filter-count {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-2);
}

.status-filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.status-filter-btn .status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.dot-in_progress { background: #F59E0B; }
.status-dot.dot-draft       { background: #4A9EFF; }
.status-dot.dot-completed   { background: #10B981; }
.status-dot.dot-suspended   { background: #9CA3AF; }

/* Status Dot next to Project Name (Mobile & Desktop) */
.project-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.project-status-dot.dot-in_progress {
    background-color: #F59E0B;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}
.project-status-dot.dot-draft {
    background-color: #4A9EFF;
    box-shadow: 0 0 8px rgba(74, 158, 255, 0.5);
}
.project-status-dot.dot-completed {
    background-color: #10B981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}
.project-status-dot.dot-suspended {
    background-color: #9CA3AF;
    box-shadow: 0 0 6px rgba(156, 163, 175, 0.3);
}

.projects-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 250px;
    max-width: 380px;
    flex: 1;
    background: var(--bg-1);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-md);
    padding: 0 10px;
    transition: border-color 0.15s ease;
}

.projects-search-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-glow);
}

.projects-search-icon {
    color: var(--text-3);
    flex-shrink: 0;
    pointer-events: none;
    margin-right: 8px;
}

.projects-search-input {
    flex: 1;
    height: 34px;
    background: transparent;
    border: none;
    outline: none;
    font-size: 12px;
    color: var(--text-1);
    font-family: var(--font-sans);
}

.projects-search-input::placeholder {
    color: var(--text-4);
    font-size: 11.5px;
}

.projects-search-input::-webkit-search-cancel-button {
    display: none;
}

.projects-search-clear {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
}

.projects-search-clear:hover {
    color: #fff;
    background: var(--bg-4);
}
