/* ══════════════════════════════════════════════════════════════════════════
   Salem Suzuki Violin Studio — "Warm Rosewood" Design System
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #4A2C2A;
  --primary-light: #6B4543;
  --primary-dark: #3A1F1D;
  --accent: #D4956A;
  --accent-light: #E8B78E;
  --accent-dark: #B87A52;
  --secondary: #3B4F38;
  --secondary-light: #546B50;
  --bg: #FAF7F4;
  --surface: #FFFFFF;
  --surface-warm: #FDF9F5;
  --text: #3A2E2C;
  --text-muted: #8B7D79;
  --text-light: #B0A5A0;
  --success: #546B50;
  --success-light: #EDF2EC;
  --danger: #8B4049;
  --danger-light: #F5E6E8;
  --warning: #D4956A;
  --warning-light: #FFF3E0;
  --info: #3B4F38;
  --info-light: #EDF2EC;
  --border: #E8E0DB;
  --border-light: #F0EBE7;
  --shadow-sm: 0 1px 3px rgba(74,44,42,0.06);
  --shadow: 0 2px 8px rgba(74,44,42,0.08);
  --shadow-md: 0 4px 16px rgba(74,44,42,0.10);
  --shadow-lg: 0 8px 32px rgba(74,44,42,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --sidebar-w: 240px;
  --header-h: 60px;
  --bottomnav-h: 64px;
  --font: 'Lora', 'Georgia', 'Times New Roman', serif;
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--primary); }

/* ── Auth Screens ─────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent-dark) 100%);
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.auth-card .logo { text-align: center; margin-bottom: 32px; }
.auth-card .logo .icon { font-size: 52px; display: block; margin-bottom: 12px; }
.auth-card .logo h1 { font-size: 26px; color: var(--primary); font-weight: 800; letter-spacing: -0.5px; font-family: var(--font-heading); }
.auth-card .logo p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.auth-card .logo .subtitle { color: var(--accent); font-weight: 600; font-size: 13px; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0; color: var(--text-muted); font-size: 13px;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

.auth-tabs {
  display: flex; gap: 4px; margin-bottom: 24px;
  background: var(--bg); border-radius: var(--radius); padding: 4px;
}
.auth-tab {
  flex: 1; padding: 8px; text-align: center; border: none;
  background: transparent; border-radius: 6px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  transition: all 0.2s; font-family: var(--font);
}
.auth-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ── Teacher Layout (Sidebar) ─────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--primary);
  color: white;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 200;
  transition: transform 0.3s ease;
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
}
.sidebar-brand .brand-row { display: flex; align-items: center; gap: 12px; }
.sidebar-brand h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.3px; font-family: var(--font-heading); }
.sidebar-brand p { font-size: 11px; opacity: 0.5; margin-top: 4px; }

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

.nav-section { padding: 16px 20px 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.4; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; cursor: pointer;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  font-size: 13px; color: rgba(255,255,255,0.65);
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
.nav-item.active { background: rgba(255,255,255,0.10); border-left-color: var(--accent); color: white; }
.nav-item .nav-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.nav-item .nav-label { font-weight: 500; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
  min-width: 18px; text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px;
  background: var(--accent); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-details .user-name { font-size: 13px; font-weight: 600; color: white; }
.user-details .user-role { font-size: 11px; color: rgba(255,255,255,0.45); }

.btn-logout {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 8px 12px;
  background: rgba(255,255,255,0.06); border: none; border-radius: 6px;
  color: rgba(255,255,255,0.6); cursor: pointer;
  font-size: 12px; width: 100%; font-family: var(--font);
  transition: all 0.2s;
}
.btn-logout:hover { background: rgba(255,255,255,0.12); color: white; }

/* Mobile hamburger */
.hamburger {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 201;
  width: 40px; height: 40px; border: none; border-radius: var(--radius);
  background: var(--primary); color: white; font-size: 20px;
  cursor: pointer; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; padding: 28px 32px;
  min-height: 100vh; max-width: 1400px;
}

/* ── Student/Parent Layout ────────────────────────────────────────────────── */
.student-layout { min-height: 100vh; background: var(--bg); padding-bottom: 80px; }

.student-header {
  background: var(--primary);
  color: white;
  padding: 0 24px;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 8px rgba(74,44,42,0.2);
  position: sticky; top: 0; z-index: 100;
}
.student-header .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; cursor: pointer; font-family: var(--font-heading); }
.student-header .header-right { display: flex; align-items: center; gap: 16px; }
.student-header .user-name { font-size: 13px; opacity: 0.9; }

/* Notification bell */
.notification-bell {
  position: relative; cursor: pointer; padding: 6px;
  background: none; border: none; color: white; font-size: 20px;
}
.notification-bell .bell-count {
  position: absolute; top: 0; right: 0;
  background: var(--danger); color: white;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.notification-bell .bell-count.hidden { display: none; }

/* Desktop top nav for student */
.student-topnav {
  display: flex; gap: 2px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  overflow-x: auto;
}
.student-topnav .topnav-item {
  padding: 14px 18px; cursor: pointer;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  transition: all 0.2s; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: var(--font);
}
.student-topnav .topnav-item:hover { color: var(--text); }
.student-topnav .topnav-item.active { color: var(--primary); border-bottom-color: var(--accent); font-weight: 600; }
.student-topnav .topnav-item .tab-badge {
  background: var(--danger); color: white;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 8px;
}

/* Mobile bottom nav for student */
.student-bottomnav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  height: var(--bottomnav-h);
  z-index: 100;
  padding: 0 8px;
}
.student-bottomnav .bottomnav-inner {
  display: flex; height: 100%; align-items: center; justify-content: space-around;
}
.student-bottomnav .bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  cursor: pointer; padding: 6px 8px; border: none; background: none;
  color: var(--text-muted); font-family: var(--font);
  position: relative; transition: color 0.2s;
}
.student-bottomnav .bnav-item.active { color: var(--primary); }
.student-bottomnav .bnav-item .bnav-icon { font-size: 20px; }
.student-bottomnav .bnav-item .bnav-label { font-size: 10px; font-weight: 600; }
.student-bottomnav .bnav-item .bnav-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px;
  background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 17px;
  text-align: center;
  display: flex; align-items: center; justify-content: center;
}
.more-sheet-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 6px; border: none; background: none; cursor: pointer;
  color: var(--text); font-family: var(--font); font-size: 11px; font-weight: 600;
  border-radius: 10px; transition: background 0.15s; position: relative;
}
.more-sheet-item:active { background: var(--bg); }

.student-body { max-width: 960px; margin: 0 auto; padding: 24px 20px; }

/* ── Page Header ──────────────────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header h1 { font-size: 24px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.page-header p { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.page-header .header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h2 { font-size: 16px; font-weight: 700; color: var(--primary); }
.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border-light); background: var(--surface-warm); }

/* Feature card (with colored top border) */
.feature-card { border-top: 3px solid var(--accent); }
.feature-card.teal { border-top-color: var(--secondary); }
.feature-card.success { border-top-color: var(--success); }
.feature-card.danger { border-top-color: var(--danger); }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
label .required { color: var(--danger); margin-left: 2px; }

input, select, textarea {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: var(--font);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,149,106,0.15);
}
input::placeholder, textarea::placeholder { color: var(--text-light); }
textarea { resize: vertical; min-height: 80px; }

input[type="checkbox"], input[type="radio"] { width: auto; }

.checkbox-group { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.checkbox-group label { margin-bottom: 0; font-weight: 400; cursor: pointer; }
.checkbox-group input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.form-help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border: none; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all 0.2s ease; text-decoration: none;
  font-family: var(--font); white-space: nowrap; line-height: 1.4;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); box-shadow: var(--shadow-sm); }

.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover:not(:disabled) { background: #D8CFC9; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover:not(:disabled) { background: #4A7A49; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #6E323A; }

.btn-teal { background: var(--secondary); color: white; }
.btn-teal:hover:not(:disabled) { background: var(--secondary-light); }

.btn-warm { background: #D4956A; color: white; }
.btn-warm:hover:not(:disabled) { background: #c4855a; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) { background: var(--bg); border-color: var(--accent); color: var(--accent-dark); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 8px; min-width: 36px; justify-content: center; }

.btn-group { display: flex; gap: 0; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.btn-group .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 12px 16px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-muted); background: var(--surface-warm);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle; font-size: 13px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(212,149,106,0.03); }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--accent-dark); }
.badge-danger  { background: var(--danger-light); color: var(--danger); }
.badge-info    { background: var(--info-light); color: var(--info); }
.badge-secondary { background: var(--bg); color: var(--text-muted); }
.badge-primary { background: rgba(74,44,42,0.08); color: var(--primary); }
.badge-accent  { background: rgba(212,149,106,0.15); color: var(--accent-dark); }

/* Level badges */
.level-badge { padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.level-beginner { background: rgba(163,184,158,0.25); color: #546B50; }
.level-intermediate { background: rgba(122,158,117,0.25); color: #3B4F38; }
.level-advanced { background: rgba(84,107,80,0.3); color: #3B4F38; }

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

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 16px;
}

.stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.warm    { background: rgba(212,149,106,0.12); }
.stat-icon.teal    { background: rgba(59,79,56,0.10); }
.stat-icon.green   { background: rgba(84,107,80,0.10); }
.stat-icon.red     { background: rgba(139,64,73,0.10); }
.stat-icon.primary { background: rgba(74,44,42,0.08); }

.stat-value { font-size: 28px; font-weight: 800; color: var(--primary); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Schedule Grid ────────────────────────────────────────────────────────── */
.schedule-grid {
  display: grid;
  grid-template-columns: 72px repeat(7, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden; font-size: 12px;
}

.schedule-header {
  background: var(--primary);
  color: white; padding: 10px 6px;
  text-align: center; font-weight: 700; font-size: 12px;
}

.time-label {
  background: var(--surface-warm);
  padding: 8px 6px; text-align: right;
  font-size: 11px; color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

.schedule-cell {
  min-height: 80px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  position: relative;
}
.schedule-cell:last-child { border-right: none; }

.lesson-block {
  position: absolute;
  background: var(--accent); color: white;
  border-radius: 6px; padding: 2px 6px;
  font-size: 11px; font-weight: 600;
  overflow: visible; cursor: pointer; line-height: 1.2;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}
.lesson-block:hover { opacity: 0.9; transform: scale(1.02); z-index: 2; }
.lesson-block .lesson-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-block .lesson-time { opacity: 0.85; font-size: 10px; }

.lesson-block.beginner { background: #A3B89E; }
.lesson-block.intermediate { background: #7A9E75; }
.lesson-block.advanced { background: #546B50; }
.lesson-block.group-class { background: #3B4F38 !important; }

/* ── Calendar ─────────────────────────────────────────────────────────────── */
.calendar-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.calendar-nav h3 { font-size: 18px; font-weight: 700; color: var(--primary); }
.calendar-nav .nav-arrows { display: flex; gap: 4px; }

.calendar-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
}
.calendar-day-header {
  padding: 10px; text-align: center;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); background: var(--surface-warm);
  border-bottom: 1px solid var(--border);
}
.calendar-day {
  min-height: 90px; padding: 6px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  background: var(--surface); cursor: pointer;
  transition: background 0.15s;
  overflow: hidden; min-width: 0;
}
.calendar-day:hover { background: var(--surface-warm); }
.calendar-day:nth-child(7n) { border-right: none; }
.calendar-day.other-month { background: var(--bg); opacity: 0.5; }
.calendar-day.today { background: rgba(212,149,106,0.06); }
.calendar-day .day-number {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 4px;
}
.calendar-day.today .day-number {
  background: var(--accent); color: white;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.calendar-event {
  font-size: 10px; padding: 2px 5px;
  border-radius: 4px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 600;
}
.calendar-event.lesson { background: rgba(212,149,106,0.2); color: var(--accent-dark); }
.calendar-event.group { background: rgba(59,79,56,0.15); color: var(--secondary); }
.calendar-event.recital { background: rgba(212,149,106,0.2); color: var(--accent-dark); }
.calendar-event.holiday { background: var(--danger-light); color: var(--danger); }

/* ── Practice Heatmap ─────────────────────────────────────────────────────── */
.heatmap-container { overflow-x: auto; padding: 8px 0; }
.heatmap {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  gap: 3px;
}
.heatmap-cell {
  width: 14px; height: 14px; border-radius: 3px;
  background: var(--border-light);
}
.heatmap-cell.level-1 { background: rgba(84,107,80,0.25); }
.heatmap-cell.level-2 { background: rgba(84,107,80,0.45); }
.heatmap-cell.level-3 { background: rgba(84,107,80,0.65); }
.heatmap-cell.level-4 { background: var(--success); }

.heatmap-legend {
  display: flex; align-items: center; gap: 4px;
  margin-top: 8px; font-size: 11px; color: var(--text-muted);
}
.heatmap-legend .heatmap-cell { width: 12px; height: 12px; }

/* Practice streak */
.streak-display {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white; border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.streak-fire { font-size: 36px; }
.streak-count { font-size: 36px; font-weight: 800; line-height: 1; }
.streak-label { font-size: 13px; opacity: 0.85; }

/* Practice weekly chart */
.weekly-chart {
  display: flex; align-items: flex-end; gap: 8px;
  height: 120px; padding: 8px 0;
}
.chart-bar-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar {
  width: 100%; min-height: 4px; border-radius: 4px 4px 0 0;
  background: var(--accent); transition: height 0.3s ease;
}
.chart-bar.empty { background: var(--border-light); }
.chart-label { font-size: 10px; color: var(--text-muted); font-weight: 600; }
.chart-value { font-size: 10px; color: var(--text); font-weight: 600; }

/* ── Requirements Checklist ───────────────────────────────────────────────── */
.requirement-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.requirement-item:last-child { border-bottom: none; }
.requirement-item:hover { background: var(--surface-warm); }

.req-check {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  border: 2px solid var(--border);
  color: transparent;
  transition: all 0.2s;
}
.req-check.completed {
  background: var(--success); border-color: var(--success);
  color: white;
}

.req-content { flex: 1; }
.req-title { font-weight: 600; font-size: 14px; }
.req-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.req-action { flex-shrink: 0; }

/* Requirements matrix (teacher) */
.req-matrix { overflow-x: auto; }
.req-matrix table { min-width: 700px; }
.req-matrix th { font-size: 10px; text-align: center; padding: 10px 8px; }
.req-matrix td { text-align: center; padding: 10px 8px; }
.req-matrix .student-name-cell { text-align: left; font-weight: 600; white-space: nowrap; }
.req-status-icon { font-size: 18px; }

/* ── Lesson Info Card (Student Home) ──────────────────────────────────────── */
.lesson-info-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border-radius: var(--radius-xl);
  padding: 28px; margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.lesson-info-card::after {
  content: ''; position: absolute;
  right: -10px; bottom: -15px;
  font-size: 120px; opacity: 0.06;
  transform: rotate(-15deg);
}

.lesson-info-card h2 { font-size: 18px; margin-bottom: 16px; font-weight: 600; opacity: 0.85; }
.lesson-detail { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 15px; }
.lesson-detail .icon { font-size: 18px; opacity: 0.7; width: 24px; text-align: center; }

.countdown-box {
  display: inline-flex; gap: 16px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 16px 24px; margin-top: 20px;
  backdrop-filter: blur(4px);
}
.countdown-unit { text-align: center; }
.countdown-value { font-size: 32px; font-weight: 800; line-height: 1; }
.countdown-label { font-size: 10px; opacity: 0.65; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

/* ── Video Grid ───────────────────────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: box-shadow 0.2s, transform 0.2s;
}
.video-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.video-player-container {
  background: #1a1a1a; aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.video-player-container video { width: 100%; height: 100%; object-fit: contain; }

.video-card-body { padding: 16px; }
.video-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; color: var(--primary); }
.video-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

.feedback-section { margin-top: 12px; }
.feedback-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px;
}
.feedback-existing {
  background: var(--success-light); border: 1px solid rgba(84,107,80,0.2);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 13px; color: #2D5A2C; white-space: pre-wrap; word-break: break-word;
}
.feedback-form textarea { margin-bottom: 8px; min-height: 70px; }

/* ── Upload Area ──────────────────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center; cursor: pointer;
  transition: all 0.2s;
  background: var(--surface-warm);
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--accent);
  background: rgba(212,149,106,0.05);
}
.upload-area .upload-icon { font-size: 48px; margin-bottom: 12px; }
.upload-area h3 { font-size: 16px; color: var(--primary); margin-bottom: 4px; }
.upload-area p { color: var(--text-muted); font-size: 13px; }
.upload-area input { display: none; }

/* ── Document / PDF viewer ────────────────────────────────────────────────── */
.pdf-viewer {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden; margin-bottom: 16px;
}
.pdf-viewer iframe { width: 100%; height: 500px; border: none; }

.signature-pad-container {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px; background: var(--surface-warm);
}
.signature-pad-container canvas {
  width: 100%; height: 120px;
  border: 1px solid var(--border);
  border-radius: 6px; background: white; cursor: crosshair;
}

/* ── Listening Activity ───────────────────────────────────────────────────── */
.youtube-embed {
  aspect-ratio: 16/9; border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 20px;
}
.youtube-embed iframe { width: 100%; height: 100%; border: none; }

/* ── Messages ─────────────────────────────────────────────────────────────── */
.message-list { display: flex; flex-direction: column; }
.message-item {
  display: flex; gap: 14px; padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer; transition: background 0.15s;
}
.message-item:hover { background: var(--surface-warm); }
.message-item.unread { background: rgba(212,149,106,0.04); }
.message-item.unread .message-subject { font-weight: 700; }
.message-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  margin-top: 6px;
}
.message-dot.read { background: transparent; }
.message-content { flex: 1; min-width: 0; }
.message-subject { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.message-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.message-date { font-size: 11px; color: var(--text-light); flex-shrink: 0; }

/* Message composer */
.composer-toolbar {
  display: flex; gap: 4px; padding: 8px;
  background: var(--surface-warm); border: 1px solid var(--border);
  border-bottom: none; border-radius: var(--radius) var(--radius) 0 0;
}
.composer-toolbar button {
  padding: 4px 8px; border: none; background: transparent;
  border-radius: 4px; cursor: pointer; font-size: 14px;
  color: var(--text-muted); transition: all 0.15s;
}
.composer-toolbar button:hover { background: var(--border); color: var(--text); }
.composer-body {
  min-height: 200px; padding: 16px;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  outline: none; font-size: 14px; line-height: 1.6;
}

/* ── Payment cards ────────────────────────────────────────────────────────── */
.balance-card {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  color: white; border-radius: var(--radius-xl);
  padding: 28px; position: relative; overflow: hidden;
}
.balance-card::after { display: none; }
.balance-amount { font-size: 36px; font-weight: 800; }
.balance-label { font-size: 13px; opacity: 0.8; margin-bottom: 4px; }
.balance-due { font-size: 13px; opacity: 0.7; margin-top: 8px; }

/* Payment status pill */
.payment-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.payment-status.paid { background: var(--success-light); color: var(--success); }
.payment-status.due { background: var(--warning-light); color: var(--accent-dark); }
.payment-status.overdue { background: var(--danger-light); color: var(--danger); }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(58,46,44,0.5);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  animation: fadeIn 0.15s ease;
}
/* Confirm dialog must always appear above other modals (e.g. large-modal) */
#confirm-modal { z-index: 1100; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 560px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
}
.modal.wide { max-width: 720px; }
.modal.narrow { max-width: 420px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.modal-header h3 { font-size: 18px; font-weight: 700; color: var(--primary); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--surface-warm);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  flex-shrink: 0;
}

.btn-close {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--text-muted);
  padding: 4px; line-height: 1;
  transition: color 0.15s;
}
.btn-close:hover { color: var(--text); }

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

/* ── Tabs (within cards) ──────────────────────────────────────────────────── */
.tab-bar {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tab-btn {
  padding: 12px 20px; border: none; background: none;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap; font-family: var(--font);
  transition: all 0.2s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--accent); font-weight: 600; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Alerts & Toasts ──────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-success { background: var(--success-light); color: #3B4F38; border: 1px solid rgba(84,107,80,0.2); }
.alert-error   { background: var(--danger-light); color: #6E323A; border: 1px solid rgba(139,64,73,0.2); }
.alert-warning { background: var(--warning-light); color: var(--accent-dark); border: 1px solid rgba(212,149,106,0.2); }
.alert-info    { background: var(--info-light); color: var(--info); border: 1px solid rgba(59,79,56,0.15); }

.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}

.toast {
  padding: 14px 20px; border-radius: var(--radius);
  color: white; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  max-width: 360px;
  display: flex; align-items: center; gap: 8px;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.info    { background: var(--secondary); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── Token Display ────────────────────────────────────────────────────────── */
.token-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
}
.token-value {
  font-family: var(--font-mono);
  font-size: 13px; flex: 1; word-break: break-all;
  color: var(--primary);
}

/* ── Filters & Search ─────────────────────────────────────────────────────── */
.filters-bar {
  display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center;
}

.search-wrapper {
  position: relative; flex: 1; min-width: 200px; max-width: 320px;
}
.search-wrapper::before {
  content: '🔍'; position: absolute;
  left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 14px; pointer-events: none;
}
.search-wrapper input { padding-left: 34px; }

.filter-select {
  min-width: 140px; max-width: 200px;
}

/* ── Empty States ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 24px; color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 52px; margin-bottom: 16px; opacity: 0.8; }
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; font-weight: 700; }
.empty-state p { font-size: 14px; margin-bottom: 20px; max-width: 360px; margin-left: auto; margin-right: auto; }

/* ── Progress ─────────────────────────────────────────────────────────────── */
.progress-bar-container {
  background: var(--border-light); border-radius: 6px;
  height: 8px; overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transition: width 0.4s ease;
}
.progress-bar.green { background: linear-gradient(90deg, var(--success), #7A9E75); }

/* ── Notifications Dropdown ───────────────────────────────────────────────── */
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; max-height: 400px; overflow-y: auto;
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  z-index: 300;
}
.notif-header {
  padding: 14px 16px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 14px; color: var(--primary);
}
.notif-item {
  display: flex; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer; transition: background 0.15s;
}
.notif-item:hover { background: var(--surface-warm); }
.notif-item.unread { background: rgba(212,149,106,0.04); }
.notif-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  background: var(--bg);
}
.notif-text { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 500; }
.notif-time { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* ── Student Cards ────────────────────────────────────────────────────────── */
.student-list { display: flex; flex-direction: column; }

.student-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.student-row:last-child { border-bottom: none; }
.student-row:hover { background: var(--surface-warm); }

.student-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}

.student-info { flex: 1; min-width: 0; }
.student-name { font-weight: 600; font-size: 14px; color: var(--primary); }
.student-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.student-schedule { text-align: right; min-width: 160px; }
.student-schedule .lesson-time { font-weight: 600; color: var(--primary); font-size: 13px; }
.student-schedule .lesson-day { font-size: 12px; color: var(--text-muted); }

.student-actions { display: flex; gap: 6px; }

/* ── Submission Cards (Student) ───────────────────────────────────────────── */
.submission-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
}
.submission-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.submission-title { font-weight: 700; font-size: 14px; color: var(--primary); }
.submission-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.submission-body { padding: 16px 20px; }

/* ── Semester Pill ────────────────────────────────────────────────────────── */
.semester-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  background: rgba(74,44,42,0.06);
  font-size: 13px; font-weight: 600; color: var(--primary);
}
.semester-pill .semester-active { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* ── Copy Button ──────────────────────────────────────────────────────────── */
.copy-link-btn { font-size: 11px; padding: 4px 10px; }

/* ── Toolbar (for list actions) ───────────────────────────────────────────── */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}

/* ── Divider (decorative music line) ──────────────────────────────────────── */
.divider {
  border: none; border-top: 1px solid var(--border);
  margin: 20px 0;
}
.divider-music {
  text-align: center; position: relative;
  margin: 24px 0; color: var(--text-light);
}
.divider-music::before {
  content: ''; position: absolute;
  top: 50%; left: 0; right: 0;
  border-top: 1px solid var(--border);
}
.divider-music span {
  position: relative; background: var(--bg);
  padding: 0 12px; font-size: 12px;
}

/* ── Quick Action Cards ───────────────────────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.quick-action {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px; text-align: center;
  cursor: pointer; transition: all 0.2s;
}
.quick-action:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.quick-action .qa-icon { font-size: 24px; margin-bottom: 6px; }
.quick-action .qa-label { font-size: 12px; font-weight: 600; color: var(--text); }

/* ── Form Builder (drag items) ────────────────────────────────────────────── */
.field-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px;
  margin-bottom: 8px; display: flex; align-items: center; gap: 12px;
  cursor: grab;
}
.field-item:hover { border-color: var(--accent); }
.field-item .field-drag { color: var(--text-light); font-size: 16px; cursor: grab; }
.field-item .field-info { flex: 1; }
.field-item .field-type-label { font-size: 11px; color: var(--text-muted); }
.field-item .field-label { font-weight: 600; font-size: 13px; }
.field-item .field-actions { display: flex; gap: 4px; }

/* ── Utilities ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-muted { color: var(--text-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-accent { color: var(--accent-dark); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.font-bold { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 16px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Loading Spinner ──────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }

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

.loading-overlay {
  display: flex; align-items: center; justify-content: center;
  padding: 60px; gap: 12px; color: var(--text-muted);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .main-content { padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Teacher: sidebar off-canvas */
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .hamburger { display: flex; }
  .main-content { margin-left: 0; padding: 16px; padding-top: 64px; }

  /* Student: switch to bottom nav */
  .student-topnav { display: none; }
  .student-bottomnav { display: block; }
  .student-body { padding: 16px 12px; padding-bottom: calc(var(--bottomnav-h) + 16px); }

  /* General responsive */
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }

  .countdown-box { gap: 12px; padding: 12px 16px; }
  .countdown-value { font-size: 24px; }

  .modal { margin: 12px; max-height: 95vh; }

  .schedule-grid { font-size: 10px; grid-template-columns: 50px repeat(7, 1fr); }

  .calendar-day { min-height: 60px; }
  .calendar-event { font-size: 9px; }

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

  .notif-dropdown { width: calc(100vw - 24px); right: -60px; }

  .balance-card { padding: 20px; }
  .balance-amount { font-size: 28px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .schedule-grid { display: none; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 32px 24px; }
  .filters-bar { flex-direction: column; }
  .search-wrapper { max-width: 100%; }
}

/* ── Print ────────────────────────────────────────────────────────────────── */
@media print {
  .sidebar, .hamburger, .student-header, .student-topnav,
  .student-bottomnav, .btn, .toast-container { display: none !important; }
  .main-content { margin-left: 0; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* Rich text editor placeholder */
[contenteditable][data-placeholder]:empty:before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}
[contenteditable]:focus {
  outline: none;
}

/* ── Note editor (contenteditable) ───────────────────────────────────────── */
.note-editor {
  outline: none;
  flex: 1;
  overflow-y: auto;
  min-height: 240px;
  padding: 4px 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  cursor: text;
}
.note-editor .nb {
  min-height: 1.6em;
  word-break: break-word;
  border-radius: 3px;
  padding: 1px 4px;
  position: relative;
}
.note-editor .ncb {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  margin-right: 6px;
  color: var(--primary);
  font-size: 15px;
  display: inline-block;
}
.note-editor .ncb:hover { opacity: 0.7; }

/* ── Note folder tab bar ─────────────────────────────────────────────────── */
.nfb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.nfb:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--primary);
}
.nfb.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.nfb.nfb-new {
  border-style: dashed;
  color: var(--text-muted);
}
.nfb.nfb-new:hover {
  color: var(--primary);
  border-color: var(--primary);
  border-style: solid;
}

/* ── Shared tiny button size ─────────────────────────────────────────────── */
.btn-xs {
  font-size: 11px !important;
  padding: 3px 9px !important;
  border-radius: 4px !important;
}

/* ── Note editor folder select ───────────────────────────────────────────── */
.note-toolbar-select {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
