/* ==========================================================================
   CADENZA PIANO ACADEMY - DESIGN SYSTEM & LUXURY STYLING
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Luxury Dark / Obsidian Palette */
  --bg-primary: #07090e;
  --bg-secondary: #0d121c;
  --bg-surface: #131b29;
  --bg-surface-elevated: #1a2436;
  --bg-glass: rgba(19, 27, 41, 0.75);
  --bg-glass-strong: rgba(13, 18, 28, 0.88);

  /* Champagne & Regal Gold Accents */
  --gold-50: #fdf9ee;
  --gold-100: #fbf2d3;
  --gold-200: #f6e2a2;
  --gold-300: #efcc6c;
  --gold-400: #e6b43a;
  --gold-500: #d4af37;
  --gold-600: #ba8c22;
  --gold-700: #93671a;
  --gold-gradient: linear-gradient(135deg, #f7d885 0%, #d4af37 50%, #aa801e 100%);
  --gold-glow: 0 0 25px rgba(212, 175, 55, 0.28);
  --gold-glow-strong: 0 0 35px rgba(212, 175, 55, 0.45);

  /* Status Accents */
  --emerald: #10b981;
  --emerald-surface: rgba(16, 185, 129, 0.12);
  --rose: #f43f5e;
  --rose-surface: rgba(244, 63, 94, 0.12);
  --amber: #f59e0b;
  --amber-surface: rgba(245, 158, 11, 0.12);
  --indigo: #6366f1;
  --indigo-surface: rgba(99, 102, 241, 0.12);
  --cyan: #06b6d4;

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-gold: #e6b43a;

  /* Borders & Glass Dividers */
  --border-light: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 175, 55, 0.25);
  --border-gold-strong: rgba(212, 175, 55, 0.55);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.7);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Fonts */
  --font-display: 'Cinzel', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --sidebar-width: 270px;
  --header-height: 72px;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

/* Subtle musical wallpaper glow in the background */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  right: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, rgba(99, 102, 241, 0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(50px);
}

body::after {
  content: '';
  position: fixed;
  bottom: -200px;
  left: -150px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, rgba(212, 175, 55, 0.04) 50%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

a {
  color: var(--gold-400);
  text-decoration: none;
}

/* ==========================================================================
   Layout Shell
   ========================================================================== */

#app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* --- Top Announcement & Demo Role Switcher Bar --- */
.role-demo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 42px;
  background: linear-gradient(90deg, #111827 0%, #171f30 50%, #111827 100%);
  border-bottom: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
  font-size: 0.85rem;
}

.role-demo-bar .role-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.role-badge.teacher {
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold-300);
  border: 1px solid var(--border-gold);
}

.role-badge.parent {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.role-badge.student {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.quick-switch-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.quick-switch-btn {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid transparent;
}

.quick-switch-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.quick-switch-btn.active {
  background: var(--gold-gradient);
  color: #07090e;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 42px;
  bottom: 0;
  left: 0;
  z-index: 90;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.studio-logo-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  box-shadow: var(--gold-glow);
  object-fit: cover;
  border: 1px solid var(--border-gold);
}

.studio-title-box h1 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.studio-title-box span {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 1.2rem 0.85rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  padding: 0.6rem 0.75rem 0.3rem;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  transform: translateX(3px);
}

.nav-item.active {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-300);
  font-weight: 600;
  border: 1px solid rgba(212, 175, 55, 0.22);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  background: var(--gold-400);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px var(--gold-400);
}

.nav-item .nav-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--rose);
  color: white;
}

/* Sidebar Footer (Practice Shortcut & User Card) */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(13, 18, 28, 0.6);
}

.practice-quick-launch {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-main);
  text-align: left;
  transition: all 0.25s ease;
}

.practice-quick-launch:hover {
  transform: translateY(-2px);
  box-shadow: var(--gold-glow);
  border-color: var(--gold-400);
}

.practice-launch-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--gold-gradient);
  color: #07090e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}

.practice-launch-text h4 {
  font-size: 0.85rem;
  font-weight: 700;
}

.practice-launch-text p {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: var(--radius-md);
}

.user-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.user-meta {
  flex: 1;
  overflow: hidden;
}

.user-meta .name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta .role {
  font-size: 0.72rem;
  color: var(--gold-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  margin-top: 42px;
  min-height: calc(100vh - 42px);
  display: flex;
  flex-direction: column;
}

/* Header */
.top-header {
  height: var(--header-height);
  padding: 0 2rem;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 42px;
  z-index: 40;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu-toggle {
  display: none;
  font-size: 1.4rem;
  color: var(--text-main);
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: all 0.2s ease;
}

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

.header-btn.primary {
  background: var(--gold-gradient);
  color: #07090e;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.header-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--gold-glow);
}

/* App View Container */
.content-area {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* ==========================================================================
   Dashboard Widgets & Cards
   ========================================================================== */

.hero-banner-card {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 2rem;
  border: 1px solid var(--border-gold);
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.3) 0%, rgba(7, 9, 14, 0.95) 100%);
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.hero-banner-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  opacity: 0.45;
  filter: contrast(1.15) saturate(1.1);
  transition: transform 10s ease;
}

.hero-banner-card:hover .hero-banner-img {
  transform: scale(1.03);
}

.hero-banner-content {
  position: relative;
  z-index: 2;
  max-width: 750px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--border-gold);
  color: var(--gold-300);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.8rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.hero-desc {
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.hero-stats-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-stat-pill {
  background: rgba(13, 18, 28, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.6rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.hero-stat-pill .number {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-300);
}

.hero-stat-pill .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md);
}

.metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
}

.metric-header .icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.metric-header .trend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.metric-header .trend.positive {
  background: var(--emerald-surface);
  color: var(--emerald);
}

.metric-card .value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.metric-card .title {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Two Column Layout */
.dashboard-columns {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

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

.card-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.card-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
}

.card-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.card-body {
  padding: 1.5rem;
}

/* Appointment List Items */
.appointment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  margin-bottom: 0.85rem;
  transition: all 0.2s ease;
}

.appointment-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-gold);
}

.appointment-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.date-pill {
  width: 58px;
  height: 62px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.date-pill .month {
  font-size: 0.68rem;
  text-transform: uppercase;
  color: var(--gold-400);
  font-weight: 700;
}

.date-pill .day {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  font-family: var(--font-display);
}

.apt-details h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.apt-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-tag.scheduled {
  background: var(--emerald-surface);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-tag.requested {
  background: var(--amber-surface);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  animation: pulse-glow 2s infinite;
}

.status-tag.paid {
  background: var(--emerald-surface);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-tag.unpaid {
  background: var(--rose-surface);
  color: var(--rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Action button row inside cards */
.apt-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  border: 1px solid var(--border-light);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: var(--border-gold);
}

.btn-success-small {
  padding: 0.35rem 0.8rem;
  background: var(--emerald);
  color: #07090e;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
}

.btn-success-small:hover {
  filter: brightness(1.15);
}

/* ==========================================================================
   Homework & Practice Component
   ========================================================================== */

.homework-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  transition: all 0.25s ease;
}

.homework-card:hover {
  border-color: var(--border-gold);
}

.homework-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.hw-student-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.homework-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.repertoire-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  color: var(--gold-200);
  margin-bottom: 1rem;
}

/* Tasks Checklist */
.task-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0.95rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.task-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.task-item.completed {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}

.task-item.completed .task-text {
  text-decoration: line-through;
  color: var(--text-dim);
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--gold-400);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.task-item.completed .custom-checkbox {
  background: var(--gold-400);
  color: #07090e;
}

.task-text {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Teacher Voice Note Box */
.teacher-note-quote {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid var(--indigo);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 0.85rem 1.1rem;
  font-size: 0.85rem;
  color: #e2e8f0;
  font-style: italic;
  margin-bottom: 1.2rem;
  display: flex;
  gap: 0.65rem;
}

/* Sheet Music Snippet Visualizer */
.sheet-snippet-box {
  background: #090d15;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.sheet-info h5 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--gold-300);
  margin-bottom: 0.2rem;
}

.sheet-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Interactive Practice Room & Virtual Piano
   ========================================================================== */

.practice-studio-wrapper {
  background: linear-gradient(180deg, #0f1523 0%, #070a10 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
}

.practice-tools-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

/* Metronome Component */
.metronome-module {
  background: rgba(13, 18, 28, 0.9);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
}

.bpm-display-box {
  text-align: center;
  min-width: 90px;
}

.bpm-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold-300);
  line-height: 1;
}

.bpm-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.tempo-marking {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-style: italic;
}

.metronome-controls {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.metronome-slider {
  -webkit-appearance: none;
  width: 170px;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

.metronome-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-400);
  cursor: pointer;
  box-shadow: 0 0 10px var(--gold-400);
}

.metronome-beat-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.beat-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.1s ease;
}

.beat-dot.active {
  background: var(--gold-400);
  box-shadow: 0 0 12px var(--gold-400);
  transform: scale(1.3);
}

.beat-dot.downbeat.active {
  background: #ff5252;
  box-shadow: 0 0 14px #ff5252;
}

.btn-metronome-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #07090e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.35);
}

.btn-metronome-toggle.running {
  background: var(--rose);
  color: white;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.5);
}

/* Practice Timer */
.practice-timer-module {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(13, 18, 28, 0.9);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
}

.timer-digits {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--emerald);
  letter-spacing: 0.05em;
}

/* --- Virtual Piano Keyboard --- */
.piano-keyboard-container {
  background: #06080d;
  padding: 1.5rem 1rem 1rem;
  border-radius: var(--radius-lg);
  border: 2px solid #1a2233;
  box-shadow: inset 0 6px 20px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow-x: auto;
  user-select: none;
}

.piano-brand-badge {
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  color: var(--gold-500);
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.piano-keys-wrapper {
  display: flex;
  position: relative;
  height: 200px;
  min-width: 680px;
  justify-content: center;
}

.piano-key {
  position: relative;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.05s ease;
}

/* White Keys (Ivory) */
.white-key {
  width: 44px;
  height: 200px;
  background: linear-gradient(180deg, #f8fafc 0%, #ede9de 85%, #d6cebe 100%);
  border: 1px solid #94a3b8;
  border-bottom: 5px solid #b3a894;
  border-radius: 0 0 6px 6px;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.6rem;
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.15), 1px 2px 5px rgba(0, 0, 0, 0.4);
}

.white-key.active, .white-key:active {
  background: linear-gradient(180deg, #fef08a 0%, #fde047 100%);
  border-bottom-width: 2px;
  transform: translateY(3px);
  box-shadow: inset 0 -1px 3px rgba(0, 0, 0, 0.2), 0 0 15px rgba(234, 179, 8, 0.5);
}

.white-key .key-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  pointer-events: none;
}

/* Black Keys (Ebony) */
.black-key {
  width: 28px;
  height: 125px;
  background: linear-gradient(180deg, #2d3748 0%, #111827 50%, #030712 100%);
  border: 1px solid #111827;
  border-bottom: 4px solid #000;
  border-radius: 0 0 4px 4px;
  margin-left: -14px;
  margin-right: -14px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0.45rem;
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.8), inset 0 -2px 3px rgba(255, 255, 255, 0.15);
}

.black-key.active, .black-key:active {
  background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
  border-bottom-width: 1px;
  transform: translateY(3px);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
}

.black-key .key-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  pointer-events: none;
}

.piano-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Billing & Invoices
   ========================================================================== */

.invoice-table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 0.9rem 1.1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.01);
}

.data-table td {
  padding: 1.1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.invoice-number-tag {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--gold-300);
}

/* ==========================================================================
   Announcements Feed
   ========================================================================== */

.announcement-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  position: relative;
  transition: all 0.25s ease;
}

.announcement-card.pinned {
  border-color: var(--border-gold-strong);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.05) 0%, var(--bg-surface) 100%);
}

.pinned-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.announcement-header {
  margin-bottom: 0.75rem;
}

.announcement-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.announcement-body {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 1.25rem;
}

.announcement-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.like-btn:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose);
  border-color: rgba(244, 63, 94, 0.3);
}

/* ==========================================================================
   Chat & Messaging Hub
   ========================================================================== */

.chat-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: 650px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .chat-container {
    grid-template-columns: 1fr;
    height: 600px;
  }
}

.chat-sidebar {
  border-right: 1px solid var(--border-light);
  background: rgba(13, 18, 28, 0.6);
  display: flex;
  flex-direction: column;
}

.chat-channel-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-bottom: 0.35rem;
  transition: all 0.2s ease;
}

.channel-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.channel-item.active {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.channel-info h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.channel-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.chat-main {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
}

.chat-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.messages-scroll-area {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-bubble {
  max-width: 75%;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.45;
  position: relative;
}

.message-bubble.incoming {
  align-self: flex-start;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-bottom-left-radius: 4px;
}

.message-bubble.outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, #1e293b 0%, #293548 100%);
  border: 1px solid var(--border-gold);
  border-bottom-right-radius: 4px;
  color: var(--text-main);
}

.message-sender {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-400);
  margin-bottom: 0.25rem;
}

.message-time {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-align: right;
  margin-top: 0.35rem;
}

.chat-input-bar {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(13, 18, 28, 0.4);
}

.chat-input {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.25rem;
  color: var(--text-main);
  outline: none;
}

.chat-input:focus {
  border-color: var(--gold-400);
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), var(--gold-glow);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-300);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
  color: var(--text-muted);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold-400);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.permission-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.permission-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.84rem;
}

/* Printable Invoice Modal Style */
.printable-invoice-view {
  background: #ffffff;
  color: #1e293b;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.invoice-print-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.invoice-brand-title {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.invoice-stamp {
  padding: 0.4rem 1rem;
  border: 2px solid;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.invoice-stamp.paid {
  border-color: #10b981;
  color: #10b981;
}

.invoice-stamp.unpaid {
  border-color: #ef4444;
  color: #ef4444;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg), var(--gold-glow);
  color: var(--text-main);
  font-size: 0.88rem;
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

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

/* ==========================================================================
   Mobile Bottom Navigation & Responsive
   ========================================================================== */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  z-index: 90;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 0.35rem;
  flex: 1;
}

.mobile-nav-btn.active {
  color: var(--gold-300);
  font-weight: 700;
}

.mobile-nav-btn .icon {
  font-size: 1.25rem;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
    margin-bottom: 64px;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .mobile-bottom-nav {
    display: flex;
  }
  .content-area {
    padding: 1.25rem 1rem;
  }
  .top-header {
    padding: 0 1rem;
  }
}
