@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600;1,700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg:          #080706;
  --bg-2:        #0F0D0B;
  --bg-card:     #161412;
  --bg-elevated: #1E1B17;
  --bg-hover:    #252119;

  --gold:        #C8A84B;
  --gold-bright: #E8C96E;
  --gold-dim:    #7A6530;
  --gold-glow:   rgba(200,168,75,0.12);

  --text:        #F0E6D3;
  --text-2:      #B8A898;
  --text-3:      #6B5E50;
  --white:       #FFFFFF;

  --ruby:        #8B2E26;
  --emerald:     #2D5A27;
  --amber:       #C8A84B;

  --serif:  'Cormorant Garamond', Georgia, serif;
  --sans:   'DM Sans', sans-serif;

  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  14px;

  --sidebar-width: 240px;
  --topbar-height: 60px;
  --transition: 0.18s ease;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.6);

  /* ── Legacy aliases remapped to dark theme ── */
  --sidebar-w: 240px;
  --crimson:        var(--gold);
  --crimson-dark:   var(--gold-dim);
  --crimson-light:  var(--gold-bright);
  --forest:         #2D5A27;
  /* parchment used as BG → dark surfaces; used as text → cream text */
  --parchment:      #161412;   /* was #F0E6D3 — now dark card bg */
  --parchment-dark: #0F0D0B;   /* darker surface */
  --parchment-light:#1E1B17;   /* elevated surface */
  --text-dark:      #F0E6D3;   /* cream text — unchanged */
  --text-mid:       #B8A898;
  --text-light:     #6B5E50;
  --gold-dark:      #7A6530;
  --gold-light:     #E8C96E;
  --border:         rgba(200,168,75,0.12);
  --border-gold:    rgba(200,168,75,0.30);
  --radius: 8px;
  --radius-lg: 14px;
}

/* ── Dark form inputs (global) ── */
input:not([type=checkbox]):not([type=radio]):not([type=range]),
textarea, select {
  background: var(--bg-2) !important;
  color: var(--text) !important;
  border: 1px solid rgba(200,168,75,0.15) !important;
  border-radius: var(--r-sm);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(200,168,75,0.12) !important;
}
input::placeholder, textarea::placeholder { color: var(--text-3) !important; }

/* ── GSAP will-change helpers ── */
[data-gsap] { will-change: transform, opacity; }

/* ── Gold cursor dot (injected by GSAP pages) ── */
#gsap-cursor {
  position: fixed; width: 8px; height: 8px;
  background: var(--gold); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition: width .2s, height .2s, opacity .2s;
}
#gsap-cursor.large { width: 40px; height: 40px; opacity: .4; }

/* ── Utility: gold badge ── */
.badge-gold {
  display: inline-block; padding: 2px 10px;
  background: rgba(200,168,75,.1);
  border: 1px solid rgba(200,168,75,.25);
  border-radius: 20px;
  font-size: 11px; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
}
/* ── Utility: dark card ── */
.dark-card {
  background: var(--bg-card);
  border: 1px solid rgba(200,168,75,.1);
  border-radius: var(--r-md);
  padding: 24px;
  transition: border-color .2s, transform .2s;
}
.dark-card:hover { border-color: rgba(200,168,75,.3); transform: translateY(-2px); }

/* ── Utility: gold stat number ── */
.stat-gold { font-family: var(--serif); font-size: 42px; font-weight: 600; color: var(--gold); line-height: 1; }
.stat-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-top: 4px; }

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

html, body {
  height: 100%;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* ─── Layout Shell ─── */
.shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: rgba(240, 228, 196, 0.12);
  border-right: 1px solid rgba(240, 228, 196, 0.1);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar { width: 0; background: transparent; }

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(240, 228, 196, 0.1);
}

.sidebar-brand .brand-monogram {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--gold-glow);
  border: 1px solid rgba(200,168,75,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 10px;
}

.sidebar-brand .brand-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.sidebar-brand .brand-sub {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
}

.sidebar-section {
  padding: 16px 12px 8px;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 8px;
  margin-bottom: 6px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  margin-bottom: 1px;
  cursor: pointer;
  border-left: 3px solid transparent;
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-item.active {
  background: var(--bg-elevated);
  color: var(--gold);
  border-left-color: var(--gold);
}

.nav-item .nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.8;
}

.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
  padding: 12px 0 16px;
  border-top: 1px solid rgba(200,168,75,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background var(--transition);
}

.sidebar-user:hover { background: var(--bg-hover); }

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.sidebar-user-info .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.sidebar-user-info .user-role {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 2px;
  text-transform: capitalize;
  letter-spacing: 0.06em;
  background: var(--bg-elevated);
  border: 1px solid rgba(200,168,75,0.12);
  border-radius: 20px;
  padding: 1px 7px;
  display: inline-block;
}

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

/* ─── Topbar ─── */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-2);
  border-bottom: 1px solid rgba(200,168,75,0.08);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.topbar-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
  flex: 1;
  letter-spacing: 0.01em;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid rgba(200,168,75,0.12);
  border-radius: 24px;
  padding: 8px 16px;
  min-width: 320px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.topbar-search:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.topbar-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text);
  width: 100%;
  font-family: var(--sans);
}

.topbar-search input::placeholder { color: var(--text-3); }
.topbar-search svg { color: var(--text-3); flex-shrink: 0; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: background var(--transition), color var(--transition);
  position: relative;
  text-decoration: none;
}

.icon-btn:hover { background: var(--bg-elevated); color: var(--gold); }

.icon-btn .badge-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--bg-2);
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  text-decoration: none;
}

/* ─── Main Content ─── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  background: var(--bg);
  position: relative;
}

/* ─── Page Titles ─── */
.page-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 52px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.1;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 28px;
  font-weight: 400;
}

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(200,168,75,0.08);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-sm {
  padding: 14px 18px;
}

.card-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.card-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}

/* ─── Stat Cards ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(200,168,75,0.08);
  border-radius: var(--r-md);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(200,168,75,0.10);
  color: var(--gold);
  margin-bottom: 6px;
}

.stat-card .stat-icon.green  { background: rgba(45,90,39,0.15);  color: #5BAD55; }
.stat-card .stat-icon.gold   { background: rgba(200,168,75,0.12); color: var(--gold); }
.stat-card .stat-icon.ruby   { background: rgba(139,46,38,0.15);  color: #D0675D; }

.stat-card .stat-number {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.01em;
}

.stat-card .stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.stat-card .stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(200,168,75,0.12);
  color: var(--gold);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  margin-top: 4px;
  width: fit-content;
  letter-spacing: 0.04em;
}

/* ─── Progress Bar ─── */
.progress-wrap {
  width: 100%;
  margin-top: 4px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--text-3);
}

.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  border-radius: 99px;
  transition: width 0.5s ease;
}

.progress-fill.green  { background: linear-gradient(90deg, #2D5A27, #5BAD55); }
.progress-fill.ruby   { background: linear-gradient(90deg, #6B2218, #C0453B); }

/* ─── Badges ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* New naming */
.badge-success  { background: rgba(45,90,39,0.20);  color: #6DC766; }
.badge-warning  { background: rgba(200,168,75,0.18); color: var(--gold); }
.badge-danger   { background: rgba(139,46,38,0.20);  color: #D0675D; }
.badge-muted    { background: var(--bg-elevated);    color: var(--text-3); border: 1px solid rgba(200,168,75,0.08); }

/* Legacy names kept */
.badge-green    { background: rgba(45,90,39,0.20);  color: #6DC766; }
.badge-crimson  { background: rgba(139,46,38,0.20);  color: #D0675D; }
.badge-gold     { background: rgba(200,168,75,0.18); color: var(--gold); }
.badge-dark     { background: var(--bg-elevated);    color: var(--text-2); border: 1px solid rgba(200,168,75,0.10); }
.badge-gray     { background: var(--bg-elevated);    color: var(--text-3); }

/* Format badges */
.badge-pdf      { background: rgba(139,46,38,0.20);  color: #D0675D; }
.badge-mp3      { background: rgba(45,90,39,0.20);   color: #6DC766; }
.badge-img      { background: var(--bg-elevated);    color: var(--text-3); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
}
.btn-primary:hover { background: var(--gold-bright); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-outline:hover { background: var(--gold-glow); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }

.btn-danger {
  background: var(--ruby);
  color: var(--text);
}
.btn-danger:hover { background: #A83B32; }

/* Legacy compat */
.btn-green         { background: #2D5A27; color: var(--text); }
.btn-green:hover   { background: #3D7033; }
.btn-outline-green { background: transparent; color: #6DC766; border: 1px solid #2D5A27; }
.btn-outline-green:hover { background: rgba(45,90,39,0.15); }

.btn-sm  { padding: 6px 12px; font-size: 10px; }
.btn-lg  { padding: 12px 28px; font-size: 12px; border-radius: var(--r-md); }

/* ─── Table ─── */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid rgba(200,168,75,0.08);
  background: var(--bg-card);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}

.table thead th {
  background: var(--bg-elevated);
  padding: 12px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid rgba(200,168,75,0.08);
}

.table tbody td {
  padding: 13px 16px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid rgba(200,168,75,0.06);
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:nth-child(even) td { background: rgba(255,255,255,0.012); }
.table tbody tr:hover td { background: var(--bg-hover); }

/* ─── Toast ─── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid var(--gold);
  min-width: 260px;
  animation: slideUp 0.22s ease;
  font-family: var(--sans);
}

.toast.error   { border-left-color: #D0675D; }
.toast.warning { border-left-color: var(--gold); }

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

/* ─── Spinner ─── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(200,168,75,0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
.spinner-lg { width: 36px; height: 36px; border-width: 3.5px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Loading Skeleton ─── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-md);
  border: 1px solid rgba(200,168,75,0.05);
}

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

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 0.16s ease;
  backdrop-filter: blur(4px);
}

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

.modal {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  border-top: 2px solid var(--gold);
  animation: scaleIn 0.18s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

/* ─── Forms ─── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 7px;
  font-family: var(--sans);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid rgba(200,168,75,0.15);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg-elevated);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-3); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-select { color: var(--text); }
.form-select option { background: var(--bg-card); color: var(--text); }
.form-textarea { resize: vertical; min-height: 90px; }

/* ─── Grid helpers ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.flex            { display: flex; }
.flex-col        { flex-direction: column; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-28 { margin-bottom: 28px; }
.mb-32 { margin-bottom: 32px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }

.text-sm     { font-size: 12px; }
.text-muted  { color: var(--text-3); }
.text-gold   { color: var(--gold); }
.font-serif  { font-family: var(--serif); }
.italic      { font-style: italic; }
.font-bold   { font-weight: 700; }
.font-semi   { font-weight: 600; }

/* ─── Section Header ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.section-title-dark { color: var(--text-2); }

/* ─── Welcome Banner ─── */
.welcome-banner {
  background: var(--bg-card);
  border: 1px solid rgba(200,168,75,0.08);
  border-radius: var(--r-lg);
  padding: 32px 36px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 32px;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,168,75,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.welcome-banner-sep {
  height: 1px;
  background: linear-gradient(90deg, rgba(200,168,75,0.3), transparent);
  margin-top: 20px;
}

.welcome-banner h1 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 42px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}

.welcome-banner p {
  font-size: 14px;
  color: var(--text-2);
  position: relative;
  z-index: 1;
  line-height: 1.5;
}

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(200,168,75,0.10);
  border: 1px solid rgba(200,168,75,0.20);
  color: var(--gold);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

/* ─── Eyebrow / uppercase label ─── */
.eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ─── Quote Widget ─── */
.quote-widget {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 24px;
  border-top: 2px solid var(--gold);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.quote-mark {
  font-family: var(--serif);
  font-size: 80px;
  color: var(--gold);
  opacity: 0.15;
  line-height: 1;
  position: absolute;
  top: 8px;
  left: 16px;
  pointer-events: none;
}

.quote-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.quote-attribution {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

/* ─── Course Horizontal Card ─── */
.course-card-h {
  display: flex;
  border: 1px solid rgba(200,168,75,0.08);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.course-card-h:hover {
  border-color: rgba(200,168,75,0.20);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.course-card-h .course-swatch {
  width: 80px;
  flex-shrink: 0;
  min-height: 110px;
}

.course-card-h .course-body {
  flex: 1;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

/* ─── Live Class compact card ─── */
.live-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(200,168,75,0.08);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  transition: border-color var(--transition);
}

.live-card.is-live { border-left-color: #5BAD55; }
.live-card:hover   { border-color: rgba(200,168,75,0.20); border-left-color: var(--gold); }
.live-card.is-live:hover { border-left-color: #5BAD55; }

.live-date-box {
  background: rgba(200,168,75,0.10);
  border: 1px solid rgba(200,168,75,0.15);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  text-align: center;
  min-width: 48px;
  flex-shrink: 0;
}

.live-date-box .mc-day {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.live-date-box .mc-month {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 2px;
}

/* ─── Masterclass item (legacy kept) ─── */
.mc-item {
  background: var(--bg-card);
  border: 1px solid rgba(200,168,75,0.08);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}

.mc-item:hover { border-color: rgba(200,168,75,0.18); }

.mc-date-box {
  background: rgba(200,168,75,0.10);
  border: 1px solid rgba(200,168,75,0.15);
  color: var(--gold);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  text-align: center;
  min-width: 48px;
  flex-shrink: 0;
}

.mc-date-box .mc-day {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.mc-date-box .mc-month {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.70;
  margin-top: 2px;
}

/* ─── Submission Card ─── */
.submission-card {
  background: var(--bg-card);
  border: 1px solid rgba(200,168,75,0.08);
  border-radius: var(--r-md);
  padding: 14px 16px;
  border-left: 3px solid var(--gold-dim);
  margin-bottom: 10px;
  transition: border-color var(--transition);
}

.submission-card:hover  { border-color: rgba(200,168,75,0.20); }
.submission-card.pending { border-left-color: var(--gold); }
.submission-card.graded  { border-left-color: #2D5A27; }

/* Submission type icons */
.sub-type-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sub-type-audio { background: rgba(45,90,39,0.20);  color: #6DC766; }
.sub-type-doc   { background: rgba(200,168,75,0.15); color: var(--gold); }
.sub-type-quiz  { background: rgba(139,46,38,0.20);  color: #D0675D; }

/* ─── Recording item ─── */
.recording-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid rgba(200,168,75,0.08);
  border-radius: var(--r-md);
  margin-bottom: 8px;
}

/* ─── Book / Course cards ─── */
.book-card {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(200,168,75,0.08);
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(200,168,75,0.18);
}

.book-cover {
  position: relative;
  padding: 28px 24px 20px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.book-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.55) 100%);
}

.book-cover-content { position: relative; z-index: 1; }

.book-cover .book-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.25;
}

.book-cover .book-author {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-weight: 400;
}

.book-body {
  background: var(--bg-card);
  padding: 14px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.book-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ─── Empty State ─── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-3);
}

.empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--text-2);
  margin-bottom: 8px;
}

.empty-state p { font-size: 13px; }

/* ─── Accordion ─── */
.accordion-item {
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid rgba(200,168,75,0.08);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-card);
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}

.accordion-header:hover          { background: var(--bg-elevated); }
.accordion-header.open           { background: var(--bg-elevated); }

.accordion-body {
  display: none;
  background: var(--bg);
  border-top: 1px solid rgba(200,168,75,0.08);
}

.accordion-body.open { display: block; }

.accordion-chevron {
  transition: transform var(--transition);
  color: var(--text-3);
}

.accordion-header.open .accordion-chevron { transform: rotate(180deg); }

/* ─── Lesson Row ─── */
.lesson-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(200,168,75,0.06);
  transition: background var(--transition);
}

.lesson-row:last-child { border-bottom: none; }
.lesson-row:hover      { background: var(--bg-hover); }

.lesson-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(200,168,75,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}

.lesson-check.done {
  background: var(--emerald);
  border-color: var(--emerald);
  color: white;
}

.lesson-type-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.type-video    { background: rgba(139,46,38,0.15);  color: #D0675D; }
.type-reading  { background: rgba(45,90,39,0.15);   color: #6DC766; }
.type-exercise { background: rgba(200,168,75,0.12); color: var(--gold); }
.type-quiz     { background: rgba(100,80,200,0.12); color: #A08CF0; }

/* ─── Waveform Canvas ─── */
.waveform-canvas {
  width: 100%;
  height: 100px;
  background: var(--bg-elevated);
  border-radius: var(--r-sm);
}

/* ─── Filter Chips ─── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-chip {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(200,168,75,0.12);
  background: var(--bg-elevated);
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-chip:hover        { border-color: var(--gold); color: var(--gold); }
.filter-chip.active       { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.filter-chip.active-green { background: #2D5A27; color: var(--text); border-color: #2D5A27; }

/* ─── Progress Ring ─── */
.progress-ring-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-ring-label {
  position: absolute;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}

.progress-ring-label small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
}

/* ─── Instructor Grid ─── */
.instructor-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1100px) {
  .instructor-grid { grid-template-columns: 1fr; }
}

/* ─── User Avatar Initials ─── */
.user-avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.user-avatar-initials.green { background: rgba(45,90,39,0.20); border-color: #2D5A27; color: #6DC766; }

/* ─── Divider ─── */
.divider {
  height: 1px;
  background: rgba(200,168,75,0.08);
  margin: 20px 0;
}

/* ─── Pulsing live dot ─── */
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5BAD55;
  animation: pulse-dot 1.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .main-content { padding: 24px 16px; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform var(--transition);
  }

  .sidebar.open { transform: translateX(0); }

  .main-wrap { margin-left: 0; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .topbar { padding: 0 16px; }
  .main-content { padding: 20px 16px; }
  .topbar-search { display: none; }
  .welcome-banner { flex-direction: column; }
}
