/* ============================================================
   KIPS Video Review & LMS System — Sky Blue Solid Theme
   ============================================================ */

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

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --primary:       #0284c7;
  --primary-dark:  #0369a1;
  --primary-darker:#025f8a;
  --primary-light: #e0f2fe;
  --primary-pale:  #f0f9ff;
  --accent:        #0ea5e9;
  --accent2:       #38bdf8;

  --card-bg:       #ffffff;
  --page-bg:       #f0f9ff;
  --sidebar-bg:    #0c4a6e;
  --sidebar-hover: #075985;
  --sidebar-active:#0284c7;
  --border:        #bae6fd;
  --border-dark:   #7dd3fc;

  --text-main:     #0f172a;
  --text-muted:    #475569;
  --text-light:    #94a3b8;
  --text-white:    #ffffff;

  --success:       #10b981;
  --success-bg:    #d1fae5;
  --danger:        #ef4444;
  --danger-bg:     #fee2e2;
  --warning:       #f59e0b;
  --warning-bg:    #fef3c7;
  --info:          #0284c7;
  --info-bg:       #e0f2fe;

  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 12px rgba(2,132,199,0.12);
  --shadow-lg:     0 8px 24px rgba(2,132,199,0.16);

  --radius-sm:     4px;
  --radius:        8px;
  --radius-lg:     12px;

  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sidebar-w:     260px;
  --topbar-h:      60px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text-main);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ── App Shell ─────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-brand .brand-logo {
  display: flex; align-items: center; gap: 10px;
}
.brand-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.brand-name { font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.brand-sub  { font-size: 0.7rem; color: var(--accent2); font-weight: 500; }

.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-section-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4); padding: 14px 18px 6px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; cursor: pointer;
  color: rgba(255,255,255,0.75);
  font-size: 0.88rem; font-weight: 500;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-item:hover  { background: var(--sidebar-hover); color: #fff; border-left-color: var(--accent2); }
.nav-item.active { background: rgba(2,132,199,0.3); color: #fff; border-left-color: var(--accent); }
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto; background: var(--danger);
  color: #fff; font-size: 0.65rem; font-weight: 700;
  padding: 1px 6px; border-radius: 99px; min-width: 18px; text-align: center;
}

.sidebar-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
.user-name  { font-weight: 600; font-size: 0.85rem; }
.user-role  { font-size: 0.7rem; color: var(--accent2); }
.btn-logout {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 8px 12px; background: rgba(239,68,68,0.15);
  color: #fca5a5; border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 0.82rem; font-weight: 600;
  transition: all 0.15s;
}
.btn-logout:hover { background: rgba(239,68,68,0.25); color: #fff; }

/* ── Main Content Area ─────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column; min-height: 100vh;
}

/* ── Top Bar ───────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 90;
}
.topbar-title { font-size: 1.05rem; font-weight: 700; color: var(--primary-dark); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.ip-badge {
  background: var(--primary-light); color: var(--primary-dark);
  padding: 4px 10px; border-radius: var(--radius-sm);
  font-size: 0.72rem; font-weight: 600; border: 1px solid var(--border);
}

/* ── Page Content ──────────────────────────────────────────── */
.page { padding: 24px; display: none; flex: 1; }
.page.active { display: block; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--primary-dark); }

/* ── Dashboard Stats ───────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--primary);
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon {
  width: 44px; height: 44px;
  background: var(--primary-light); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-top: 3px; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  border: none; cursor: pointer; font-weight: 600;
  font-size: 0.85rem; font-family: var(--font);
  transition: all 0.15s ease; text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled)  { background: #dc2626; }
.btn-warning   { background: var(--warning); color: #fff; }
.btn-warning:hover:not(:disabled) { background: #d97706; }
.btn-outline   { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--primary-light); }
.btn-ghost     { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled)   { background: var(--primary-light); color: var(--primary-dark); border-color: var(--border-dark); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.btn-lg { padding: 11px 22px; font-size: 0.95rem; }
.btn-icon { padding: 7px 10px; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group  { margin-bottom: 14px; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
label {
  display: block; font-size: 0.78rem; font-weight: 700;
  color: var(--text-muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em;
}
input, select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; font-family: var(--font);
  background: var(--card-bg); color: var(--text-main);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2,132,199,0.12);
}
textarea { resize: vertical; min-height: 80px; }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead tr { background: var(--primary-light); }
th { padding: 10px 14px; text-align: left; font-size: 0.72rem; font-weight: 700;
     color: var(--primary-dark); text-transform: uppercase; letter-spacing: 0.06em;
     border-bottom: 2px solid var(--border); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-main); }
tbody tr:hover { background: var(--primary-pale); }
tbody tr:last-child td { border-bottom: none; }

/* ── Status Badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 99px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.02em;
}
.badge-pending  { background: var(--warning-bg); color: #92400e; }
.badge-changes  { background: var(--danger-bg);  color: #991b1b; }
.badge-ready    { background: var(--info-bg);    color: var(--primary-dark); }
.badge-published{ background: var(--success-bg); color: #065f46; }
.badge-open     { background: var(--danger-bg);  color: #991b1b; }
.badge-resolved { background: var(--success-bg); color: #065f46; }
.badge-admin    { background: #f3e8ff; color: #6b21a8; }
.badge-teacher  { background: var(--info-bg);    color: var(--primary-dark); }
.badge-editor   { background: #fef3c7; color: #92400e; }
.badge-active   { background: var(--success-bg); color: #065f46; }
.badge-inactive { background: #f1f5f9; color: #64748b; }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--card-bg); border-radius: var(--radius-lg);
  padding: 24px; width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  animation: modalIn 0.2s ease;
}
.modal.modal-lg { max-width: 800px; }
@keyframes modalIn { from { opacity:0; transform: translateY(-20px) scale(0.97); } to { opacity:1; transform: none; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--primary-light);
}
.modal-title { font-size: 1.05rem; font-weight: 700; color: var(--primary-dark); }
.modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--border); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-muted); transition: all 0.15s;
}
.modal-close:hover { background: var(--danger); color: #fff; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ── Video Player ──────────────────────────────────────────── */
.video-container { background: #000; border-radius: var(--radius); overflow: hidden; position: relative; }
video { width: 100%; display: block; max-height: 520px; background: #000; }

/* ── Canvas Watermark Overlay ──────────────────────────────── */
.video-watermark-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
}

/* Fullscreen: ensure container stretches and canvas follows */
.video-container:fullscreen,
.video-container:-webkit-full-screen,
.video-container:-moz-full-screen {
  width: 100vw !important; height: 100vh !important;
  max-width: 100vw !important; max-height: 100vh !important;
  display: flex !important; align-items: center !important;
  justify-content: center !important; background: #000 !important;
  border-radius: 0 !important;
}
.video-container:fullscreen video,
.video-container:-webkit-full-screen video,
.video-container:-moz-full-screen video {
  width: 100% !important; height: 100% !important;
  max-height: 100vh !important; object-fit: contain !important;
}
.video-container:fullscreen .video-watermark-canvas,
.video-container:-webkit-full-screen .video-watermark-canvas,
.video-container:-moz-full-screen .video-watermark-canvas {
  display: block !important;
  z-index: 2147483647 !important;
}

.player-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; flex-wrap: wrap;
  border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.speed-select { width: auto; padding: 6px 10px; font-size: 0.82rem; }

/* ── Remarks Panel ─────────────────────────────────────────── */
.remarks-list { display: flex; flex-direction: column; gap: 10px; }
.remark-item {
  border: 1px solid var(--border); border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm); padding: 12px 14px;
  background: #fff; transition: box-shadow 0.15s;
}
.remark-item:hover    { box-shadow: var(--shadow-sm); }
.remark-item.resolved { border-left-color: var(--success); opacity: 0.75; }
.remark-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.remark-time {
  font-weight: 700; color: var(--primary); cursor: pointer;
  font-size: 0.82rem; text-decoration: underline; text-underline-offset: 2px;
}
.remark-time:hover { color: var(--primary-dark); }
.remark-type { font-size: 0.7rem; background: var(--primary-light); color: var(--primary-dark); padding: 2px 7px; border-radius: 99px; font-weight: 600; }
.remark-text { font-size: 0.88rem; line-height: 1.5; color: var(--text-main); }
.remark-reviewer { font-size: 0.72rem; color: var(--text-muted); margin-top: 5px; }
.remark-note { font-size: 0.78rem; color: var(--success); margin-top: 4px; font-style: italic; }
.remark-actions { display: flex; gap: 6px; margin-top: 8px; }

/* ── Toast Notifications ────────────────────────────────────── */
#toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  min-width: 280px; max-width: 380px; padding: 12px 16px;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  font-size: 0.875rem; font-weight: 500; pointer-events: all;
  animation: toastIn 0.25s ease; border-left: 4px solid;
}
.toast-success { background: var(--success-bg); border-color: var(--success); color: #065f46; }
.toast-error   { background: var(--danger-bg);  border-color: var(--danger);  color: #991b1b; }
.toast-info    { background: var(--info-bg);    border-color: var(--info);    color: var(--primary-dark); }
.toast-warning { background: var(--warning-bg); border-color: var(--warning); color: #92400e; }
@keyframes toastIn { from { opacity:0; transform: translateX(40px); } to { opacity:1; transform: none; } }
@keyframes toastOut { to { opacity:0; transform: translateX(40px); } }

/* ── Search / Toolbar ──────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.search-input { flex: 1; min-width: 180px; }
.filter-select { width: 160px; }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text-main); }
.empty-state-desc  { font-size: 0.88rem; }

/* ── Login Page ─────────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════════
   DIGITAL WORLD CYBER LOGIN INTERFACE
══════════════════════════════════════════════════════════════ */
.digital-login-wrapper {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: #050811;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  box-sizing: border-box;
}

.digital-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

.digital-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.18) 0%, rgba(14, 165, 233, 0.06) 45%, transparent 70%);
  z-index: 2;
  pointer-events: none;
  filter: blur(40px);
}

.digital-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 2;
  pointer-events: none;
}

.digital-login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: rgba(13, 20, 36, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 16px;
  padding: 32px 30px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 
    0 0 50px rgba(2, 132, 199, 0.16),
    0 25px 60px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

.digital-security-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 20px;
}

.digital-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulse-dot-glow 1.8s infinite;
}

@keyframes pulse-dot-glow {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #38bdf8; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.digital-login-logo {
  text-align: center;
  margin-bottom: 22px;
}

.digital-logo-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.digital-logo-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  filter: blur(12px);
  opacity: 0.65;
  animation: logo-glow-pulse 3s infinite alternate;
}

@keyframes logo-glow-pulse {
  from { opacity: 0.5; filter: blur(10px); }
  to { opacity: 0.85; filter: blur(16px); }
}

.digital-logo-core {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.digital-login-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.digital-login-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 4px;
  font-weight: 500;
}

.digital-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.digital-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.digital-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0 !important;
}

.digital-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.digital-input-icon {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  color: #64748b;
  pointer-events: none;
}

.digital-input {
  width: 100%;
  height: 44px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 0 14px 0 38px;
  color: #f8fafc;
  font-size: 0.9rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.digital-input:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2), 0 0 20px rgba(56, 189, 248, 0.15);
}

.digital-submit-btn {
  position: relative;
  margin-top: 8px;
  height: 46px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.digital-submit-btn:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.digital-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.digital-signature-badge {
  margin-top: 24px;
  padding: 10px 14px;
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  text-align: center;
}

.sig-pill {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.sig-credit {
  font-size: 0.77rem;
  color: #cbd5e1;
  font-weight: 500;
}

.sig-author {
  font-weight: 800;
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.digital-footer-note {
  text-align: center;
  margin-top: 14px;
  font-size: 0.7rem;
  color: #64748b;
}

.digital-login-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-bottom: 14px;
  display: none;
}

/* ── Review Layout ──────────────────────────────────────────── */
.review-layout {
  display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start;
}
.annotation-form {
  border-top: 2px solid var(--primary-light);
  margin-top: 16px; padding-top: 16px;
}

/* ── Upload Zone ─────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-dark); border-radius: var(--radius);
  padding: 32px; text-align: center; cursor: pointer;
  transition: all 0.2s; background: var(--primary-pale);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary); background: var(--primary-light);
}
.upload-zone-icon { font-size: 2.5rem; margin-bottom: 10px; }
.upload-zone-label { font-size: 0.9rem; font-weight: 600; color: var(--primary-dark); }
.upload-zone-sub   { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }
.upload-progress-bar {
  height: 6px; background: var(--border); border-radius: 99px;
  margin-top: 12px; overflow: hidden; display: none;
}
.upload-progress-fill { height: 100%; background: var(--primary); width: 0%; transition: width 0.3s; }

/* ── Workflow Status Bar ─────────────────────────────────────── */
.workflow-bar {
  display: flex; align-items: center; gap: 0; margin-bottom: 20px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.wf-step {
  flex: 1; text-align: center; padding: 10px 6px;
  font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
  position: relative; border-right: 1px solid var(--border);
}
.wf-step:last-child { border-right: none; }
.wf-step.done   { background: var(--success-bg); color: #065f46; }
.wf-step.active { background: var(--primary); color: #fff; }
.wf-step-num    { font-size: 1rem; font-weight: 800; display: block; }

/* ── Divider ─────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .review-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page { padding: 14px; }
}

/* ── Animations ──────────────────────────────────────────────── */
.fade-in { animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* ── Log Table ───────────────────────────────────────────────── */
.log-action { font-family: monospace; font-size: 0.8rem; background: var(--primary-pale); padding: 2px 6px; border-radius: 3px; color: var(--primary-dark); }

/* ── Video Folder Explorer ──────────────────────────────────── */
.explorer-header {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
/* ── Windows Storage Drives & Network Locations (Fluent UI) ── */
.win-drives-section {
  margin-top: 14px;
}
.win-drives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
  gap: 14px;
}

/* Individual Drive Card */
.win-drive-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  user-select: none;
}
.win-drive-card:hover {
  border-color: #0284c7;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}
.win-drive-card.active {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.3), 0 4px 12px rgba(2, 132, 199, 0.12);
}
.win-drive-card.active::after {
  content: 'Active';
  position: absolute;
  top: 7px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

/* Drive Icon */
.win-drive-icon-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.win-drive-svg {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

/* Drive Meta Info */
.win-drive-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.win-drive-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-drive-path {
  font-size: 0.72rem;
  font-family: monospace;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-drive-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 3px;
  position: relative;
}
.win-drive-bar-fill {
  height: 100%;
  width: 38%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 99px;
}
.win-drive-status {
  font-size: 0.7rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
}

/* Add Drive Button Card */
.win-drive-card.add-drive {
  border: 1.5px dashed #cbd5e1;
  background: #fafafa;
  justify-content: center;
  text-align: center;
  flex-direction: row;
  gap: 8px;
  padding: 14px;
}
.win-drive-card.add-drive:hover {
  border-color: #0284c7;
  background: #f0f9ff;
}

/* ── Explorer Grid ─────────────────────────────────────────── */
.explorer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.explorer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.video-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.video-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.video-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
  background: #f8fbff;
}
.video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  overflow: hidden;
  cursor: pointer;
}
.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.video-card:hover .video-thumb-img {
  transform: scale(1.05);
}
.video-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.video-card:hover .video-thumb-overlay {
  opacity: 1;
}
.play-btn-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.card-checkbox {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary);
}
.duration-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}
.video-card-body {
  padding: 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.video-card-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 6px;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.video-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Smart Directory Assignment & Auto-Sync Panel ───────────── */
.assignment-panel {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  margin-top: 16px;
  border-left: 5px solid var(--primary);
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

.assignment-panel.assigned-active {
  background: #f0fdf4;
  border-color: #86efac;
  border-left: 5px solid #16a34a;
}

.smart-dir-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.smart-dir-header {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.smart-dir-header-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.smart-dir-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.smart-dir-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.smart-badge-sync {
  font-size: 0.72rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.smart-target-path-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.smart-target-label {
  font-size: 0.73rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.smart-target-code {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.82rem;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 3px 8px;
  border-radius: 4px;
  word-break: break-all;
}

/* 4-column smart responsive form grid */
.smart-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-items: end;
  width: 100%;
  box-sizing: border-box;
}

.smart-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.smart-field-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0;
}

/* Smart Segmented Switcher for Target Type */
.smart-segmented-control {
  display: flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px;
  height: 38px;
  box-sizing: border-box;
}

.smart-segment-btn {
  flex: 1;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 !important;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  user-select: none;
  transition: all 0.15s ease;
}

.smart-segment-btn input[type="radio"] {
  display: none;
}

.smart-segment-btn:has(input:checked) {
  background: #ffffff;
  color: #0284c7 !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.smart-select, .smart-input {
  height: 38px;
  padding: 7px 10px;
  font-size: 0.86rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
}

/* Smart Toggles Container - Fits and Never Overflows! */
.smart-toggles-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.smart-toggle-box {
  display: flex !important;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 13px;
  margin: 0 !important;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: normal !important;
  user-select: none;
  box-sizing: border-box;
  transition: all 0.15s ease;
  min-width: 0;
}

.smart-toggle-box:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.smart-toggle-box:has(input:checked) {
  background: #f0f9ff;
  border-color: #7dd3fc;
}

.smart-checkbox {
  width: 18px !important;
  height: 18px !important;
  accent-color: #0284c7;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

.smart-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.smart-toggle-headline {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: none !important;
  white-space: nowrap;
}

.smart-toggle-desc {
  font-size: 0.73rem;
  color: #64748b;
  text-transform: none !important;
  line-height: 1.25;
}

/* Actions Bar */
.smart-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.smart-submit-btn {
  font-size: 0.9rem !important;
  padding: 10px 18px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.smart-secondary-btn {
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
}

.dir-assign-path-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  margin-bottom: 12px;
  word-break: break-all;
}

.dir-assigned-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.dir-meta-card {
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #15803d;
  letter-spacing: 0.4px;
}

.meta-card-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.pulsing-dot-green {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulse-green 2s infinite;
  display: inline-block;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(22, 163, 74, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

/* ── Thumbnail miniature in tables ──────────────────────────── */
.table-thumb {
  width: 52px;
  height: 32px;
  object-fit: cover;
  border-radius: 3px;
  background: #0f172a;
  vertical-align: middle;
  border: 1px solid var(--border);
  margin-right: 8px;
}

/* ── Group tag badge ────────────────────────────────────────── */
.group-tag {
  background: #f3e8ff;
  color: #6b21a8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ══════════════════════════════════════════════════════════════
   Windows File & Folder Explorer (Fluent-inspired UI)
   ══════════════════════════════════════════════════════════════ */
.win-explorer {
  margin-top: 20px;
}

.win-explorer-frame {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Top Navigation & Address Bar ── */
.win-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.win-nav-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.win-nav-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s ease;
}

.win-nav-btn:hover:not(:disabled) {
  background: #e2e8f0;
  color: #0f172a;
}

.win-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.win-address-bar {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 3px 8px;
  height: 34px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
  overflow: hidden;
}

.win-address-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.win-address-icon {
  font-size: 1.05rem;
  margin-right: 6px;
  display: flex;
  align-items: center;
}

.win-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1;
  scrollbar-width: none;
}
.win-breadcrumbs::-webkit-scrollbar { display: none; }

.win-crumb {
  font-size: 0.8rem;
  font-weight: 500;
  color: #334155;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
}

.win-crumb:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.win-crumb.active {
  font-weight: 700;
  color: #0f172a;
}

.win-crumb-sep {
  color: #94a3b8;
  font-size: 0.72rem;
  user-select: none;
}

.win-copy-path-btn {
  background: transparent;
  border: none;
  font-size: 0.85rem;
  padding: 4px;
  cursor: pointer;
  color: #64748b;
  border-radius: 4px;
  margin-left: 4px;
}
.win-copy-path-btn:hover { background: #f1f5f9; color: #0f172a; }

/* ── Search Box ── */
.win-search-box {
  width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.win-search-icon {
  position: absolute;
  left: 9px;
  font-size: 0.8rem;
  color: #94a3b8;
  pointer-events: none;
}

.win-search-box input {
  width: 100%;
  height: 34px;
  padding: 4px 26px 4px 28px;
  font-size: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s ease;
}

.win-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.win-search-clear {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 50%;
}
.win-search-clear:hover { color: #0f172a; background: #e2e8f0; }

/* ── View Mode Switcher ── */
.win-view-toggle {
  display: flex;
  background: #e2e8f0;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.win-view-btn {
  background: transparent;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.win-view-btn:hover {
  color: #0f172a;
}

.win-view-btn.active {
  background: #ffffff;
  color: var(--primary-dark);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ── Ribbon Bar ── */
.win-ribbon-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 8px;
}

.win-ribbon-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.win-ribbon-sep {
  color: #cbd5e1;
}

.win-ribbon-stat {
  font-weight: 600;
  color: var(--primary-dark);
}

/* ── Content Viewport ── */
.win-explorer-content {
  padding: 16px 20px;
  min-height: 280px;
  max-height: 720px;
  overflow-y: auto;
  background: #ffffff;
}

.win-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.win-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Folders Grid (Large Tiles) ── */
.win-folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.win-folder-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.win-folder-card:hover {
  background: #f0f9ff;
  border-color: #7dd3fc;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.1);
}

.win-folder-card:active {
  transform: scale(0.98);
}

.win-folder-svg-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.win-folder-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.win-folder-name {
  font-weight: 600;
  font-size: 0.84rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-folder-sub {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 1px;
}

/* ── Table / Details View ── */
.win-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.win-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.win-details-table th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 2;
  user-select: none;
}

.win-details-table td {
  padding: 7px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.win-details-table tr:hover td {
  background: #f0f9ff;
}

.win-details-table tr.selected td {
  background: #e0f2fe;
}

.win-row-clickable {
  cursor: pointer;
}

.win-table-icon {
  width: 24px;
  height: 24px;
  vertical-align: middle;
  margin-right: 8px;
}

/* ── Empty Folder State ── */
.win-empty-folder {
  text-align: center;
  padding: 48px 20px;
  color: #64748b;
}

.win-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.7;
}

.win-empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

.win-empty-sub {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 16px;
}

/* ── Status Bar ── */
.win-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #64748b;
}

/* ══════════════════════════════════════════════════════════════
   MODERN DASHBOARD REDESIGN (Human-Crafted Studio Hub)
══════════════════════════════════════════════════════════════ */
.dash-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.dash-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.dash-greeting-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.dash-greeting-sub {
  font-size: 0.83rem;
  color: #64748b;
  margin: 3px 0 0 0;
}

.dash-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Production Pipeline Tracker */
.dash-pipeline-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
}

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

.pipeline-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
}

.pipeline-stats {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
}

.pipeline-bar-wrapper {
  height: 8px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
  display: flex;
  gap: 2px;
}

.pipeline-segment {
  height: 100%;
  transition: width 0.4s ease;
}
.seg-pending   { background: #f59e0b; }
.seg-changes   { background: #ef4444; }
.seg-ready     { background: #0284c7; }
.seg-published { background: #10b981; }

.pipeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
  font-size: 0.75rem;
  color: #475569;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Modern Stats Grid */
.modern-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.modern-stat-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.modern-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-color: #94a3b8;
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stat-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.bg-blue    { background: #e0f2fe; color: #0284c7; }
.bg-amber   { background: #fef3c7; color: #d97706; }
.bg-red     { background: #fee2e2; color: #dc2626; }
.bg-emerald { background: #d1fae5; color: #059669; }

.stat-trend {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.trend-neutral { background: #f1f5f9; color: #475569; }
.trend-warning { background: #fef3c7; color: #b45309; }
.trend-danger  { background: #fee2e2; color: #b91c1c; }
.trend-success { background: #d1fae5; color: #047857; }

.stat-main-val {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.stat-sub-text {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 5px;
  font-weight: 500;
}

/* ── Modern Studio Dashboard Preloader ────────────────────────── */
#page-dashboard {
  position: relative;
  min-height: calc(100vh - var(--topbar-h) - 48px);
}

.dash-preloader {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(240, 249, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 40px 20px;
}

.dash-preloader.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dash-preloader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 38px 46px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 48px -12px rgba(2, 132, 199, 0.2), 0 0 0 1px rgba(2, 132, 199, 0.08);
  max-width: 440px;
  width: 92%;
  animation: preloaderCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes preloaderCardIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.dash-preloader-spinner-wrap {
  position: relative;
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.dash-preloader-glow {
  position: absolute;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, rgba(2, 132, 199, 0) 70%);
  animation: preloaderGlowPulse 2.2s ease-in-out infinite;
}

.dash-preloader-ring {
  position: absolute;
  border-radius: 50%;
}

.dash-preloader-ring-outer {
  width: 84px;
  height: 84px;
  border: 3.5px solid rgba(2, 132, 199, 0.14);
  border-top-color: var(--primary);
  border-right-color: var(--accent2);
  animation: preloaderSpin 1.1s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}

.dash-preloader-ring-inner {
  width: 62px;
  height: 62px;
  border: 3px solid rgba(2, 132, 199, 0.1);
  border-bottom-color: var(--primary-dark);
  border-left-color: var(--accent);
  animation: preloaderSpinReverse 1.4s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}

.dash-preloader-icon {
  font-size: 28px;
  z-index: 2;
  animation: preloaderIconBob 2.2s ease-in-out infinite;
  filter: drop-shadow(0 3px 6px rgba(2, 132, 199, 0.35));
}

.dash-preloader-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}

.dash-preloader-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.48;
  margin-bottom: 22px;
  max-width: 320px;
}

.dash-preloader-bar {
  width: 220px;
  height: 6px;
  background: rgba(2, 132, 199, 0.12);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dash-preloader-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, #0284c7, #38bdf8, #0284c7);
  border-radius: 999px;
  animation: preloaderBarSlide 1.5s ease-in-out infinite;
}

@keyframes preloaderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes preloaderSpinReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(-360deg); }
}

@keyframes preloaderGlowPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.45; }
  50% { transform: scale(1.18); opacity: 0.9; }
}

@keyframes preloaderIconBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px) scale(1.06); }
}

@keyframes preloaderBarSlide {
  0% { left: -45%; width: 40%; }
  50% { width: 60%; }
  100% { left: 105%; width: 40%; }
}

/* Two-Column Dashboard Split */
.dashboard-split-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
}

@media (max-width: 1080px) {
  .dashboard-split-layout {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.dash-column-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.dash-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.dash-card-subtitle {
  font-size: 0.74rem;
  color: #64748b;
}

.dash-filter-pills {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 2px;
  border-radius: 6px;
}

.dash-pill {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dash-pill:hover {
  color: #0f172a;
}

.dash-pill.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dash-feed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
  background: #fafafa;
  transition: all 0.15s ease;
}

.dash-feed-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateX(2px);
}

.dash-feed-thumb {
  width: 64px;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.dash-feed-body {
  flex: 1;
  min-width: 0;
}

.dash-feed-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-feed-code {
  font-weight: 700;
  font-size: 0.8rem;
  color: #0284c7;
}

.dash-feed-title {
  font-size: 0.83rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-feed-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 3px;
}

.dash-storage-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
}

.dash-share-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-share-icon {
  font-size: 1.5rem;
}

.dash-share-details {
  flex: 1;
  min-width: 0;
}

.dash-share-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.dash-share-path {
  font-size: 0.72rem;
  font-family: monospace;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-share-meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.73rem;
  color: #475569;
}

.dash-groups-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.82rem;
}

.dash-group-name {
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ══════════════════════════════════════════════════════════════
   LECTURES SCREEN (Internal Scrollable Table & Pagination)
══════════════════════════════════════════════════════════════ */
#page-lectures:not(.active) {
  display: none !important;
}

#page-lectures.active {
  height: calc(100vh - var(--topbar-h) - 30px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 24px 8px;
  box-sizing: border-box;
}

.lectures-toolbar {
  flex-shrink: 0;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── View Mode Switcher (Folders vs All Videos) ── */
.view-mode-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 2px;
  border-radius: 8px;
  gap: 2px;
}

.btn-toggle-view {
  border: none;
  background: transparent;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-toggle-view:hover {
  color: #0284c7;
}

.btn-toggle-view.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── Modern Folder Hierarchy Explorer Panel ── */
.folder-hierarchy-panel {
  flex-shrink: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  transition: all 0.25s ease;
}

.folder-hierarchy-panel.collapsed {
  display: none !important;
}

.fhp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
  flex-wrap: nowrap;
}

.fhp-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 2px;
}

.fhp-title-tag {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #0284c7;
  background: #e0f2fe;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border: 1px solid #bae6fd;
}

.fhp-breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.fhp-crumb-btn {
  border: none;
  background: transparent;
  color: #334155;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.fhp-crumb-btn:hover {
  background: #e2e8f0;
  color: #0284c7;
}

.fhp-crumb-btn.active {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.25);
}

.fhp-crumb-separator {
  color: #94a3b8;
  font-size: 0.78rem;
  user-select: none;
}

.fhp-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.fhp-subfolder-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.fhp-subfolder-toggle input[type="checkbox"] {
  cursor: pointer;
  accent-color: #0284c7;
  margin: 0;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.fhp-nav-btn {
  font-weight: 600 !important;
  font-size: 0.74rem !important;
  padding: 3px 9px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  border-radius: 6px !important;
}

.fhp-nav-btn:hover:not(:disabled) {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
  border-color: #94a3b8 !important;
}

.fhp-nav-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Dynamic Child Folders Cards Grid ── */
.fhp-body {
  padding: 12px 16px;
  max-height: 185px;
  overflow-y: auto;
}

.fhp-folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.fhp-folder-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.fhp-folder-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #0284c7;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.fhp-folder-card:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
  background: #f0f9ff;
}

.fhp-folder-card:hover::before {
  opacity: 1;
}

.fhp-card-icon {
  font-size: 1.55rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.fhp-card-content {
  flex: 1;
  min-width: 0;
}

.fhp-card-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.fhp-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  flex-wrap: wrap;
}

.fhp-card-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: #0284c7;
  background: #e0f2fe;
  padding: 1px 6px;
  border-radius: 4px;
}

.fhp-card-sub {
  font-size: 0.70rem;
  color: #64748b;
}

.fhp-card-arrow {
  color: #cbd5e1;
  font-size: 1.2rem;
  font-weight: 300;
  transition: transform 0.15s ease, color 0.15s ease;
}

.fhp-folder-card:hover .fhp-card-arrow {
  color: #0284c7;
  transform: translateX(2px);
}

.fhp-leaf-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #166534;
  font-size: 0.83rem;
}

.fhp-leaf-icon {
  font-size: 1.4rem;
  color: #16a34a;
}

.fhp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  font-size: 0.76rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 8px;
}

.fhp-footer-left b {
  color: #0369a1;
}

/* ── Interactive Video Folder Chip in Table Rows ── */
.video-folder-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.73rem;
  font-weight: 600;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 4px;
  transition: all 0.15s ease;
}

.video-folder-chip:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 1px 4px rgba(2, 132, 199, 0.2);
}

.video-folder-chip .chip-folder-icon {
  font-size: 0.8rem;
}

.lectures-table-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.lectures-table-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
}

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

.lectures-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f8fafc;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-size: 0.74rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 14px;
  white-space: nowrap;
}

.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.sortable-th:hover {
  background-color: #e2e8f0;
  color: #0284c7;
}

.sort-icon {
  display: inline-block;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-left: 3px;
}

.sortable-th.sorted-asc .sort-icon {
  color: #0284c7;
  font-weight: 800;
}

.sortable-th.sorted-desc .sort-icon {
  color: #0284c7;
  font-weight: 800;
}

/* Smart Action Button Container */
.smart-action-hub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-smart-primary {
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 5px;
}

.smart-dots-btn {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.82rem;
  color: #475569;
  transition: all 0.15s ease;
}

.smart-dots-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Pagination Bar */
.lectures-pagination-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8rem;
  color: #475569;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pagination-page-size {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.pagination-page-size select {
  padding: 3px 8px;
  height: 30px;
  font-size: 0.8rem;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 3px;
}

.page-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-btn:hover:not(:disabled) {
  border-color: #0284c7;
  color: #0284c7;
  background: #f0f9ff;
}

.page-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Video Watch Status Badges & Resume Playback Banner ── */
.resume-prompt-banner {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 9px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: #166534;
  box-shadow: 0 1px 3px rgba(22, 101, 52, 0.08);
}

.watch-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.watch-badge-completed {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.watch-badge-partial {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.watch-badge-unviewed {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* ══════════════════════════════════════════════════════════════
   NETWORK SHARE STATUS & VIDEO OFFLINE OVERLAY
   ══════════════════════════════════════════════════════════════ */

.badge-online {
  background: #dcfce7 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.badge-offline {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.status-dot.online {
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.6);
}
.status-dot.offline {
  background: #dc2626;
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.6);
}

/* Video Source Offline Overlay for Player */
.video-source-offline-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
  text-align: center;
  animation: fadeInOffline 0.25s ease-out;
}

@keyframes fadeInOffline {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

.offline-card-inner {
  max-width: 540px;
  width: 100%;
  background: rgba(30, 41, 59, 0.96);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(239, 68, 68, 0.2);
}

.offline-card-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  display: inline-block;
  animation: pulseOffline 2.2s infinite ease-in-out;
}

@keyframes pulseOffline {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.5)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.9)); }
}

.offline-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f87171;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.offline-card-msg {
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 14px;
}

.offline-card-details {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-family: monospace;
  color: #94a3b8;
  word-break: break-all;
  margin-bottom: 16px;
  text-align: left;
}

.offline-card-details code {
  color: #fca5a5;
  font-weight: 600;
}

.offline-card-hints {
  background: rgba(239, 68, 68, 0.1);
  border-left: 3px solid #ef4444;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #e2e8f0;
  text-align: left;
  margin-bottom: 20px;
  line-height: 1.5;
}

.offline-card-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   ROLES & GRANULAR PERMISSIONS STYLING
══════════════════════════════════════════════════════════════ */
.badge-system {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.badge-custom {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-perm-count {
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 0.72rem;
  border: 1px solid #cbd5e1;
}

.perm-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
}

.perm-pill.more-pill {
  background: #e0e7ff;
  color: #3730a3;
  font-weight: 700;
}

.permissions-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.perm-cat-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.perm-cat-card:hover {
  border-color: #94a3b8;
}

.perm-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.perm-cat-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text-primary);
}

.perm-cat-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
  padding: 12px;
}

.perm-item-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.perm-item-box:hover {
  background: #f0fdf4;
  border-color: #86efac;
}

.perm-item-box.selected {
  background: #eff6ff;
  border-color: #93c5fd;
}

.perm-item-box input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
}

.perm-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.perm-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.perm-code {
  font-family: monospace;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.perm-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.3;
  margin-top: 2px;
}

.role-slug-badge {
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}



