:root {
  /* Color Palette - Sudan Modern Premium */
  --primary: #0d3f36; /* Deep Forest Green */
  --primary-light: #16564b;
  --accent: #c89030; /* Royal Gold */
  --accent-soft: #eacb96;
  --bg-page: #fbf5e9; /* Cream Ivory */
  --bg-card: rgba(255, 255, 255, 0.76);
  --text-main: #13211d;
  --text-muted: #5d6a63;
  --white: #ffffff;
  --black: #000000;
  
  /* Status Colors */
  --success: #1f7b5d;
  --warning: #9d6c19;
  --danger: #a03d31;
  --info: #2d5a8e;

  /* Spacing & Borders */
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --shadow-sm: 0 8px 24px rgba(13, 63, 54, 0.06);
  --shadow-md: 0 16px 48px rgba(13, 63, 54, 0.12);
  --shadow-lg: 0 24px 72px rgba(13, 63, 54, 0.18);
  --line: rgba(13, 63, 54, 0.08);
  
  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: "Cairo", "Changa", system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.theme-reels {
  --primary: #0dd6c7;
  --primary-light: #17a69a;
  --accent: #ff6b57;
  --accent-soft: #ffd1cb;
  --bg-page: #0f1115;
  --bg-card: rgba(19, 24, 31, 0.84);
  --text-main: #eef4f3;
  --text-muted: #93a3a6;
  --line: rgba(255, 255, 255, 0.08);
  color-scheme: dark;
}

body.theme-reels .ambient-layer {
  background:
    radial-gradient(760px 420px at 88% -2%, rgba(255, 107, 87, 0.18), transparent 58%),
    radial-gradient(860px 420px at -12% 22%, rgba(13, 214, 199, 0.18), transparent 60%),
    linear-gradient(180deg, #090b0f 0%, #11151c 42%, #0e1117 100%);
}

body.theme-reels .site-header,
body.theme-reels .content-card-premium,
body.theme-reels .page-intro-card,
body.theme-reels .catalog-card-new,
body.theme-reels .record-card,
body.theme-reels .site-footer {
  background: rgba(18, 23, 31, 0.88);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

body.theme-reels .site-nav .nav-link.is-active,
body.theme-reels .button.button-primary,
body.theme-reels .mobile-nav a.is-active {
  background: linear-gradient(135deg, #ff6b57, #ff875e);
  color: #fff;
}

body.theme-reels .button.button-ghost,
body.theme-reels .button.button-secondary-glass {
  border-color: rgba(255, 255, 255, 0.12);
  color: #eef4f3;
}

body.theme-reels .brand-copy strong,
body.theme-reels .page-intro-card h1,
body.theme-reels .content-card-premium h3,
body.theme-reels .footer-links h4 {
  color: #f6fbfb;
}

body.theme-reels .site-nav .nav-link,
body.theme-reels .brand-copy small,
body.theme-reels .content-card-premium p,
body.theme-reels .record-card p,
body.theme-reels .record-card small,
body.theme-reels .footer-brand p,
body.theme-reels .footer-links a,
body.theme-reels .small-text,
body.theme-reels .empty-state-modern p,
body.theme-reels .empty-card p {
  color: #dce8ea;
}

body.theme-reels .record-card strong,
body.theme-reels .content-card-premium strong,
body.theme-reels .empty-state-modern strong,
body.theme-reels .empty-card strong,
body.theme-reels .page-intro-card p,
body.theme-reels .page-intro-card .eyebrow {
  color: #f6fbfb;
}

body.theme-reels .site-nav .nav-link:hover,
body.theme-reels .site-nav .nav-link.is-active {
  color: #ffffff;
}

body.theme-reels .button.button-secondary,
body.theme-reels .button.button-secondary-outline,
body.theme-reels .button.button-ghost {
  color: #f6fbfb;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.admin-appearance-card {
  margin-bottom: 22px;
}

.admin-theme-preview {
  min-height: 100%;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(15, 79, 67, 0.08), rgba(200, 144, 48, 0.08));
  border: 1px solid rgba(15, 79, 67, 0.12);
}

.admin-theme-preview strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
}

.admin-theme-preview p {
  margin: 0;
  color: var(--text-muted);
}

.theme-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.theme-option-card {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(15, 79, 67, 0.12);
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.theme-option-card strong {
  display: block;
  margin-bottom: 8px;
}

.theme-option-card p {
  margin: 0;
  color: var(--text-muted);
}

.theme-option-card.is-active {
  border-color: rgba(200, 144, 48, 0.6);
  box-shadow: 0 18px 36px rgba(13, 63, 54, 0.12);
  transform: translateY(-2px);
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

/* Base Layout */
.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 120px;
}

/* Header Redesign */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
  position: sticky;
  top: 16px;
  z-index: 1000;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  box-shadow: var(--shadow-sm);
}

.brand-copy strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.brand-copy small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Catalog Layout */
.catalog-main-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 32px;
}

/* ===== Unified Shell v4 ===== */
.skip-link {
  position: fixed;
  top: 8px;
  right: 8px;
  transform: translateY(-160%);
  background: #0f4f43;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 3000;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(880px 420px at 95% -8%, rgba(200, 144, 48, 0.2), transparent 60%),
    radial-gradient(760px 360px at -15% 25%, rgba(15, 79, 67, 0.18), transparent 62%),
    linear-gradient(180deg, #fcf8ef 0%, #f8f2e6 38%, #f7f0e2 100%);
}

.app-shell {
  width: min(1440px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 118px;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 79, 67, 0.12);
  box-shadow: 0 18px 40px rgba(13, 63, 54, 0.1);
  border-radius: 22px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-modern {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(200, 144, 48, 0.2), rgba(15, 79, 67, 0.2));
  border: 1px solid rgba(15, 79, 67, 0.2);
}

.logo-img-header {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand-copy {
  line-height: 1.1;
}

.brand-copy strong {
  display: block;
  color: #0f3d34;
  font-weight: 900;
  font-size: 1.03rem;
}

.brand-copy small {
  color: #6a7a74;
  font-size: 0.76rem;
  font-weight: 700;
}

.site-nav .nav-link {
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 12px;
}

.site-nav .nav-link.is-active {
  background: linear-gradient(135deg, #0f4f43, #1a6a5b);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button-icon-ghost {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(15, 79, 67, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: #0f4f43;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.button-icon-ghost:hover {
  background: rgba(15, 79, 67, 0.08);
}

.page-intro-card {
  margin: 18px 0 26px;
  border-radius: 24px;
  padding: 30px 28px;
  background: linear-gradient(130deg, #0f4f43 0%, #1a6a5b 68%, #2d8f7e 100%);
  color: #fff;
  box-shadow: 0 22px 50px rgba(14, 62, 53, 0.25);
}

.page-intro-card .eyebrow {
  margin: 0 0 8px;
  color: rgba(255, 232, 190, 0.95);
  font-weight: 800;
}

.page-intro-card h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.3vw, 2rem);
  line-height: 1.35;
}

.page-intro-card p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.9);
  max-width: 76ch;
}

.app-frame {
  display: block;
  min-height: 52vh;
}

.mobile-nav {
  border: 1px solid rgba(15, 79, 67, 0.15);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
}

.mobile-nav a {
  font-weight: 700;
  color: #4f5d58;
}

.mobile-nav a.is-active {
  color: #0f4f43;
}

.site-footer {
  margin-top: 42px;
  padding: 30px 24px 22px;
  border-radius: 24px;
  border: 1px solid rgba(15, 79, 67, 0.1);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 38px rgba(13, 63, 54, 0.08);
}

.footer-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: 1.5fr 1fr 1fr;
}

.footer-logo {
  width: 46px;
  height: 46px;
}

.footer-links h4 {
  margin: 0 0 10px;
  color: #0f4f43;
}

.footer-links a {
  display: block;
  margin-bottom: 8px;
  color: #4f5d58;
  font-weight: 700;
}

.footer-bottom {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 79, 67, 0.1);
  color: #5a6863;
  font-weight: 700;
}

/* Theme Reels Polish v2 */
body.theme-reels {
  --primary: #25dfd0;
  --primary-light: #53f2e4;
  --accent: #ff7c67;
  --accent-soft: #ffd9d2;
  --bg-page: #090d12;
  --bg-card: rgba(11, 16, 24, 0.9);
  --text-main: #f5fbfc;
  --text-muted: #b9c7cb;
  --line: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

body.theme-reels .site-header {
  background:
    linear-gradient(180deg, rgba(12, 17, 25, 0.95), rgba(10, 15, 22, 0.88));
  border-color: rgba(83, 242, 228, 0.12);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 124, 103, 0.05);
}

body.theme-reels .logo-modern {
  background:
    linear-gradient(145deg, rgba(37, 223, 208, 0.18), rgba(255, 124, 103, 0.14));
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

body.theme-reels .brand-copy strong,
body.theme-reels .brand-copy small {
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.26);
}

body.theme-reels .brand-copy strong {
  color: #ffffff;
}

body.theme-reels .brand-copy small {
  color: #c7d4d7;
}

body.theme-reels .site-nav .nav-link {
  color: #d8e5e8;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
}

body.theme-reels .site-nav .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-reels .site-nav .nav-link.is-active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 14px 30px rgba(255, 124, 103, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

body.theme-reels .button.button-primary {
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  box-shadow: 0 16px 34px rgba(255, 124, 103, 0.28);
}

body.theme-reels .button.button-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 18px 38px rgba(255, 124, 103, 0.34);
}

body.theme-reels .button.button-ghost,
body.theme-reels .button.button-secondary-glass {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f3f9fa;
}

body.theme-reels .button.button-ghost:hover,
body.theme-reels .button.button-secondary-glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

body.theme-reels .button-icon-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #eef7f7;
}

body.theme-reels .button-icon-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
}

body.theme-reels .page-intro-card {
  background:
    linear-gradient(135deg, rgba(10, 15, 24, 0.98), rgba(18, 28, 38, 0.92) 58%, rgba(31, 51, 60, 0.9) 100%);
  border: 1px solid rgba(83, 242, 228, 0.1);
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.theme-reels .page-intro-card .eyebrow {
  color: #9ff5ec;
}

body.theme-reels .page-intro-card h1,
body.theme-reels .page-intro-card p,
body.theme-reels .small-text,
body.theme-reels .footer-brand p,
body.theme-reels .footer-bottom,
body.theme-reels .record-card p,
body.theme-reels .content-card-premium p,
body.theme-reels .content-card-premium li,
body.theme-reels .content-card-premium label,
body.theme-reels .content-card-premium span {
  color: inherit;
}

body.theme-reels .small-text,
body.theme-reels .content-card-premium p,
body.theme-reels .record-card p,
body.theme-reels .footer-brand p,
body.theme-reels .footer-bottom,
body.theme-reels .brand-copy small {
  color: #c0ced2;
}

body.theme-reels .field-modern input,
body.theme-reels .field-modern textarea,
body.theme-reels .field-modern select,
body.theme-reels .field-modern-sm input,
body.theme-reels .field-modern-sm textarea,
body.theme-reels .field-modern-sm select,
body.theme-reels .input-sm-glass,
body.theme-reels .select-sm-glass,
body.theme-reels .select-full-sm {
  background: rgba(255, 255, 255, 0.045);
  color: #f5fbfc;
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-reels .field-modern input::placeholder,
body.theme-reels .field-modern textarea::placeholder,
body.theme-reels .field-modern-sm input::placeholder,
body.theme-reels .field-modern-sm textarea::placeholder,
body.theme-reels .input-sm-glass::placeholder {
  color: #93a8af;
}

body.theme-reels .field-modern input:focus,
body.theme-reels .field-modern textarea:focus,
body.theme-reels .field-modern select:focus,
body.theme-reels .field-modern-sm input:focus,
body.theme-reels .field-modern-sm textarea:focus,
body.theme-reels .field-modern-sm select:focus,
body.theme-reels .input-sm-glass:focus,
body.theme-reels .select-sm-glass:focus,
body.theme-reels .select-full-sm:focus {
  border-color: rgba(83, 242, 228, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 223, 208, 0.12);
}

body.theme-reels .content-card-premium,
body.theme-reels .record-card,
body.theme-reels .site-footer {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body.theme-reels .user-chip-modern {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f4fafb;
}

body.theme-reels .user-chip-role {
  color: #98f6ec;
}

body.theme-reels .footer-links h4,
body.theme-reels .footer-links a {
  color: #eef7f8;
}

body.theme-reels .footer-links a:hover {
  color: #ffffff;
}

body.theme-reels .mobile-nav {
  background: rgba(10, 14, 21, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

body.theme-reels .mobile-nav a {
  color: #c8d6da;
}

body.theme-reels .mobile-nav a svg {
  opacity: 0.96;
}

body.theme-reels .mobile-nav a.is-active,
body.theme-reels .mobile-nav a:hover {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(255, 124, 103, 0.2), rgba(255, 124, 103, 0.08));
}

body.theme-reels .mobile-nav a.is-active svg {
  filter: drop-shadow(0 6px 16px rgba(255, 124, 103, 0.26));
}

body.theme-reels .empty-card {
  padding: 28px 22px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f5fbfc;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

body.theme-reels .empty-card strong {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 1.02rem;
}

body.theme-reels .empty-card p {
  margin: 0;
  color: #c8d6da;
}

body.theme-reels .loading-block {
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.04) 18%, rgba(255, 255, 255, 0.1) 30%, rgba(255, 255, 255, 0.04) 42%),
    rgba(255, 255, 255, 0.04);
  background-size: 220% 100%;
}

@media (max-width: 980px) {
  .app-shell {
    width: min(1440px, calc(100% - 16px));
    padding-top: 12px;
  }

  .site-header {
    padding: 12px 14px;
    gap: 12px;
    top: 10px;
  }

  .brand-copy small {
    display: none;
  }

  .page-intro-card {
    border-radius: 18px;
    padding: 20px 16px;
    margin-top: 12px;
  }

  .site-footer {
    border-radius: 18px;
    padding: 22px 14px 90px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .brand-wrap {
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-copy strong,
  .brand-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .page-intro-card {
    padding: 18px 16px;
  }

  .dashboard-header-premium,
  .content-card-premium,
  .tool-card-premium,
  .create-course-card-premium,
  .legal-page-premium {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .dashboard-header-premium .header-content h1 {
    font-size: clamp(1.65rem, 6vw, 2.2rem);
  }

  .form-footer-modern,
  .lesson-actions-footer,
  .avatar-upload-group {
    flex-direction: column;
    align-items: stretch;
  }

  .avatar-upload-group {
    text-align: center;
  }

  .catalog-header {
    padding: 38px 18px;
    border-radius: 24px;
  }

  .catalog-header h1 {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
  }

  .filter-card {
    position: static;
    top: auto;
    padding: 24px 18px;
  }

  .catalog-grid-new {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
  }

  .card-body {
    padding: 18px;
  }

  .results-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
  }

  .premium-table {
    min-width: 760px;
  }

  .admin-table-shell {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
  }

  .admin-control-header {
    align-items: stretch;
  }

  .admin-control-nav {
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 1fr);
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
  }

  .admin-nav-item {
    min-width: 190px;
    scroll-snap-align: start;
  }

  .admin-brand-card,
  .admin-sidebar-note {
    padding: 18px;
    border-radius: 22px;
  }

  .admin-control-sidebar {
    gap: 14px;
  }

  .admin-control-main,
  .admin-v2-panel,
  .studio-workspace-premium,
  .profile-workspace-premium,
  .student-dashboard-modern,
  .builder-workspace-premium {
    gap: 18px;
  }

  .studio-grid-layout,
  .studio-live-layout,
  .profile-grid-layout,
  .dashboard-grid-layout,
  .two-column,
  .contact-grid-modern {
    grid-template-columns: 1fr;
  }

  .studio-stream-endpoint code,
  .studio-credential-row code {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: calc(100% - 12px);
  }

  .site-header {
    padding: 10px 12px;
    border-radius: 18px;
    margin-bottom: 18px;
  }

  .logo-modern {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .logo-img-header {
    width: 30px;
    height: 30px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .button,
  .header-actions .button-icon-ghost {
    min-height: 44px;
  }

  .dashboard-header-premium,
  .content-card-premium,
  .tool-card-premium,
  .create-course-card-premium {
    padding: 18px 14px;
    border-radius: 18px;
  }

  .button {
    min-height: 48px;
    padding-inline: 18px;
  }

  .card-header-modern {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .card-header-modern,
  .section-title-modern {
    margin-bottom: 18px;
  }

  .admin-metrics-grid,
  .metric-grid-premium,
  .catalog-grid-new {
    grid-template-columns: 1fr;
  }

  .admin-course-card,
  .record-card,
  .admin-mini-card,
  .admin-health-item {
    border-radius: 18px;
  }

  .lesson-actions-footer .button,
  .form-footer-modern .button,
  .admin-filter-row > *,
  .admin-inline-controls > *,
  .admin-course-actions > * {
    width: 100%;
  }

  .premium-table th,
  .premium-table td {
    padding: 12px 10px;
  }
}

.catalog-header {
  text-align: center;
  padding: 60px 0;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-lg);
  margin-bottom: 48px;
}

.catalog-header h1 {
  font-size: 3rem;
  margin: 16px 0;
}

.catalog-header .eyebrow {
  color: var(--accent-soft);
}

.header-subtitle {
  opacity: 0.8;
  max-width: 60ch;
  margin: 0 auto;
}

.filter-card {
  position: sticky;
  top: 100px;
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.results-toolbar {
  margin-bottom: 24px;
  font-weight: 700;
  color: var(--primary);
}

.catalog-grid-new {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* Premium Course Card */
.catalog-card-new {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.catalog-card-new:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card-thumb {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.card-badge-top {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.8rem;
}

.card-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-meta-top {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.card-title-lg {
  font-size: 1.25rem;
  margin: 0 0 12px;
  line-height: 1.4;
  color: var(--primary);
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

.card-instructor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.inst-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.card-footer-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0;
  cursor: pointer;
}

@media (min-width: 900px) {
  .catalog-main-shell {
    grid-template-columns: 320px 1fr;
  }
}
.site-nav {
  display: none;
  gap: 8px;
}

.site-nav a {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
  color: var(--text-muted);
}

.site-nav a:hover {
  background: rgba(13, 63, 54, 0.05);
  color: var(--primary);
}

.site-nav a.is-active {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

/* Cards & Containers */
.page-card, .sidebar-card, .record-card, .builder-section, .lesson-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.page-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* Grids */
/* Course Detail Page */
.course-hero-modern {
  background: var(--primary);
  color: var(--white);
  padding: 80px 40px;
  border-radius: var(--radius-lg);
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}

.course-hero-modern::after {
  content: "";
  position: absolute;
  top: 0; right: 0; width: 300px; height: 300px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  opacity: 0.15;
  pointer-events: none;
}

.course-meta-badges {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.badge-premium {
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-premium-gold {
  background: var(--accent);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 800;
}

.course-hero-modern h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 24px;
  line-height: 1.2;
}

.course-desc-lg {
  font-size: 1.2rem;
  opacity: 0.85;
  max-width: 80ch;
  margin-bottom: 40px;
}

.course-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.stat-bubble {
  display: flex;
  flex-direction: column;
}

.stat-bubble strong {
  font-size: 1.4rem;
  color: var(--accent-soft);
}

.stat-bubble span {
  font-size: 0.85rem;
  opacity: 0.7;
}

.course-main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.curriculum-header {
  margin-bottom: 32px;
}

.curriculum-header h2 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 8px;
}

/* Curriculum Sections */
.curriculum-section {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  margin-bottom: 16px;
  overflow: hidden;
}

.section-header-modern {
  padding: 20px 24px;
  background: #f8fcfb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.section-header-modern h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary);
}

.lesson-list-modern {
  padding: 8px 0;
}

.lesson-item-modern {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  cursor: pointer;
}

.lesson-item-modern:hover {
  background: #fdfaf4;
}

.lesson-icon-play {
  width: 32px;
  height: 32px;
  background: var(--accent-soft);
  border-radius: 50%;
  flex-shrink: 0;
}

.lesson-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.lesson-info strong {
  font-size: 1rem;
}

.lesson-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-preview {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Enrollment Card */
.enroll-card-modern {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 24px;
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow-md);
}

.enroll-image-placeholder {
  height: 180px;
  background: var(--primary);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 900;
  opacity: 0.1;
}

.enroll-features {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.enroll-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.enroll-features li {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Student Dashboard */
.student-dashboard-modern {
  display: grid;
  gap: 40px;
  padding-bottom: 60px;
}

.dashboard-header-premium {
  padding: 60px 40px;
  background: var(--primary);
  border-radius: var(--radius-lg);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.dashboard-header-premium .header-content h1 {
  font-size: 2.5rem;
  margin: 12px 0;
}

.dashboard-header-premium .header-content .desc {
  opacity: 0.8;
  max-width: 60ch;
}

.button-secondary-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  transition: var(--transition);
}

.button-secondary-glass:hover {
  background: rgba(255, 255, 255, 0.2);
}

.metric-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.metric-card strong {
  font-size: 2rem;
  color: var(--primary);
}

.metric-card span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 700;
}

.dashboard-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.section-title-modern {
  margin-bottom: 24px;
}

.section-title-modern h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.section-title-modern p {
  color: var(--text-muted);
}

.courses-stack-modern {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.live-list-modern {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 1000px) {
  .dashboard-grid-layout {
    grid-template-columns: 1fr 340px;
  }
}

.two-column {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), #b47c2a);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(200, 144, 48, 0.3);
}

.button-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(200, 144, 48, 0.4);
}

.button-secondary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(13, 63, 54, 0.2);
}

.button-ghost {
  background: var(--white);
  color: var(--primary);
  border: 1px solid var(--line);
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
  padding-inline-start: 4px;
}

.field input, .field select, .field textarea {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  width: 100%;
}

.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(13, 63, 54, 0.08);
}

/* Utilities */
.is-hidden { display: none !important; }
.is-offscreen { position: absolute; left: -9999px; opacity: 0; }

/* Desktop Breakpoints */
@media (min-width: 900px) {
  .site-nav { display: flex; }
  .two-column { grid-template-columns: 2fr 1fr; }
  .app-frame { grid-template-columns: 320px 1fr; }
}

/* Learning Workspace Premium */
.learning-workspace-premium {
  display: flex;
  height: calc(100vh - 64px);
  background: var(--bg);
  overflow: hidden;
}

.learning-sidebar-modern {
  width: 360px;
  background: var(--white);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header-premium {
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.btn-back-dashboard {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-decoration: none;
  font-weight: 700;
}

.sidebar-header-premium h2 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.curriculum-scroll-area {
  flex-grow: 1;
  overflow-y: auto;
  padding: 12px;
}

.learning-main-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 40px;
}

.video-cinema-shell {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 32px;
}

.video-container-premium {
  aspect-ratio: 16/9;
  position: relative;
}

.video-container-premium video {
  width: 100%;
  height: 100%;
  display: block;
}

.player-toolbar-premium {
  background: #111;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
}

.speed-selector-modern {
  display: flex;
  gap: 8px;
}

.speed-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--white);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.speed-btn.active, .speed-btn:hover {
  background: var(--accent);
}

.lesson-details-premium {
  max-width: 1000px;
  margin: 0 auto;
}

.workspace-tabs {
  margin-top: 40px;
  display: grid;
  gap: 32px;
}

.tab-content-premium {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.tab-header h3 {
  margin-bottom: 24px;
  color: var(--primary);
}

/* Mobile responsive for Learning Workspace */
@media (max-width: 1000px) {
  .learning-workspace-premium {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  
  .learning-sidebar-modern {
    width: 100%;
    order: 2;
  }
}

/* Lesson Navigation Premium */
.curriculum-group-modern {
  margin-bottom: 24px;
}

.group-header-premium {
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.group-header-premium strong {
  font-size: 0.95rem;
  color: var(--primary);
}

.group-header-premium span {
  font-size: 0.75rem;
  opacity: 0.6;
}

.group-lessons-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lesson-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: right;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.lesson-nav-item:hover {
  background: rgba(0,0,0,0.02);
}

.lesson-nav-item.is-active {
  background: var(--accent-light);
}

.lesson-nav-icon {
  width: 28px;
  height: 28px;
  background: #eee;
  border-radius: 50%;
  flex-shrink: 0;
}

.is-active .lesson-nav-icon {
  background: var(--accent);
}

.lesson-nav-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lesson-nav-info strong {
  font-size: 0.9rem;
  color: var(--primary);
}

.lesson-nav-meta {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-progress-text {
  color: var(--accent);
  font-weight: 700;
}
/* Instructor Dashboard & Forms */
.instructor-header {
  background: linear-gradient(135deg, var(--primary) 0%, #0a2e22 100%);
}

.button-accent-gold {
  background: var(--accent);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transition: var(--transition);
}

.button-accent-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.create-course-card-premium {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin-top: 24px;
}

.create-course-card-premium h3 {
  margin-bottom: 24px;
  color: var(--primary);
}

.form-row-modern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row-modern.three-up {
  grid-template-columns: 1fr 1fr 1fr;
}

.field-modern span {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.field-modern input, .field-modern select, .field-modern textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfcfc;
  transition: var(--transition);
}

.field-modern input:focus {
  border-color: var(--accent);
  background: var(--white);
  outline: none;
}

.form-footer-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* Balance & Withdrawal */
.balance-card-modern {
  margin-bottom: 24px;
}

.withdrawal-card-premium {
  background: #f8fcfb;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--accent-light);
}

.withdrawal-card-premium h4 {
  margin-bottom: 16px;
  color: var(--primary);
}

.field-modern-sm span {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.field-modern-sm input, .field-modern-sm textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
}

.button-secondary-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.button-secondary-outline:hover {
  background: var(--primary);
  color: var(--white);
}

@media (max-width: 800px) {
  .form-row-modern, .form-row-modern.three-up {
    grid-template-columns: 1fr;
  }
}

/* Course Builder Premium */
.builder-workspace-premium {
  display: grid;
  gap: 40px;
  padding-bottom: 60px;
}

.builder-header {
  background: linear-gradient(135deg, var(--primary) 0%, #153e32 100%);
}

.builder-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.builder-sections-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tool-card-premium {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}

.tool-card-premium h4 {
  margin-bottom: 20px;
  color: var(--primary);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.divider-modern {
  border: none;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

.form-row-compact {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.check-modern-sm {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.curriculum-section-premium {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
}

.section-top-bar {
  background: var(--bg);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.section-top-bar h4 {
  font-size: 1.1rem;
  color: var(--primary);
}

.section-edit-panel {
  padding: 12px 24px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}

.stack-form-inline {
  display: flex;
  gap: 12px;
}

.lesson-management-card {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  transition: var(--transition);
}

.lesson-management-card:last-child {
  border-bottom: none;
}

.lesson-card-header-modern {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.lesson-title-info strong {
  display: block;
  font-size: 1rem;
  color: var(--primary);
}

.lesson-title-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.lesson-actions-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.button-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

@media (min-width: 1100px) {
  .builder-grid-layout {
    grid-template-columns: 1fr 400px;
  }
}

/* Studio Workspace Premium */
.studio-workspace-premium {
  display: grid;
  gap: 40px;
  padding-bottom: 60px;
}

.studio-header {
  background: linear-gradient(135deg, var(--primary) 0%, #000 100%);
}

.studio-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.recorder-cinema-shell {
  background: #111;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  margin-bottom: 32px;
}

.video-preview-group {
  aspect-ratio: 16/9;
  position: relative;
  background: #000;
}

.studio-video-preview, .studio-canvas-main, .studio-video-playback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recorder-toolbar-premium {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1a1a1a;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.button-record-main {
  background: #e74c3c;
  color: var(--white);
  padding: 12px 32px;
  border-radius: 50px;
  border: none;
  font-weight: 800;
  cursor: pointer;
}

.button-record-main:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-stop-main {
  background: #95a5a6;
  color: var(--white);
  padding: 12px 32px;
  border-radius: 50px;
  border: none;
  font-weight: 800;
  cursor: pointer;
}

.ai-enhancements-panel {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin-bottom: 32px;
}

.ai-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.studio-linkage-panel {
  background: #f0f7f4;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent-light);
}

.stack-form-inline-premium {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.flex-input {
  flex: 1;
}

.mini-sessions-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 1100px) {
  .studio-grid-layout {
    grid-template-columns: 1fr 380px;
  }
}

/* Studio Session & Compact Forms */
.session-modern-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.session-creds-box {
  background: #f4f4f4;
  padding: 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
}

.studio-session-form-compact {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.select-sm {
  flex: 1;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

/* Branding & Logo */
.logo-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text .main {
  color: var(--primary);
  font-size: 1.25rem;
  text-transform: uppercase;
}

.logo-text .sub {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.9;
}

/* Auth Workspace Premium */
.auth-workspace-premium {
  max-width: 500px;
  margin: 60px auto;
  padding: 0 20px;
}

@media (max-width: 850px) {
  .auth-workspace-premium {
    margin: 28px auto;
    padding: 0 14px 138px;
  }
}

.auth-card-modern {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}

.auth-header-visual {
  background: var(--primary);
  padding: 40px;
  text-align: center;
  color: var(--white);
}

.logo-icon-large {
  width: 60px;
  height: 60px;
  background: var(--accent);
  margin: 0 auto 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 6px 15px rgba(212, 175, 55, 0.4);
}

.auth-header-visual h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.auth-header-visual p {
  opacity: 0.7;
  font-size: 0.9rem;
}

.auth-content-area {
  padding: 40px;
}

.auth-status-box {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(13, 63, 54, 0.08);
  background: rgba(13, 63, 54, 0.05);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.7;
}

.auth-status-box.is-visible {
  display: block;
}

.auth-status-box.is-error {
  background: rgba(176, 39, 39, 0.08);
  border-color: rgba(176, 39, 39, 0.16);
  color: #8a1f1f;
}

.auth-status-box.is-success {
  background: rgba(13, 99, 66, 0.08);
  border-color: rgba(13, 99, 66, 0.16);
  color: #0f5e42;
}

.tab-modern {
  display: flex;
  background: var(--bg);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 32px;
}

.tab-link {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.tab-link.is-active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.grad-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #153e32 100%);
  border: none;
  padding: 16px;
  margin-top: 24px;
}

.demo-chip {
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
  text-align: right;
  cursor: pointer;
  transition: var(--transition);
}

.demo-chip:hover {
  border-color: var(--accent);
  background: var(--white);
}

.demo-chip strong {
  display: block;
  font-size: 0.85rem;
  color: var(--primary);
}

.demo-chip span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Admin Workspace Premium */
.admin-workspace-premium {
  display: grid;
  gap: 40px;
  padding-bottom: 60px;
}

.admin-header {
  background: linear-gradient(135deg, #0d1e1c 0%, #1a1a1a 100%);
}

.metric-grid-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.admin-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.content-card-premium {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 32px;
}

.card-header-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.pill {
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.pill.is-active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

@media (min-width: 1100px) {
  .admin-grid-layout {
    grid-template-columns: 1fr 380px;
  }
}

.logo-img-header {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.logo-img-auth {
  height: 120px;
  width: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

/* Profile Workspace Premium */
.profile-workspace-premium {
  display: grid;
  gap: 40px;
  padding-bottom: 60px;
}

.profile-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 150%);
}

.profile-grid-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.sidebar-nav-premium {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-nav-premium .nav-item {
  padding: 16px 24px;
  border: none;
  background: var(--white);
  border-radius: 12px;
  text-align: right;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--line);
}

.sidebar-nav-premium .nav-item:hover, .sidebar-nav-premium .nav-item.is-active {
  background: var(--bg);
  color: var(--primary);
  border-color: var(--accent);
}

.avatar-upload-group {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.avatar-preview-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  box-shadow: var(--shadow-md);
}

.form-actions-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
}

.inline-block-head {
  margin-top: 12px;
}

.payment-checkout-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.payment-card-shell {
  min-height: 100%;
}

.payment-course-hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 20px;
  align-items: center;
}

.payment-course-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 18px 32px rgba(15, 30, 26, 0.12);
}

.payment-course-copy {
  display: grid;
  gap: 12px;
}

.payment-gateway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.payment-gateway-card {
  appearance: none;
  border: 1px solid rgba(15, 79, 67, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 245, 0.92));
  border-radius: 22px;
  padding: 18px;
  text-align: right;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.payment-gateway-card:hover,
.payment-gateway-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(15, 79, 67, 0.28);
  box-shadow: 0 16px 28px rgba(15, 30, 26, 0.12);
}

.payment-gateway-card.is-recommended {
  border-color: rgba(190, 146, 37, 0.45);
  box-shadow: 0 14px 24px rgba(190, 146, 37, 0.14);
}

.payment-gateway-card.is-disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.payment-gateway-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.payment-gateway-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 79, 67, 0.08);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
}

.payment-helper-note,
.payment-action-box {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(15, 79, 67, 0.05);
  border: 1px solid rgba(15, 79, 67, 0.1);
}

.payment-helper-note {
  margin-top: 18px;
  color: var(--text-muted);
}

.payment-action-box {
  display: grid;
  gap: 12px;
  min-height: 320px;
  align-content: center;
}

.payment-qr-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 247, 245, 0.88));
  border: 1px solid rgba(15, 79, 67, 0.12);
}

.payment-qr-image {
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 20px 40px rgba(15, 30, 26, 0.12);
}

@media (max-width: 720px) {
  .payment-course-hero {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .profile-grid-layout {
    grid-template-columns: 280px 1fr;
  }
}

/* AI Studio Visuals */
.ai-status-indicator {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.ai-badge {
  background: var(--accent);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.pulse {
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.button-record-main {
  background: #ff4757;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.button-record-main:hover:not(:disabled) {
  background: #ff6b81;
}

.button-stop-main {
  background: var(--text-muted);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
}

/* Professional Certificate Styles */
.certificate-template-wrapper {
  max-width: 900px;
  margin: 40px auto;
  background: white;
  color: #111;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  border-radius: 4px;
}
.cert-border-outer {
  border: 12px solid var(--brand); /* Deep Forest Green */
  padding: 10px;
  height: 100%;
}
.cert-border-inner {
  border: 2px solid var(--gold); /* Royal Gold */
  padding: 50px;
  height: 100%;
  text-align: center;
  position: relative;
  background-image: radial-gradient(circle at center, rgba(200, 144, 48, 0.05) 0%, transparent 60%);
}
.cert-brand-header {
  margin-bottom: 40px;
}
.cert-logo {
  width: 80px;
  height: auto;
  margin-bottom: 15px;
}
.cert-brand-header h2 {
  font-family: 'Changa', sans-serif;
  color: var(--brand);
  font-size: 1.8rem;
  margin: 0;
}
.cert-brand-header p {
  color: #666;
  font-size: 1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.cert-body {
  margin: 50px 0;
}
.cert-title-main {
  font-family: 'Cairo', sans-serif;
  font-size: 3.5rem;
  color: var(--gold);
  margin-bottom: 30px;
  font-weight: 800;
}
.cert-declare {
  font-size: 1.2rem;
  color: #444;
  margin: 15px 0;
}
.cert-student {
  font-family: 'Changa', sans-serif;
  font-size: 2.8rem;
  color: var(--brand);
  border-bottom: 2px solid var(--gold);
  display: inline-block;
  padding: 0 40px 10px;
  margin: 10px 0 30px;
}
.cert-course {
  font-family: 'Cairo', sans-serif;
  font-size: 2rem;
  color: #222;
  margin-top: 10px;
}
.cert-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 70px;
  text-align: right;
}
.cert-qr-box {
  width: 90px;
  height: 90px;
  background: #f4f4f4;
  border: 1px solid #ddd;
}
.cert-meta-info {
  flex-grow: 1;
  padding: 0 30px;
  font-size: 0.95rem;
  color: #555;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.meta-label {
  display: inline-block;
  width: 100px;
  color: #888;
}
.cert-signature {
  text-align: center;
  width: 200px;
}
.sig-line {
  border-bottom: 1px solid #111;
  margin-bottom: 10px;
  height: 40px;
}
.cert-actions-bar {
  max-width: 900px;
  margin: 20px auto;
  display: flex;
  gap: 15px;
  justify-content: center;
}
@media print {
  body * {
    visibility: hidden;
  }
  #cert-print-area, #cert-print-area * {
    visibility: visible;
  }
  #cert-print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    box-shadow: none;
  }
.cert-actions-bar { display: none !important; }
}

/* ====================================================
   DASHBOARD ENHANCEMENTS & QUICK ACTIONS
   ==================================================== */
.action-card-mini {
  background: var(--bg-card);
  padding: 20px 10px;
  border-radius: var(--radius-md);
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.action-card-mini .icon {
  font-size: 1.8rem;
  background: rgba(13, 63, 54, 0.05);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  transition: inherit;
}

.action-card-mini span {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
}

.action-card-mini:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  background: white;
}

.action-card-mini:hover .icon {
  background: var(--accent);
  transform: scale(1.1) rotate(5deg);
}

.badge-status-premium {
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Section Title Refinements */
.section-title-modern h2 {
  font-family: 'Changa', sans-serif;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 5px;
}

.section-title-modern p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Loading Block Refinement */
.loading-block {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ====================================================
   PREMIUM MOBILE UX & MICRO-ANIMATIONS 🌟
   ==================================================== */

/* Premium Hover Effects */
.content-card-premium,
.tool-card-premium,
.record-card {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.content-card-premium:hover,
.tool-card-premium:hover,
.record-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.button, .button-primary, .button-secondary {
  transition: all 0.2s ease-in-out;
}
.button:active {
  transform: scale(0.96);
}

/* Mobile Bottom Navigation Bar */
.mobile-nav {
  display: none;
}

@media (max-width: 850px) {
  .site-header .site-nav {
    display: none; /* Hide top nav links on smaller screens */
  }

  .site-header {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    top: 0;
  }
  
  .app-shell {
    padding: 10px 0 148px;
  }

  .app-frame {
    padding-bottom: 12px;
  }
  
  .mobile-nav {
    --mobile-nav-horizontal-gap: clamp(4px, 1.8vw, 10px);
    --mobile-nav-side-padding: clamp(10px, 3vw, 16px);
    --mobile-nav-item-padding-y: clamp(7px, 1.8vw, 10px);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    justify-content: center;
    gap: var(--mobile-nav-horizontal-gap);
    position: fixed;
    bottom: calc(clamp(8px, 2vw, 14px) + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: clamp(280px, calc(100vw - 16px), 560px);
    max-width: calc(100vw - 16px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(13, 63, 54, 0.08);
    border-radius: clamp(18px, 4vw, 24px);
    padding: clamp(8px, 2vw, 12px) var(--mobile-nav-side-padding) calc(clamp(8px, 2vw, 12px) + env(safe-area-inset-bottom));
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  }
  
  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: clamp(3px, 1vw, 5px);
    color: var(--text-muted);
    font-size: clamp(0.60rem, 2.2vw, 0.72rem);
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 0;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
    padding: var(--mobile-nav-item-padding-y) clamp(2px, 1vw, 6px);
    border-radius: clamp(12px, 3vw, 14px);
  }

  .mobile-nav a span {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .mobile-nav a:active {
    background: rgba(13, 63, 54, 0.05); /* Slight tap feedback */
  }
  
  .mobile-nav a svg {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
  }
  
  .mobile-nav a.is-active,
  .mobile-nav a:hover {
    color: var(--primary);
  }
  
  .mobile-nav a.is-active svg {
    color: var(--accent); /* Royal Gold accent */
    transform: translateY(-4px) scale(1.2);
    filter: drop-shadow(0 4px 8px rgba(200, 144, 48, 0.4));
  }
  
  .mobile-nav a.is-active span {
    color: var(--primary);
    transform: translateY(2px);
    position: relative;
  }
  
  .mobile-nav a.is-active span::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
  }
}

@media (max-width: 420px) {
  .mobile-nav {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    gap: 3px;
    padding-inline: 8px;
  }

  .app-shell {
    padding-bottom: 158px;
  }

  .mobile-nav a {
    font-size: 0.58rem;
    min-height: 44px;
    padding-inline: 2px;
  }

  .mobile-nav a svg {
    width: 21px;
    height: 21px;
  }
}

@media (min-width: 421px) and (max-width: 560px) {
  .mobile-nav {
    width: min(calc(100vw - 18px), 480px);
  }
}

/* Final mobile-nav centering */
@media (max-width: 850px) {
  .mobile-nav {
    --mobile-nav-edge-gap: clamp(8px, 2.8vw, 18px);
    --mobile-nav-max-width: 560px;
    left: 50%;
    right: auto;
    transform: translate3d(-50%, 0, 0);
    width: min(calc(100vw - (var(--mobile-nav-edge-gap) * 2)), var(--mobile-nav-max-width));
    max-width: calc(100vw - (var(--mobile-nav-edge-gap) * 2));
    margin: 0;
    justify-self: center;
    box-sizing: border-box;
    transition:
      transform 0.28s ease,
      width 0.28s ease,
      max-width 0.28s ease,
      bottom 0.28s ease,
      box-shadow 0.28s ease;
  }
}

@media (max-width: 560px) {
  .mobile-nav {
    --mobile-nav-edge-gap: clamp(8px, 3vw, 14px);
    width: calc(100vw - (var(--mobile-nav-edge-gap) * 2));
    max-width: calc(100vw - (var(--mobile-nav-edge-gap) * 2));
  }
}

@media (max-width: 380px) {
  .mobile-nav {
    --mobile-nav-edge-gap: 6px;
  }
}

/* Final admin responsiveness */
@media (max-width: 1024px) {
  .admin-control-center {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .admin-control-sidebar {
    position: static;
    top: auto;
    min-width: 0;
    max-width: 100%;
  }

  .admin-control-nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
    box-sizing: border-box;
  }

  .admin-nav-item {
    flex: 0 0 220px;
    min-width: 220px;
    max-width: 220px;
    scroll-snap-align: start;
  }

  .admin-overview-layout,
  .admin-insight-grid,
  .admin-course-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .admin-control-main,
  .admin-v2-panel {
    gap: 18px;
  }

  .admin-control-header,
  .card-header-modern {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-control-actions,
  .admin-control-actions .button,
  .card-header-modern .admin-filter-row,
  .admin-filter-row > *,
  .admin-inline-controls > *,
  .admin-course-actions > * {
    width: 100%;
  }

  .admin-metrics-grid,
  .admin-mini-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-brand-card,
  .admin-sidebar-note,
  .admin-metric-card,
  .admin-course-card,
  .admin-stack-row,
  .admin-health-item,
  .admin-mini-card {
    border-radius: 20px;
  }
}

@media (max-width: 640px) {
  .admin-control-center {
    gap: 16px;
  }

  .admin-control-main,
  .admin-v2-panel {
    gap: 16px;
  }

  .admin-brand-card,
  .admin-sidebar-note,
  .content-card-premium,
  .admin-course-card,
  .admin-metric-card {
    padding: 16px;
    border-radius: 18px;
  }

  .admin-metrics-grid,
  .admin-mini-grid {
    grid-template-columns: 1fr;
  }

  .admin-control-header h1 {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }

  .admin-control-nav {
    display: flex;
    gap: 10px;
  }

  .admin-nav-item {
    flex-basis: 180px;
    min-width: 180px;
    max-width: 180px;
    padding: 14px 15px;
    border-radius: 18px;
  }

  .admin-filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .admin-user-cell {
    align-items: flex-start;
  }

  .admin-table-shell {
    overflow: visible;
    border-radius: 0;
  }

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

  .admin-table-shell .premium-table {
    min-width: 0;
    background: transparent;
    box-shadow: none;
  }

  .admin-table-shell .premium-table thead {
    display: none;
  }

  .admin-table-shell .premium-table tbody {
    display: grid;
    gap: 12px;
  }

  .admin-table-shell .premium-table tr {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(13, 63, 54, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 243, 233, 0.95) 100%);
    box-shadow: 0 12px 26px rgba(13, 63, 54, 0.06);
  }

  .admin-table-shell .premium-table td {
    border: none;
    padding: 0;
  }

  .admin-table-shell .premium-table td + td {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(13, 63, 54, 0.08);
  }

  .admin-table-shell .premium-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
  }

  #admin-v2-users-table td:nth-child(1)::before { content: "المستخدم"; }
  #admin-v2-users-table td:nth-child(2)::before { content: "البيانات"; }
  #admin-v2-users-table td:nth-child(3)::before { content: "الدور"; }
  #admin-v2-users-table td:nth-child(4)::before { content: "الحالة"; }
  #admin-v2-users-table td:nth-child(5)::before { content: "التحكم"; }

  #admin-v2-payouts-table td:nth-child(1)::before { content: "المدرب"; }
  #admin-v2-payouts-table td:nth-child(2)::before { content: "المبلغ"; }
  #admin-v2-payouts-table td:nth-child(3)::before { content: "الحالة"; }
  #admin-v2-payouts-table td:nth-child(4)::before { content: "الملاحظات"; }
  #admin-v2-payouts-table td:nth-child(5)::before { content: "الإجراءات"; }

  #admin-v2-users-table .admin-inline-controls,
  #admin-v2-payouts-table .admin-inline-controls {
    flex-direction: column;
    align-items: stretch;
  }

  #admin-v2-users-table .admin-inline-controls > *,
  #admin-v2-payouts-table .admin-inline-controls > *,
  #admin-v2-users-table select,
  #admin-v2-payouts-table select,
  #admin-v2-payouts-table textarea,
  #admin-v2-users-table button,
  #admin-v2-payouts-table button {
    width: 100%;
  }

  .admin-course-meta,
  .admin-stack-meta {
    gap: 6px;
  }
}

/* --- Admin Dashboard Overhaul --- */
.admin-layout-sidebar {
  display: flex;
  min-height: 100vh;
  background: #f4f7f6;
  margin: -24px 0 -120px; /* Offset app-shell padding */
}

.admin-sidebar-nav {
  width: 280px;
  background: var(--primary);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  flex-shrink: 0;
  box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}

/* Studio Refresh */
.video-preview-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #071410;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(4, 13, 11, 0.28);
}

.video-preview-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(200, 144, 48, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(7, 20, 16, 0.04), rgba(7, 20, 16, 0.16));
  pointer-events: none;
}

.studio-preview-surface,
.result-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#studio-recording.result-preview {
  object-fit: contain;
  background: #020404;
}

.studio-overlay-controls {
  position: absolute;
  inset: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.timer-overlay,
.quality-badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(7, 20, 16, 0.72);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  backdrop-filter: blur(14px);
}

.studio-controls-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
}

.studio-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.studio-mode-card {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(13, 63, 54, 0.1);
  background:
    linear-gradient(135deg, rgba(13, 63, 54, 0.05), rgba(200, 144, 48, 0.08)),
    #fff;
  box-shadow: 0 18px 36px rgba(5, 20, 16, 0.06);
}

.studio-mode-card h4 {
  margin: 12px 0 8px;
}

.studio-mode-card p {
  margin: 0;
  color: var(--text-muted);
}

.studio-mode-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(13, 63, 54, 0.92);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-group.centered {
  justify-content: center;
}

.btn-studio-action {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 63, 54, 0.08);
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-studio-action:hover,
.btn-studio-action.is-muted {
  background: rgba(13, 63, 54, 0.14);
  transform: translateY(-2px);
}

.btn-studio-action.is-active {
  background: linear-gradient(135deg, rgba(13, 63, 54, 0.92), rgba(22, 112, 95, 0.95));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 16px 30px rgba(13, 63, 54, 0.22);
}

.btn-studio-action .icon {
  font-size: 1.2rem;
}

.button-round {
  min-width: 170px;
  border-radius: 999px;
}

.select-sm-glass {
  min-width: 140px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-main);
}

.studio-upload-dropzone {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(13, 63, 54, 0.25);
  background: linear-gradient(135deg, rgba(13, 63, 54, 0.05), rgba(200, 144, 48, 0.08));
  cursor: pointer;
}

.studio-upload-dropzone strong {
  color: var(--primary);
}

.recording-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245, 248, 247, 0.96));
}

.studio-panel-note {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.studio-upload-dropzone span,
.studio-live-brief p,
.studio-session-meta span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.studio-stream-endpoint {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.studio-stream-endpoint code,
.studio-credential-row code {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4f7f6;
  color: var(--primary);
  overflow-wrap: anywhere;
  direction: ltr;
  text-align: left;
}

.studio-session-card {
  display: grid;
  gap: 14px;
}

.studio-session-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.studio-session-head h4 {
  margin: 0;
}

.studio-session-head p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.studio-session-meta {
  display: grid;
  gap: 6px;
}

.studio-session-creds {
  display: grid;
  gap: 10px;
}

.studio-credential-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.studio-session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-xs {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
}

.process-item {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(13, 63, 54, 0.05);
  border: 1px solid rgba(13, 63, 54, 0.08);
}

.process-item-error {
  background: rgba(160, 61, 49, 0.08);
  border-color: rgba(160, 61, 49, 0.2);
}

.process-info {
  display: grid;
  gap: 4px;
}

.process-info strong {
  color: var(--primary);
}

.process-info span {
  color: var(--text-muted);
}

.progress-bar-sm {
  height: 10px;
  border-radius: 999px;
  background: rgba(13, 63, 54, 0.1);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.status-pill.status-good {
  background: rgba(31, 123, 93, 0.12);
  color: var(--success);
}

.status-pill.status-warn {
  background: rgba(157, 108, 25, 0.12);
  color: var(--warning);
}

.status-pill.status-bad {
  background: rgba(160, 61, 49, 0.12);
  color: var(--danger);
}

@media (max-width: 850px) {
  .studio-controls-bar {
    grid-template-columns: 1fr;
  }

  .control-group,
  .control-group.centered {
    justify-content: center;
    flex-wrap: wrap;
  }

  .studio-session-head,
  .studio-credential-row {
    grid-template-columns: 1fr;
    display: grid;
  }
}

.sidebar-brand {
  padding: 32px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.sidebar-links {
  flex-grow: 1;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-links .nav-item {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  padding: 14px 16px;
  border-radius: 12px;
  text-align: right;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.sidebar-links .nav-item .icon { font-size: 1.2rem; }

.sidebar-links .nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--white);
}

.sidebar-links .nav-item.is-active {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(200, 144, 48, 0.3);
}

.sidebar-footer {
  padding: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.connection-status {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.5);
}

.status-dot.online {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  box-shadow: 0 0 8px #4caf50;
}

.admin-main-viewport {
  flex-grow: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow-y: auto;
}

.admin-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  padding: 16px 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.header-breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
}

.header-breadcrumb .separator { color: var(--text-muted); }
.header-breadcrumb .active { color: var(--accent); }

.user-profile-sm {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  background: var(--accent-soft);
  color: var(--warning);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
}

.admin-section {
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: fadeIn 0.4s ease;
}

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

.dashboard-visuals {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.chart-card { min-height: 400px; }

.side-metrics {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.premium-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.premium-table th {
  padding: 16px;
  border-bottom: 2px solid var(--line);
  color: var(--text-muted);
  font-size: 0.85rem;
  background: #fafafa;
}

.premium-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
  background: var(--accent-soft);
  color: var(--warning);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
}

.record-card-interactive {
  display: flex;
  align-items: center;
  padding: 20px;
}

.record-selector { margin-left: 20px; }
.record-main { flex-grow: 1; }

.input-sm-glass, .select-sm-glass {
  background: rgba(255,255,255,0.8);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* --- Contact & Legal Pages --- */
.content-container-premium { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.page-header-modern { text-align: center; margin-bottom: 60px; }
.page-header-modern h1 { font-size: 2.5rem; margin: 10px 0; background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

.contact-grid-modern { display: grid; grid-template-columns: 1fr 350px; gap: 40px; }
.contact-form-card-premium { background: white; padding: 40px; border-radius: var(--radius-lg); box-shadow: var(--shadow-el); border: 1px solid var(--line); }
.info-card-premium, .social-links-premium { background: var(--surface); padding: 30px; border-radius: var(--radius-lg); margin-bottom: 20px; border: 1px solid var(--line); }
.contact-methods-list { list-style: none; padding: 0; }
.contact-methods-list li { display: flex; gap: 15px; margin-bottom: 25px; }
.social-icons-row { display: flex; gap: 10px; margin-top: 15px; }
.social-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: white; border-radius: 50%; border: 1px solid var(--line); color: var(--text-main); text-decoration: none; font-size: 0.8rem; font-weight: bold; transition: var(--transit); }
.social-btn:hover { background: var(--primary); color: white; transform: translateY(-3px); }

.legal-page-premium { max-width: 800px; margin: 60px auto; padding: 40px; background: white; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.legal-header { border-bottom: 2px solid var(--primary); padding-bottom: 20px; margin-bottom: 40px; }
.legal-content section { margin-bottom: 40px; }
.legal-content h2 { color: var(--primary); font-size: 1.4rem; margin-bottom: 15px; }

/* --- Student Dashboard Enhancements --- */
.enrolled-modern-card { display: flex; align-items: center; gap: 20px; padding: 25px; }
.enrolled-progress-ring { width: 70px; height: 70px; border-radius: 50%; background: conic-gradient(var(--primary) var(--progress, 0%), var(--surface) 0); display: flex; align-items: center; justify-content: center; position: relative; font-weight: bold; color: var(--primary); box-shadow: inset 0 0 0 8px white; }
.enrolled-content h4 { margin: 0 0 10px 0; font-size: 1.2rem; }

.live-session-mini-card { display: flex; align-items: center; gap: 15px; padding: 15px; background: white; border-radius: var(--radius-md); border: 1px solid var(--line); margin-bottom: 15px; transition: var(--transit); }
.live-session-mini-card:hover { transform: translateX(-5px); border-color: var(--primary); }
.live-indicator { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.live-indicator.live { background: #E74C3C; box-shadow: 0 0 10px #E74C3C; animation: pulse 1.5s infinite; }
.live-indicator.scheduled { background: var(--secondary); }

@keyframes pulse { 0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; } }

/* --- Site Footer --- */
.site-footer { background: #082420; color: rgba(255,255,255,0.7); padding: 80px 40px 40px; margin-top: 100px; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; }
.footer-logo { height: 40px; margin-bottom: 20px; }
.footer-links h4 { color: white; margin-bottom: 25px; }
.footer-links a { display: block; color: rgba(255,255,255,0.6); margin-bottom: 12px; text-decoration: none; transition: 0.2s; }
.footer-links a:hover { color: var(--secondary); padding-right: 5px; }
.footer-bottom { max-width: 1200px; margin: 60px auto 0; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.9rem; }

@media (max-width: 768px) {
  .contact-grid-modern { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .site-footer { padding-bottom: 120px; }
}

/* --- Admin Control Center V2 --- */
.admin-control-center {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.admin-control-sidebar {
  position: sticky;
  top: 108px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-brand-card,
.admin-sidebar-note {
  background: linear-gradient(180deg, rgba(8, 36, 31, 0.98) 0%, rgba(14, 58, 49, 0.96) 100%);
  color: #f7f1e5;
  border-radius: 28px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 50px rgba(7, 28, 24, 0.18);
}

.admin-brand-card {
  display: flex;
  gap: 16px;
  align-items: center;
}

.admin-brand-card p,
.admin-sidebar-note p {
  margin: 6px 0 0;
  color: rgba(247, 241, 229, 0.78);
  line-height: 1.7;
}

.admin-brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.admin-control-nav {
  display: grid;
  gap: 12px;
}

.admin-nav-item {
  text-align: right;
  border: 1px solid rgba(13, 63, 54, 0.12);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  padding: 16px 18px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-nav-item span {
  display: block;
  font-weight: 800;
  color: var(--primary);
}

.admin-nav-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.admin-nav-item:hover,
.admin-nav-item.is-active {
  transform: translateY(-1px);
  border-color: rgba(200, 144, 48, 0.45);
  box-shadow: 0 12px 30px rgba(13, 63, 54, 0.08);
}

.admin-nav-item.is-active {
  background: linear-gradient(135deg, rgba(13, 63, 54, 0.96) 0%, rgba(22, 96, 81, 0.94) 100%);
}

.admin-nav-item.is-active span,
.admin-nav-item.is-active small {
  color: #fff8ea;
}

.admin-control-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.admin-control-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.admin-control-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 2vw, 2.6rem);
}

.admin-control-header p {
  margin: 8px 0 0;
}

.admin-v2-panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.admin-metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 247, 239, 0.96) 100%);
  border-radius: 24px;
  padding: 22px;
  border: 1px solid rgba(13, 63, 54, 0.08);
  box-shadow: 0 18px 44px rgba(13, 63, 54, 0.08);
}

.admin-metric-card .metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.admin-metric-card .metric-value {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
}

.admin-metric-card .metric-trend {
  display: inline-flex;
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  background: rgba(13, 63, 54, 0.08);
  color: var(--primary);
}

.admin-overview-layout,
.admin-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.admin-health-list,
.admin-mini-grid {
  display: grid;
  gap: 12px;
}

.admin-health-item,
.admin-mini-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(13, 63, 54, 0.04);
  border: 1px solid rgba(13, 63, 54, 0.07);
}

.admin-health-item strong,
.admin-mini-card strong {
  color: var(--primary);
}

.admin-filter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0d3f36 0%, #c89030 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.admin-inline-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-course-card {
  border: 1px solid rgba(13, 63, 54, 0.09);
  border-radius: 24px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 243, 233, 0.94) 100%);
  box-shadow: 0 14px 36px rgba(13, 63, 54, 0.06);
}

.admin-course-card h4,
.admin-stack-row h4 {
  margin: 0;
}

.admin-course-meta,
.admin-stack-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.admin-course-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.admin-stack-row {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(13, 63, 54, 0.04);
  border: 1px solid rgba(13, 63, 54, 0.07);
}

.admin-stack-row p {
  margin: 6px 0 0;
  color: var(--muted);
}

.toggle-field {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
  color: var(--primary);
}

.toggle-field input {
  width: 18px;
  height: 18px;
}

@media (max-width: 1080px) {
  .admin-control-center,
  .admin-overview-layout,
  .admin-insight-grid,
  .admin-course-grid {
    grid-template-columns: 1fr;
  }

  .admin-control-sidebar {
    position: static;
  }

  .admin-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-control-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-metrics-grid {
    grid-template-columns: 1fr;
  }

  .admin-filter-row,
  .admin-inline-controls,
  .admin-course-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Unified video surfaces and dedicated live page */
.video-preview-container,
.video-container-premium,
#studio-recording.result-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  background: #071410;
  border-radius: 24px;
  overflow: hidden;
}

.video-preview-container > canvas,
.video-preview-container > video,
.video-container-premium > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#studio-recording.result-preview {
  position: relative;
  height: auto;
  max-height: min(60vh, 560px);
  width: 100%;
  object-fit: contain;
  background: #020404;
  box-shadow: 0 24px 60px rgba(4, 13, 11, 0.18);
}

.studio-live-shell {
  display: grid;
  gap: 28px;
  padding-bottom: 48px;
}

.studio-live-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.studio-live-stack,
.studio-live-side-stack {
  display: grid;
  gap: 18px;
}

@media (min-width: 1100px) {
  .studio-live-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  }
}

@media (max-width: 720px) {
  .studio-grid-layout,
  .studio-live-layout {
    gap: 22px;
  }

  .studio-controls-bar {
    grid-template-columns: 1fr;
  }

  .control-group,
  .control-group.centered {
    justify-content: center;
    flex-wrap: wrap;
  }

  .button-round {
    width: 100%;
    min-width: 0;
  }

  .video-preview-container,
  .video-container-premium,
  #studio-recording.result-preview {
    border-radius: 20px;
    max-height: min(52vh, 320px);
  }

  .studio-overlay-controls {
    inset: 12px;
  }

  .btn-studio-action {
    width: 46px;
    height: 46px;
    border-radius: 16px;
  }

  .payment-checkout-layout {
    grid-template-columns: 1fr;
  }

  .payment-qr-wrap {
    min-height: 250px;
    padding: 14px;
  }
}

/* Final Reels theme contrast polish */
body.theme-reels .dashboard-header-premium,
body.theme-reels .instructor-header {
  background:
    radial-gradient(120% 140% at 8% 10%, rgba(255, 255, 255, 0.16), transparent 36%),
    linear-gradient(135deg, #20d7c9 0%, #159b91 42%, #0e5c56 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.3);
}

body.theme-reels .dashboard-header-premium .eyebrow,
body.theme-reels .instructor-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(7, 18, 23, 0.24);
  color: #fff3d4;
  font-weight: 800;
  letter-spacing: 0.2px;
}

body.theme-reels .dashboard-header-premium .header-content h1,
body.theme-reels .instructor-header .header-content h1 {
  color: #ffffff;
  text-shadow: 0 10px 28px rgba(4, 14, 18, 0.22);
}

body.theme-reels .dashboard-header-premium .header-content .desc,
body.theme-reels .instructor-header .header-content .desc {
  color: rgba(245, 252, 252, 0.96);
}

body.theme-reels .metric-card,
body.theme-reels .create-course-card-premium,
body.theme-reels .withdrawal-card-premium,
body.theme-reels .tool-card-premium,
body.theme-reels .curriculum-section-premium,
body.theme-reels .section-edit-panel,
body.theme-reels .tab-content-premium {
  background: linear-gradient(180deg, rgba(15, 20, 27, 0.96) 0%, rgba(11, 16, 22, 0.94) 100%);
  border: 1px solid rgba(208, 221, 228, 0.1);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

body.theme-reels .metric-card:hover,
body.theme-reels .tool-card-premium:hover,
body.theme-reels .record-card:hover,
body.theme-reels .create-course-card-premium:hover {
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.3);
}

body.theme-reels .metric-card strong,
body.theme-reels .create-course-card-premium h3,
body.theme-reels .withdrawal-card-premium h4,
body.theme-reels .tool-card-premium h4,
body.theme-reels .section-title-modern h2,
body.theme-reels .record-card-top strong,
body.theme-reels .tab-header h3 {
  color: #f8fcfd;
}

body.theme-reels .metric-card span,
body.theme-reels .section-title-modern p,
body.theme-reels .field-modern small,
body.theme-reels .field-modern-sm small,
body.theme-reels .record-card p,
body.theme-reels .record-card small,
body.theme-reels .check-modern-sm,
body.theme-reels .lesson-info span,
body.theme-reels .admin-theme-preview p {
  color: #cddadd;
}

body.theme-reels .field-modern span,
body.theme-reels .field-modern-sm span,
body.theme-reels .field label,
body.theme-reels .check-modern span,
body.theme-reels .check-modern-sm span,
body.theme-reels .tool-card-premium label,
body.theme-reels .section-top-bar h4 {
  color: #eef6f7;
}

body.theme-reels .form-footer-modern,
body.theme-reels .tool-card-premium h4,
body.theme-reels .section-top-bar,
body.theme-reels .divider-modern {
  border-color: rgba(208, 221, 228, 0.1);
}

body.theme-reels .field-modern input,
body.theme-reels .field-modern textarea,
body.theme-reels .field-modern select,
body.theme-reels .field-modern-sm input,
body.theme-reels .field-modern-sm textarea,
body.theme-reels .field-modern-sm select,
body.theme-reels .field input,
body.theme-reels .field textarea,
body.theme-reels .field select {
  background: rgba(7, 11, 16, 0.88);
  color: #f7fbfc;
  border: 1px solid rgba(190, 205, 212, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.theme-reels .field-modern input::placeholder,
body.theme-reels .field-modern textarea::placeholder,
body.theme-reels .field-modern-sm input::placeholder,
body.theme-reels .field-modern-sm textarea::placeholder,
body.theme-reels .field input::placeholder,
body.theme-reels .field textarea::placeholder {
  color: #9eb2b8;
}

body.theme-reels .field-modern input:focus,
body.theme-reels .field-modern textarea:focus,
body.theme-reels .field-modern select:focus,
body.theme-reels .field-modern-sm input:focus,
body.theme-reels .field-modern-sm textarea:focus,
body.theme-reels .field-modern-sm select:focus,
body.theme-reels .field input:focus,
body.theme-reels .field textarea:focus,
body.theme-reels .field select:focus {
  outline: none;
  background: rgba(9, 14, 20, 0.96);
  border-color: rgba(83, 242, 228, 0.52);
  box-shadow:
    0 0 0 4px rgba(13, 214, 199, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.16);
}

body.theme-reels .field-modern input[type="file"],
body.theme-reels .field-modern-sm input[type="file"],
body.theme-reels .field input[type="file"] {
  padding: 12px 14px;
  color: #dce8ea;
}

body.theme-reels select option {
  background: #0f141b;
  color: #eef4f3;
}

body.theme-reels input[type="checkbox"],
body.theme-reels input[type="radio"] {
  accent-color: #21d8ca;
}

body.theme-reels .button-accent-gold,
body.theme-reels .button.button-primary {
  background: linear-gradient(135deg, #ff7f68 0%, #ff615e 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(255, 107, 87, 0.3);
}

body.theme-reels .button-accent-gold:hover,
body.theme-reels .button.button-primary:hover {
  box-shadow: 0 18px 36px rgba(255, 107, 87, 0.38);
}

body.theme-reels .button-secondary-glass,
body.theme-reels .button-secondary-outline,
body.theme-reels .button.button-secondary,
body.theme-reels .button.button-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fcfd;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

body.theme-reels .button-secondary-glass:hover,
body.theme-reels .button-secondary-outline:hover,
body.theme-reels .button.button-secondary:hover,
body.theme-reels .button.button-ghost:hover {
  background: rgba(33, 216, 202, 0.12);
  border-color: rgba(33, 216, 202, 0.28);
  color: #ffffff;
}

body.theme-reels .meta-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d8e6e8;
}

body.theme-reels .status-pill.status-good {
  background: rgba(31, 164, 115, 0.18);
  color: #bff7d8;
}

body.theme-reels .status-pill.status-warn {
  background: rgba(201, 144, 48, 0.18);
  color: #ffe0a3;
}

body.theme-reels .status-pill.status-bad {
  background: rgba(255, 107, 87, 0.18);
  color: #ffd0c8;
}

body.theme-reels .instructor-course-card-v3 img {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: #0f141b !important;
}

body.theme-reels .instructor-course-card-v3 .card-actions .button {
  min-height: 46px;
}

body.theme-reels .metric-card strong,
body.theme-reels .status-pill,
body.theme-reels .meta-chip,
body.theme-reels .button {
  letter-spacing: 0.1px;
}

@media (max-width: 720px) {
  body.theme-reels .dashboard-header-premium,
  body.theme-reels .instructor-header {
    padding: 28px 20px;
  }

  body.theme-reels .create-course-card-premium,
  body.theme-reels .withdrawal-card-premium,
  body.theme-reels .tool-card-premium,
  body.theme-reels .metric-card {
    border-radius: 22px;
  }
}
