/* ============================================================
   Edstutia LMS — Design System
   Warm, rounded, highly legible. Light + dark themes.
   ============================================================ */

:root {
  --lime: #8DE02E;            /* brand yellow-green, overridable by tweak */
  --lime-strong: #5F9417;     /* readable lime for text on light */
  --lime-soft: #EEF9E2;       /* tint surface */
  --blue: #2C5E94;            /* Edstutia blue */
  --blue-strong: #1D436D;

  --bg: #F7F7F7;
  --bg-2: #EBEBEB;
  --surface: #FFFFFF;
  --surface-2: #FAFAFA;
  --text: #111111;
  --text-muted: #666666;
  --border: #E5E5E5;
  --border-strong: #CCCCCC;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.08), 0 24px 48px rgba(0,0,0,.10);
  --brand-ink: #000000;       /* dark chip behind the logo */
  --ring: rgba(141,224,46,.40);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --font-head: "Grotesk Nouveau", sans-serif;
  --font-body: "Grotesk Nouveau", sans-serif;

  --scale: 1;                 /* text-size control multiplier */
  --ease: cubic-bezier(.4,.1,.2,1);
}

[data-theme="dark"] {
  --lime: #A3F24A;
  --lime-strong: #C3FA84;
  --lime-soft: #1E310C;
  --blue: #6BA8E8;
  --blue-strong: #9DC5F0;

  --bg: #0A0A0A;
  --bg-2: #141414;
  --surface: #1C1C1C;
  --surface-2: #262626;
  --text: #F2F2F2;
  --text-muted: #999999;
  --border: #333333;
  --border-strong: #4A4A4A;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 28px rgba(0,0,0,.40);
  --shadow-lg: 0 6px 16px rgba(0,0,0,.45), 0 28px 56px rgba(0,0,0,.55);
  --brand-ink: #050505;
  --ring: rgba(163,242,74,.40);
}

[data-contrast="high"] {
  --text-muted: var(--text);
  --border: var(--text);
  --border-strong: var(--text);
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: calc(17px * var(--scale));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .002em;
}

[data-motion="reduced"] * {
  animation-duration: .001ms !important;
  transition-duration: .001ms !important;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--text);
}

p { margin: 0; }
button { font-family: inherit; }

::selection { background: var(--lime); color: #11160C; }

a { color: var(--lime-strong); }

/* focus visibility — important for accessibility */
:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- App layout ---------- */
.app {
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 100vh;
  transition: grid-template-columns .3s cubic-bezier(0.16, 1, 0.3, 1);
}
.app.sidebar-closed { grid-template-columns: 0px 1fr; }
.app.topnav { grid-template-columns: 1fr; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  width: 268px;
  transition: opacity .2s, transform .2s;
}
.app.sidebar-closed .sidebar {
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
}

.sidebar-toggle-wrapper {
  position: fixed;
  top: 50%;
  left: 268px;
  transform: translate(-50%, -50%);
  z-index: 200;
  transition: left .3s cubic-bezier(0.16, 1, 0.3, 1), transform .3s cubic-bezier(0.16, 1, 0.3, 1);
}
.app.sidebar-closed .sidebar-toggle-wrapper {
  left: 0;
  transform: translate(0, -50%);
}

.sidebar-toggle-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  color: var(--text-muted);
  transition: all .2s var(--ease);
}
.sidebar-toggle-btn:hover {
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: scale(1.15);
}
.app.sidebar-closed .sidebar-toggle-btn {
  border-radius: 0 8px 8px 0;
  border-left: none;
  width: 24px;
  height: 48px;
}
.app.sidebar-closed .sidebar-toggle-btn:hover {
  transform: scaleX(1.15);
}
.brand-chip {
  background: var(--brand-ink);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
}
.brand-chip img { width: 150px; height: auto; display: block; }

.nav-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 14px 6px;
}
.nav-group-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 14px 8px;
  opacity: 0.8;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  position: relative;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.nav-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-2);
  opacity: 0;
  transition: opacity .2s;
  z-index: 0;
  border-radius: var(--radius-sm);
}
.nav-item:hover::before { opacity: 1; }
.nav-item.active::before {
  background: linear-gradient(90deg, var(--lime-soft), transparent);
  opacity: 1;
}

.nav-item-indicator {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 4px; height: 60%;
  background: var(--lime);
  border-radius: 0 4px 4px 0;
  transition: transform .3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2;
}
.nav-item.active .nav-item-indicator { transform: translateY(-50%) scaleY(1); }

.nav-ic-wrap, .nav-label-text { position: relative; z-index: 1; }
.nav-label-text { flex: 1; }

.nav-item.active { color: var(--lime-strong); }
.nav-item .nav-ic-wrap { color: var(--text-muted); transition: color .2s, transform .2s; }
.nav-item:hover .nav-ic-wrap { color: var(--text); transform: scale(1.05); }
.nav-item.active .nav-ic-wrap { color: var(--lime-strong); transform: scale(1.05); }

.sidebar-foot { margin-top: auto; padding-top: 14px; }

/* ---------- Profile Menu ---------- */
.profile-menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
}
.profile-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding: 8px;
  animation: profilePop 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: bottom left;
}
@keyframes profilePop {
  0% { opacity: 0; transform: scale(0.95) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.topnav-menu-wrapper { position: absolute; right: 0; bottom: 0; }
.topnav-menu-wrapper .profile-menu {
  bottom: auto;
  top: calc(100% + 12px);
  left: auto;
  right: 0;
  transform-origin: top right;
  animation-name: profilePopTop;
}
@keyframes profilePopTop {
  0% { opacity: 0; transform: scale(0.95) translateY(-10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.profile-menu-header {
  display: flex;
  flex-direction: column;
  padding: 10px 12px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.profile-menu-header strong { font-size: 15px; color: var(--text); line-height: 1.2; }
.profile-menu-header span { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.profile-menu-item:hover { background: var(--bg-2); }
.profile-menu-item .ic { color: var(--text-muted); transition: color 0.15s; }
.profile-menu-item:hover .ic { color: var(--text); }

.profile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.profile-menu-item.danger { color: #e54d4d; }
.profile-menu-item.danger .ic { color: #e54d4d; }
.profile-menu-item.danger:hover { background: rgba(229, 77, 77, 0.08); }

/* ---------- Top bar (in-content) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 14px 32px;
}
.topbar .search {
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 10px 18px;
  color: var(--text-muted);
}
.topbar .search input {
  border: none; background: none; outline: none; flex: 1;
  font-family: inherit; font-size: 15px; color: var(--text);
}

/* top-nav variant bar */
.topnav-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 12px 28px; position: sticky; top: 0; z-index: 50;
}
.topnav-bar .brand-chip { margin: 0 18px 0 0; padding: 9px 13px; }
.topnav-bar .brand-chip img { width: 116px; }
.topnav-links { display: flex; gap: 4px; }
.topnav-bar .nav-item { width: auto; }

/* ---------- Content ---------- */
.content { min-width: 0; display: flex; flex-direction: column; }
.page { padding: 32px 40px 80px; max-width: 1180px; width: 100%; margin: 0 auto; }
.page-wide { max-width: 1320px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 700; font-size: 16px; letter-spacing: .01em;
  padding: 12px 22px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s var(--ease), background .15s, box-shadow .15s, border-color .15s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn .ic { width: 19px; height: 19px; }
.btn-primary { background: var(--lime); color: #14180D; box-shadow: 0 4px 14px rgba(143,191,46,.35); }
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 6px 18px rgba(143,191,46,.45); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-soft { background: var(--lime-soft); color: var(--lime-strong); }
.btn-soft:hover { filter: brightness(.98); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 15px 28px; font-size: 18px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Form inputs ---------- */
.input {
  width: 100%; box-sizing: border-box;
  background: var(--bg); border: 1.5px solid var(--border);
  color: var(--text); border-radius: 10px;
  padding: 10px 13px; font-size: 15px; font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(143,191,46,.18); }
.input::placeholder { color: var(--text-muted); opacity: .7; }
textarea.input { resize: vertical; line-height: 1.6; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 24px; }
.card-hover { transition: transform .18s var(--ease), box-shadow .18s, border-color .18s; cursor: pointer; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }

/* ---------- Pills / chips / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 800; letter-spacing: .03em;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: var(--bg-2); color: var(--text-muted);
  text-transform: uppercase;
}
.pill.async { background: color-mix(in srgb, var(--lime) 18%, var(--surface)); color: var(--lime-strong); }
.pill.sync { background: color-mix(in srgb, var(--blue) 24%, var(--surface)); color: var(--blue-strong); }
[data-theme="dark"] .pill.sync { color: var(--blue-strong); }
.pill.mixed { background: color-mix(in srgb, #6BA8E8 22%, var(--surface)); color: #2C5E94; }
[data-theme="dark"] .pill.mixed { color: #9DC5F0; }

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

/* ---------- Progress ---------- */
.progress { height: 10px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--lime); border-radius: 99px; transition: width .6s var(--ease); }
.ring-wrap { position: relative; display: inline-grid; place-items: center; }
.ring-wrap .ring-num { position: absolute; font-family: var(--font-head); font-weight: 800; }

/* ---------- Misc helpers ---------- */
.muted { color: var(--text-muted); }
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-6 { gap: 6px; } .gap-10 { gap: 10px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.grid { display: grid; }
.stack > * + * { margin-top: 16px; }
.divider { height: 1px; background: var(--border); border: none; }
.eyebrow { font-family: var(--font-body); font-weight: 700; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--lime-strong); }

/* lock icon overlay on locked lessons */
.locked-tag { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-weight: 700; font-size: 13px; }

/* accessibility toolbar */
.a11y-bar { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  display: inline-grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--bg-2); border-color: var(--border-strong); }
.icon-btn.on { background: var(--lime-soft); border-color: var(--lime); color: var(--lime-strong); }
.icon-btn .ic { width: 20px; height: 20px; }

.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--lime), #6E9A1E);
  color: #14180D; font-family: var(--font-head); font-weight: 800;
  display: grid; place-items: center; font-size: 15px; flex: none;
}

/* tooltip */
.tip { position: relative; }

/* fade/slide entrance — disabled: must never hide content if rAF is throttled */
.enter { opacity: 1; }

/* section heading */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; gap: 16px; }
.sec-head h2 { font-size: 24px; white-space: nowrap; }

/* responsive */
@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .page { padding: 24px 18px 80px; }
}

/* ---------- Premium Login Screen ---------- */
.login-split {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.login-hero {
  flex: 1.2;
  position: relative;
  background-color: var(--brand-ink);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-hero img.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.login-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(14, 20, 10, 0.4) 0%, rgba(14, 20, 10, 0.9) 100%);
  z-index: 1;
}

.login-hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 60px;
  max-width: 600px;
  text-align: left;
}

.login-hero-content h2 {
  color: #fff;
  font-size: 48px;
  line-height: 1.1;
  margin-bottom: 24px;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.login-hero-content p {
  font-size: 20px;
  opacity: 0.9;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.login-panel-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--surface);
  position: relative;
  box-shadow: -20px 0 60px rgba(0,0,0,0.05);
}

.login-panel {
  width: 100%;
  max-width: 440px;
  animation: floatUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes floatUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.login-form-group label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
}

.login-input {
  background: var(--bg);
  border: 2px solid transparent;
  color: var(--text);
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 16px;
  outline: none;
  transition: all 0.2s var(--ease);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.login-input:focus {
  border-color: var(--lime);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--ring);
}

.login-btn {
  width: 100%;
  padding: 18px;
  font-size: 18px;
  border-radius: var(--radius);
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.login-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: all 0.6s ease;
}

.login-btn:hover::after {
  left: 100%;
}

@media (max-width: 960px) {
  .login-split { flex-direction: column; }
  .login-hero { flex: none; height: 300px; }
  .login-panel-wrap { padding: 40px 20px; }
}

/* ---------- Onboarding Tour ---------- */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out forwards;
}

.tour-modal {
  width: 90%;
  max-width: 800px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tour-slide {
  display: flex;
  flex-direction: column;
  min-height: 400px;
}

.tour-slide-graphic {
  height: 240px;
  background: linear-gradient(135deg, var(--lime-soft), var(--bg-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lime-strong);
}

.tour-slide-content {
  padding: 40px;
  text-align: center;
}

.tour-slide-content h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.tour-slide-content p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

.tour-controls {
  padding: 20px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
}

.tour-dots {
  display: flex;
  gap: 8px;
}

.tour-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
  transition: all 0.3s ease;
}

.tour-dot.active {
  background: var(--lime-strong);
  transform: scale(1.2);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.tour-welcome-banner {
  background: linear-gradient(135deg, var(--brand-ink), #1a1a1a);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  animation: slideDownBanner 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.tour-welcome-banner h1,
.tour-welcome-banner h2,
.tour-welcome-banner h3,
.tour-welcome-banner p { color: #fff; }

.tour-welcome-banner::after {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--lime) 0%, transparent 70%);
  opacity: 0.15;
  border-radius: 50%;
  pointer-events: none;
}

@keyframes slideDownBanner {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Skeleton loader ---------- */
.skeleton {
  background: var(--surface-2);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--surface) 65%, transparent) 50%, transparent 100%);
  animation: shimmer 1.4s ease-in-out infinite;
  background-size: 200% 100%;
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ---------- Video player ---------- */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------- Tool card wrapper ---------- */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-top: 22px;
}

/* ---------- Progress bar in upload ---------- */
.progress { height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--lime); border-radius: 99px; transition: width .6s var(--ease); }

/* ---------- Search dropdown ---------- */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  overflow: hidden;
  animation: profilePop .18s cubic-bezier(.16,1,.3,1) forwards;
  transform-origin: top left;
}
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-2); }

/* ---------- Admin tab underline ---------- */
.admin-tab-bar { border-bottom: 1px solid var(--border); display: flex; gap: 0; margin-bottom: 2px; }
