/* =========================================================
   STYLE.CSS - SILIH ASAH • LEARNING MANAGEMENT SYSTEM
   Design System: Cyberpunk-Clean Vocational Glassmorphism
   ========================================================= */

/* Font Outfit/Plus Jakarta Sans/JetBrains Mono dimuat lewat <link> di
   index.html (preconnect + stylesheet), bukan @import di sini - supaya
   browser bisa mulai fetch lebih awal tanpa menunggu CSS ini diparse. */

/* CSS Variables / Theme Tokens */
:root {
  --bg-primary: #f7f8f6;
  --bg-surface: rgba(255, 255, 255, 0.82);
  --bg-surface-elevated: rgba(255, 255, 255, 0.95);
  --bg-input: rgba(255, 255, 255, 0.95);

  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(37, 99, 235, 0.14);
  --glass-border-hover: rgba(37, 99, 235, 0.38);
  --glass-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.6);

  --accent-cyan: #2563eb;
  --accent-blue: #1d4ed8;
  --accent-purple: #7c3aed;
  --accent-pink: #db2777;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  --grad-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --grad-purple: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  --grad-gold: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --grad-emerald: linear-gradient(135deg, #059669 0%, #047857 100%);
  --grad-dark: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 249, 252, 0.98) 100%);

  --text-primary: #1a2233;
  --text-secondary: #4b5b73;
  --text-muted: #5b6b80;
  --text-accent: #2563eb;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 6px -1px rgba(30, 41, 59, 0.08);
  --shadow-md: 0 10px 25px -5px rgba(30, 41, 59, 0.10), 0 0 15px rgba(37, 99, 235, 0.05);
  --shadow-lg: 0 20px 40px -10px rgba(30, 41, 59, 0.14), 0 0 30px rgba(37, 99, 235, 0.10);
  --shadow-glow: 0 0 24px rgba(37, 99, 235, 0.28);
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.22);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* App Wrapper */
.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   TOP NAVIGATION
   ========================================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.75rem 1.5rem;
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

button.brand-wrapper {
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  padding: 0;
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  line-height: 1.15;
}

.brand-text h1 span {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

/* Header login tanpa judul: tombol tutup melayang di pojok kanan atas
   (tidak memakan tinggi), supaya logo bisa naik ke dekat tepi atas jendela. */
#login-modal .modal-window {
  position: relative;
}

.modal-header.login-modal-header {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  padding: 0;
  border-bottom: none;
}

#login-modal .modal-body {
  padding-top: 1.25rem;
}

/* Ruang untuk tombol 👁 supaya teks password tidak tertimpa ikon */
#unified-login-password {
  padding-right: 2.6rem;
}

/* HP: jendela login lebih lebar (tepi layar lebih tipis), garis hias
   slogan dipendekkan supaya tidak menempel ke tepi jendela. */
@media (max-width: 480px) {
  #login-modal.modal-overlay {
    padding: 0.75rem;
  }
  #login-modal .modal-body {
    padding: 1.1rem 1.1rem 1.25rem;
  }
  .login-brand-name {
    font-size: 1.7rem;
  }
  .login-brand-slogan {
    gap: 0.45rem;
  }
  .login-brand-slogan::before,
  .login-brand-slogan::after {
    width: 18px;
  }
}

/* Logo + nama di atas form login */
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 0 1.4rem;
}

.login-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.25)) drop-shadow(0 0 6px rgba(245, 158, 11, 0.2));
  margin-bottom: 0.55rem;
}

/* "Silih" biru (panah silih di logo) + "Asah" emas (bilah kujang di logo) */
.login-brand-name {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.login-brand-silih,
.login-brand-asah {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand-silih {
  background-image: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #06b6d4 100%);
}

.login-brand-asah {
  background-image: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #d97706 100%);
}

/* Slogan dengan garis hias emas di kiri-kanan */
.login-brand-slogan {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  font-family: var(--font-heading);
}

.login-brand-slogan::before,
.login-brand-slogan::after {
  content: '';
  width: 32px;
  height: 2px;
  border-radius: 2px;
}

.login-brand-slogan::before {
  background: linear-gradient(90deg, transparent, #f59e0b);
}

.login-brand-slogan::after {
  background: linear-gradient(90deg, #f59e0b, transparent);
}

.login-brand-diajar {
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 600;
  color: var(--text-secondary);
}

.login-brand-motekar {
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.3);
}

/* Slogan "Diajar Motékar" diberi aksen emas senada bilah kujang di logo */
.brand-slogan {
  color: #d97706;
  font-weight: 800;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Active Session Badge */
.user-status-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Navbar Account Avatar (shown after login instead of "Pilih Akun / Masuk") */
.nav-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.45);
  animation: avatarPopIn 0.35s ease;
}

.nav-avatar.role-guru {
  background: var(--grad-purple);
  color: #fff;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45);
}

.nav-avatar.role-admin {
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
  color: #fff;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.45);
}

.nav-avatar-emoji {
  position: absolute;
  bottom: -3px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  line-height: 1;
  background: var(--bg-primary);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

@keyframes avatarPopIn {
  0%   { transform: scale(0.4); opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

.user-status-info strong {
  color: var(--text-primary);
  font-weight: 700;
}

.user-status-info span {
  color: var(--accent-cyan);
  font-size: 0.75rem;
  margin-left: 4px;
}

/* Common Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
  color: #fff;
}

.btn-secondary {
  background: rgba(37, 99, 235, 0.06);
  border-color: var(--glass-border);
  color: var(--text-primary);
  box-shadow: var(--glass-highlight);
}
.btn-secondary:hover {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--grad-purple);
  color: #fff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.55);
}

.btn-emerald {
  background: var(--grad-emerald);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}
.btn-emerald:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.55);
}

.btn-outline-cyan {
  background: transparent;
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}
.btn-outline-cyan:hover {
  background: rgba(37, 99, 235, 0.12);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* =========================================================
   MAIN CONTENT LAYOUT
   ========================================================= */
.main-wrapper {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative;
}

/* View Sections */
.view-section {
  display: none;
  animation: fadeInView 0.35s ease-out forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeInView {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), var(--glass-highlight);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition-normal), transform var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
}

/* Visible keyboard focus ring for card-style controls that act as buttons
   (mapel-card, admin-nav-card, theme-card, brand-wrapper, avatar triggers) */
[role="button"]:focus-visible,
.brand-wrapper:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* =========================================================
   HERO / ROLE SELECTION VIEW
   ========================================================= */
/* Background tema TKJ (Teknik Komputer & Jaringan) sementara, pakai
   CSS/SVG saja - dipakai sampai foto asli gedung sekolah tersedia
   (tinggal ganti jadi background-image: url('assets/sekolah-bg.jpg')
   di .hero-banner kalau fotonya sudah ada). */
.hero-banner {
  position: relative;
  text-align: center;
  padding: 4.5rem 1.5rem 3rem;
  margin: 0 0 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(245, 158, 11, 0.20) 0%, transparent 45%),
    linear-gradient(135deg, #1e3a5f 0%, #0a1a2f 100%);
  isolation: isolate;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cg fill='none' stroke='%2338bdf8' stroke-width='1'%3E%3Ccircle cx='20' cy='24' r='3'/%3E%3Ccircle cx='112' cy='18' r='3'/%3E%3Ccircle cx='70' cy='70' r='3'/%3E%3Ccircle cx='18' cy='118' r='3'/%3E%3Ccircle cx='120' cy='110' r='3'/%3E%3Cpath d='M20 24L112 18M112 18L70 70M70 70L18 118M70 70L120 110M20 24L70 70'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 140px 140px;
}

.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 0%, rgba(6, 12, 24, 0.5) 100%);
}

.hero-banner-tech-icon {
  position: absolute;
  font-size: 5rem;
  opacity: 0.16;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.4));
  pointer-events: none;
  z-index: -1;
}

.hero-banner-tech-icon.icon-1 { top: 1.5rem;  left: 3%;   font-size: 4rem; }
.hero-banner-tech-icon.icon-2 { bottom: 1rem; right: 4%;  font-size: 5.5rem; }
.hero-banner-tech-icon.icon-3 { top: 40%;     right: 12%; font-size: 3rem; display: none; }
.hero-banner-tech-icon.icon-4 { bottom: 18%;  left: 9%;   font-size: 3.2rem; display: none; }

@media (min-width: 900px) {
  .hero-banner-tech-icon.icon-3,
  .hero-banner-tech-icon.icon-4 { display: block; }
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fde68a;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

/* Emas kujang (Motékar) - lebih kontras di atas latar hero biru tua */
.hero-title .gradient-text {
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 45%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-school-line {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.1rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Role Cards Grid */
.role-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  max-width: 1050px;
  margin: 0 auto 3rem;
}

.role-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.role-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--grad-primary);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.role-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: var(--shadow-lg);
}

.role-card:hover::after {
  opacity: 1;
}

.role-card.guru-card::after {
  background: var(--grad-purple);
}

.role-icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.role-card.guru-card .role-icon-box {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.25);
}

.role-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.badge-siswa {
  background: rgba(37, 99, 235, 0.15);
  color: var(--accent-cyan);
}

.badge-guru {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}

.role-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.role-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.role-features-list {
  list-style: none;
  width: 100%;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.role-features-list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.role-features-list li svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.role-card.guru-card .role-features-list li svg {
  color: var(--accent-purple);
}

/* Quick Stats Bar */
.quick-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  max-width: 1150px;
  margin: 0 auto;
}

.stat-box {
  padding: 1.1rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =========================================================
   PORTAL SISWA VIEW
   ========================================================= */
.student-header-card {
  margin-bottom: 1.75rem;
  padding: 1.75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.55) 0%, rgba(255, 255, 255, 0.92) 100%);
  border-left: 4px solid var(--accent-cyan);
}

.student-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.student-avatar {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-lg);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.student-details h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.student-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.tag-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-secondary);
}

.tag-badge.cyan {
  background: rgba(37, 99, 235, 0.15);
  color: var(--accent-cyan);
}

/* Identity strip: Kelas + NIS shown as ID-card style chips right under the student's name */
.student-identity-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.identity-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.identity-chip:hover {
  transform: translateY(-1px);
}

.identity-chip::before {
  font-size: 0.85rem;
  line-height: 1;
}

.identity-chip.chip-kelas,
.identity-chip.chip-mapel {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.35);
  color: #7c3aed;
}

.identity-chip.chip-kelas::before {
  content: '🎓';
}

.identity-chip.chip-mapel::before {
  content: '📖';
}

.identity-chip.chip-nis {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.identity-chip.chip-nis::before {
  content: '🪪';
}

/* Progress Tracker */
.student-progress-wrapper {
  min-width: 260px;
  text-align: right;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.progress-label-row span:first-child {
  color: var(--text-secondary);
}

.progress-label-row span:last-child {
  color: var(--accent-cyan);
  font-weight: 700;
  font-family: var(--font-mono);
}

.progress-track {
  height: 10px;
  width: 100%;
  background: rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.10);
}

.progress-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.35);
}

/* Filter / Teacher Selector Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.custom-select, .custom-input {
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
}

.custom-select:focus, .custom-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.25);
}

/* Notifikasi Pesan Baru (nav avatar + badge panel chat) */
.nav-notify-dot {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-rose);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.8);
  animation: pulseDot 1.6s infinite;
}

.chat-unread-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(244, 63, 94, 0.18);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.35);
}

/* Diskusi / Chat Guru <-> Siswa */
.chat-card {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.chat-header h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
}

.chat-messages-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 340px;
  min-height: 100px;
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-bottom: 1rem;
}

.chat-bubble {
  max-width: 78%;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--glass-border);
  align-self: flex-start;
}

.chat-bubble.own {
  align-self: flex-end;
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
}

.chat-bubble.role-guru:not(.own) {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
}

.chat-bubble-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.chat-bubble-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.chat-bubble.role-guru .chat-bubble-name {
  color: #7c3aed;
}

.chat-bubble-time {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.chat-bubble-text {
  font-size: 0.86rem;
  color: var(--text-primary);
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-input-row {
  display: flex;
  gap: 0.6rem;
}

.chat-input-row .custom-input {
  flex: 1;
}

.chat-empty-state {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
  padding: 1.5rem 0.5rem;
}

/* Mapel Group Grid (Siswa Portal - Stage 1) */
.mapel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.mapel-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.mapel-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
}

/* Cover/thumbnail bertema di atas tiap kartu mapel — gradien + ikon besar +
   pola simbol khas mapelnya, sebagai pengganti foto (dicocokkan dari nama
   mapel/jurusan via App.MAPEL_THEMES, tanpa aset gambar eksternal). */
.mapel-card-cover {
  position: relative;
  height: 108px;
  margin: -1.5rem -1.5rem 1.1rem -1.5rem;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.mapel-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
              linear-gradient(180deg, transparent 40%, rgba(6, 12, 24, 0.55) 100%);
}

.mapel-card-cover-pattern {
  position: absolute;
  top: 0.6rem;
  left: 0.9rem;
  right: 3.5rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.22);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}

.mapel-card-cover-icon {
  position: relative;
  z-index: 1;
  font-size: 2.75rem;
  line-height: 1;
  margin: 0 0.9rem 0.5rem 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.mapel-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.mapel-card-teacher {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

/* Kartu mapel siswa: foto guru pengampu (atau inisial) di samping nama */
.mapel-card-teacher-with-avatar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.mapel-card-teacher-avatar {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

.mapel-card-teacher-avatar.is-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
}

.mapel-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.mapel-card-meta span:last-child {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Label jurusan di kartu mapel: LMS dipakai semua jurusan, jadi tiap kartu
   menunjukkan jurusan asal mapelnya. */
.mapel-card-jurusan {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  margin: -0.4rem 0 0.8rem;
  border-radius: var(--radius-full);
  background: rgba(37, 99, 235, 0.12);
  color: var(--accent-cyan);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Import Excel guru: pemetaan mapel di file -> mapel yang sudah ada */
.excel-mapping-box {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(37, 99, 235, 0.05);
}

.excel-mapping-box h5 {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.excel-mapping-box > p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.excel-mapping-section {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin: 0.75rem 0 0.25rem;
}

.excel-mapping-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.2fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-top: 1px dashed var(--glass-border);
}

.excel-mapping-source strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.excel-mapping-source span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.excel-mapping-arrow {
  color: var(--accent-cyan);
  font-weight: 700;
}

.excel-mapping-row .custom-select {
  width: 100%;
  min-width: 0;
}

@media (max-width: 560px) {
  .excel-mapping-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .excel-mapping-arrow { display: none; }
}

/* Filter portal siswa: cari mapel + jurusan + guru, rata kiri & membungkus di layar sempit */
.siswa-filter-bar {
  justify-content: flex-start;
}

.siswa-filter-bar .filter-group {
  flex: 1 1 220px;
}

.siswa-filter-bar .custom-select,
.siswa-filter-bar .custom-input {
  flex: 1;
  min-width: 0;
}

/* Themed Navigation Cards (dipakai di Panel Admin & Workspace Siswa):
   gradien bertema + ikon besar + pola simbol khas, sebagai pengganti
   tab/tombol biasa. .admin-nav-* dan .theme-card* berbagi tampilan yang
   identik lewat selector gabungan di bawah ini. Warna aktif per-kartu bisa
   di-override lewat custom property --nav-active-color / --nav-active-glow
   (dipakai kartu bertema mata pelajaran supaya warnanya ikut mata pelajaran
   yang sedang dibuka, bukan warna admin yang tetap). */
.admin-nav-grid,
.theme-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.admin-nav-card,
.theme-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
}

.admin-nav-card:hover,
.theme-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
}

.admin-nav-card.active,
.theme-card.active {
  border-color: var(--nav-active-color, var(--accent-rose));
  box-shadow: 0 0 0 4px var(--nav-active-glow, rgba(244, 63, 94, 0.15)), var(--shadow-md), var(--glass-highlight);
}

.admin-nav-card-cover,
.theme-card-cover {
  position: relative;
  height: 96px;
  margin: -1.5rem -1.5rem 1.1rem -1.5rem;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.admin-nav-card-cover::after,
.theme-card-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 22%, rgba(255, 255, 255, 0.14) 0%, transparent 45%),
              linear-gradient(180deg, transparent 35%, rgba(6, 12, 24, 0.55) 100%);
}

.admin-nav-card-pattern,
.theme-card-pattern {
  position: absolute;
  top: 0.6rem;
  left: 0.9rem;
  right: 3.3rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.24);
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}

.admin-nav-card-icon,
.theme-card-icon {
  position: relative;
  z-index: 1;
  font-size: 2.5rem;
  line-height: 1;
  margin: 0 0.9rem 0.5rem 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.admin-nav-card-check,
.theme-card-check {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--nav-active-color, var(--accent-rose));
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.55);
}

.admin-nav-card.active .admin-nav-card-check,
.theme-card.active .theme-card-check {
  display: flex;
}

.admin-nav-card h4,
.theme-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.admin-nav-card p,
.theme-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Workspace Hero Banner (Siswa) - cover bertema mata pelajaran yang
   sedang dibuka, ditampilkan di atas player video / kuis / roadmap
   supaya temanya konsisten dengan kartu di Stage 1. */
.workspace-hero {
  position: relative;
  height: 130px;
  margin: -1.5rem -1.5rem 1.25rem -1.5rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1.1rem 1.4rem;
  gap: 1rem;
}

.workspace-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.14) 0%, transparent 45%),
              linear-gradient(180deg, transparent 30%, rgba(6, 12, 24, 0.65) 100%);
}

.workspace-hero-pattern {
  position: absolute;
  top: 0.75rem;
  left: 1.1rem;
  right: 5rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.22);
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
}

.workspace-hero-icon {
  position: relative;
  z-index: 1;
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.workspace-hero-text {
  position: relative;
  z-index: 1;
  color: #fff;
}

.workspace-hero-text .tag-badge {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  margin-bottom: 0.35rem;
}

.workspace-hero-text h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.workspace-hero-text p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
}

/* Badge ikon bulat bertema mata pelajaran, dipakai di header sidebar
   roadmap & kartu diskusi supaya identitas warnanya konsisten. */
.theme-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.05rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

/* Siswa Learning Workspace Grid (Player + Roadmap) */
.learning-workspace {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .learning-workspace {
    grid-template-columns: 1fr;
  }
}

/* Video Player Box */
.video-player-box {
  padding: 0;
  overflow: hidden;
}

.video-container-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #000;
  border-bottom: 1px solid var(--glass-border);
}

.video-container-ratio iframe,
.video-container-ratio video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-content-body {
  padding: 1.5rem;
}

.video-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.video-module-index {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.video-module-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}

.video-teacher-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.video-description {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.04);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

/* Interactive Tabs inside Player Card (Ringkasan, Catatan Siswa, Kuis) */
.player-tabs-header {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(37, 99, 235, 0.06);
}

.tab-btn.active {
  color: var(--accent-cyan);
  background: rgba(37, 99, 235, 0.1);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.15);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Notes Textarea */
.notes-textarea {
  width: 100%;
  height: 120px;
  background: var(--bg-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
  margin-bottom: 0.75rem;
}

.notes-textarea:focus {
  border-color: var(--accent-cyan);
}

/* Action Completion Footer */
.player-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--glass-border);
}

/* Sequential Learning Roadmap Sidebar */
.roadmap-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.roadmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.roadmap-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.module-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.step-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.step-card:hover {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.3);
  transform: translateX(3px);
}

.step-card.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.2);
}

.step-card.completed {
  border-color: rgba(16, 185, 129, 0.35);
}

.step-index-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
}

.step-card.active .step-index-badge {
  background: var(--accent-cyan);
  color: #fff;
}

.step-card.completed .step-index-badge {
  background: var(--accent-emerald);
  color: #fff;
}

.step-info {
  flex: 1;
  min-width: 0;
}

.step-title {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.step-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.step-status-icon {
  flex-shrink: 0;
}

/* =========================================================
   PORTAL GURU VIEW
   ========================================================= */
.teacher-header-card {
  margin-bottom: 1.75rem;
  padding: 1.75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.55) 0%, rgba(255, 255, 255, 0.92) 100%);
  border-left: 4px solid var(--accent-purple);
}

.teacher-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.teacher-avatar {
  width: 62px;
  height: 62px;
  border-radius: var(--radius-lg);
  background: var(--grad-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.teacher-details h2 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

/* Guru Module Management List */
.modules-management-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.module-row-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.15rem 1.5rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.module-row-card:hover {
  background: rgba(124, 58, 237, 0.06);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.module-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.module-row-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

/* Preview video kecil langsung di daftar modul guru, supaya bisa direview sebelum dipublikasikan */
.module-preview-box {
  width: 100%;
  max-width: 340px;
  position: relative;
  padding-top: 191.25px; /* 340 * 9/16, rasio 16:9 tapi dibatasi kecil */
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.module-preview-box iframe,
.module-preview-box video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.module-order-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.18);
  color: #7c3aed;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.module-row-info h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.module-row-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.module-row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* =========================================================
   MODAL WINDOWS & DIALOGS
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 15, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
  animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.modal-window {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 30px rgba(37, 99, 235, 0.10);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  transition: color var(--transition-fast);
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1.25rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(247, 249, 252, 0.9);
}

/* Form Styles */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-group .form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.input-full {
  width: 100%;
}

/* Drag & Drop Upload Zone */
.dropzone-box {
  border: 2px dashed rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.03);
  border-radius: var(--radius-md);
  padding: 2.25rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 1.25rem;
}

.dropzone-box:hover, .dropzone-box.dragover {
  border-color: var(--accent-cyan);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
}

.pdf-dropzone {
  border: 2px dashed rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.04);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.pdf-dropzone:hover, .pdf-dropzone.dragover {
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.15);
}

.dropzone-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.dropzone-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.dropzone-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Excel Data Preview Table */
.preview-table-wrapper {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.preview-table th {
  background: rgba(37, 99, 235, 0.06);
  padding: 0.6rem 0.8rem;
  color: var(--accent-cyan);
  font-weight: 700;
  position: sticky;
  top: 0;
  backdrop-filter: blur(4px);
}

.preview-table td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
}

.preview-table tr:hover td {
  background: rgba(37, 99, 235, 0.05);
  color: var(--text-primary);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast-message {
  pointer-events: auto;
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-left: 4px solid var(--accent-cyan);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-message.success {
  border-left-color: var(--accent-emerald);
}

.toast-message.error {
  border-left-color: var(--accent-rose);
}

@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
  /* Layar kecil: slogan tetap tampil, keterangan "Learning Management System" disembunyikan */
  .brand-text p {
    letter-spacing: 1px;
  }
  .brand-tagline-extra {
    display: none;
  }
  .navbar {
    padding: 0.6rem 1rem;
  }
  .student-header-card, .teacher-header-card {
    padding: 1.25rem;
  }
  .student-progress-wrapper {
    width: 100%;
    text-align: left;
  }
}

/* =========================================================
   LOGO SILIH ASAH - Learning Management System (SVG Round)
   ========================================================= */
.brand-logo-img {
  height: 54px;
  width: 54px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.55));
  transition: filter var(--transition-fast), animation-duration var(--transition-normal);
  transform-style: preserve-3d;
  animation: logoFloat3D 6s ease-in-out infinite;
  will-change: transform;
}

/* Logo "melayang" berputar pelan di sumbu Y/X secara terus-menerus, memberi
   kesan 3D (bukan cuma flat image) tanpa perlu library 3D/model eksternal. */
@keyframes logoFloat3D {
  0%, 100% { transform: perspective(500px) rotateY(0deg)   rotateX(0deg)  translateY(0); }
  25%      { transform: perspective(500px) rotateY(18deg)  rotateX(6deg)  translateY(-3px); }
  50%      { transform: perspective(500px) rotateY(0deg)   rotateX(-6deg) translateY(0); }
  75%      { transform: perspective(500px) rotateY(-18deg) rotateX(6deg)  translateY(-3px); }
}

.brand-wrapper:hover .brand-logo-img {
  filter: drop-shadow(0 0 18px rgba(251, 191, 36, 0.85));
  animation-duration: 1.6s;
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo-img {
    animation: none;
  }
}

/* =========================================================
   ADMIN PANEL STYLES
   ========================================================= */
.admin-panel-section,
.admin-akun-subsection {
  animation: fadeInView 0.3s ease-out;
}

/* Admin main tab navigation */
.admin-main-tab.active {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.12);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.15);
}

/* Admin table action buttons */
.admin-user-table td {
  vertical-align: middle;
}

/* Accent rose color utility */
.text-rose {
  color: var(--accent-rose);
}

/* Admin page responsive */
@media (max-width: 768px) {
  .preview-table th,
  .preview-table td {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }
}

/* =========================================================
   PORTAL GURU - KELAS SAYA (dikelompokkan per mata pelajaran)
   ========================================================= */
.guru-kelas-panel {
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.guru-kelas-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.guru-kelas-panel-head h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
}

.guru-kelas-panel-head p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.mapel-group + .mapel-group {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px dashed var(--glass-border);
}

.mapel-group-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.mapel-group-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.mapel-group-head h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.mapel-group-head span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kelas-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.65rem;
}

.kelas-chip {
  text-align: left;
  font-family: var(--font-sans);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.kelas-chip:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
}

.kelas-chip.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.kelas-chip-name {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
}

.kelas-chip-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.kelas-chip-legacy {
  color: var(--accent-amber);
}

/* Form kelas & tujuan materi */
.course-form-grid,
.module-target-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.module-target-box {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem 1rem 0.25rem;
  margin-bottom: 1.25rem;
}

.student-picker {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.03);
  padding: 0.75rem;
}

.student-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 0.5rem;
  align-items: center;
}

.student-picker .student-picker-only-selected {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
}

.student-picker-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0.6rem 0;
}

.student-picker-info {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.student-picker-list {
  max-height: 300px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-border);
}

/* Berada di dalam .form-group, jadi selektornya dibuat lebih spesifik dari ".form-group label". */
.student-picker .student-picker-row {
  margin-bottom: 0;
  font-weight: 500;
  color: var(--text-primary);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.student-picker-row:last-child {
  border-bottom: none;
}

.student-picker-row:hover {
  background: rgba(37, 99, 235, 0.05);
}

.student-picker-row.is-selected {
  background: rgba(37, 99, 235, 0.09);
}

.student-picker-row input {
  accent-color: var(--accent-cyan);
}

.student-picker-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-picker-name small {
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: 0.35rem;
}

.student-picker-kelas {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.student-picker-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Pilihan kelas tujuan soal kuis (di dalam .form-group, jadi selektor dibuat lebih spesifik) */
.quiz-kelas-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.quiz-kelas-checks .quiz-kelas-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: var(--bg-surface-elevated);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.quiz-kelas-checks .quiz-kelas-check.is-checked {
  border-color: var(--accent-cyan);
  background: rgba(37, 99, 235, 0.1);
}

.quiz-kelas-checks .quiz-kelas-check.is-locked {
  cursor: default;
}

.quiz-kelas-check input {
  accent-color: var(--accent-cyan);
}

.quiz-kelas-check small {
  color: var(--text-muted);
  font-weight: 500;
}

.quiz-kelas-all {
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.25rem;
}

/* =========================================================
   PORTAL GURU - NILAI KUIS SISWA PER KELAS
   ========================================================= */
.score-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.score-stat {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
}

.score-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.score-stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.score-stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.score-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.score-filter-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.score-filter-tab {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  cursor: pointer;
}

.score-filter-tab.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.score-table td.num,
.score-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.score-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.score-badge.tuntas  { background: rgba(5, 150, 105, 0.14); color: #047857; }
.score-badge.remedial { background: rgba(225, 29, 72, 0.12); color: #be123c; }
.score-badge.belum   { background: rgba(15, 23, 42, 0.06); color: var(--text-muted); }

.score-note {
  display: block;
  font-size: 0.7rem;
  color: var(--accent-amber);
}

.score-row-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.score-analysis {
  margin-top: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.02);
}

.score-analysis summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.score-bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
  min-width: 80px;
}

.score-bar span {
  display: block;
  height: 100%;
  border-radius: var(--radius-full);
}

.attempt-answer {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
}

.attempt-answer.is-correct { border-left: 4px solid #059669; }
.attempt-answer.is-wrong   { border-left: 4px solid var(--accent-rose); }

.attempt-answer p {
  margin-top: 0.3rem;
  color: var(--text-secondary);
}

/* =========================================================
   CATATAN SISWA -> ULASAN UNTUK GURU
   ========================================================= */
.note-share-status {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.note-share-status.is-sent    { color: #047857; }
.note-share-status.is-changed { color: var(--accent-amber); }

.note-feedback-box {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-size: 0.85rem;
}

.note-feedback-box strong {
  color: #7c3aed;
}

.note-feedback-box p {
  margin-top: 0.3rem;
  white-space: pre-wrap;
  color: var(--text-primary);
}

.note-review-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.note-review-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  padding: 0.9rem 1rem;
}

.note-review-card.is-pending {
  border-left: 4px solid var(--accent-amber);
}

.note-review-card.is-reviewed {
  border-left: 4px solid #059669;
}

.note-review-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: baseline;
}

.note-review-head strong {
  font-size: 0.92rem;
}

.note-review-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.note-review-text {
  margin: 0.55rem 0;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.04);
  font-size: 0.87rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-review-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.note-review-form textarea {
  flex: 1;
  min-height: 2.6rem;
  resize: vertical;
  font-size: 0.85rem;
}

/* =========================================================
   KOTAK PESAN SISWA (inbox per mapel & kelas)
   ========================================================= */
.inbox-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 1rem;
}

.inbox-list {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.02);
  max-height: 460px;
  overflow-y: auto;
  padding: 0.5rem;
}

.inbox-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.6rem 0.5rem 0.3rem;
}

.inbox-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.6rem;
  cursor: pointer;
  color: var(--text-primary);
}

.inbox-item:hover {
  background: rgba(37, 99, 235, 0.05);
}

.inbox-item.active {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
}

.inbox-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.inbox-item-name {
  font-weight: 700;
  font-size: 0.86rem;
}

.inbox-item-count {
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 1.4rem;
  text-align: center;
  padding: 0.05rem 0.4rem;
  border-radius: var(--radius-full);
  background: var(--accent-rose);
  color: #fff;
}

.inbox-item-preview {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}

.inbox-thread {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.inbox-thread-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.inbox-thread-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chat-bubble-delete {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0 0.2rem;
}

.chat-bubble-delete:hover {
  color: var(--accent-rose);
}

/* Balas pesan tertentu (reply) */
.chat-bubble-actions {
  margin-left: auto;
  display: inline-flex;
  gap: 0.15rem;
}

.chat-bubble-actions .chat-bubble-delete {
  margin-left: 0;
}

.chat-bubble-reply {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 0 0.2rem;
}

.chat-bubble-reply:hover {
  color: var(--accent-cyan);
}

.chat-quote {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  margin-bottom: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: none;
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.chat-bubble.role-guru .chat-quote {
  border-left-color: #7c3aed;
}

.chat-quote-name {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.chat-quote-text {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-bubble.is-highlighted {
  box-shadow: 0 0 0 2px var(--accent-cyan);
  transition: box-shadow 0.2s ease;
}

.chat-reply-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.7rem;
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.07);
  font-size: 0.8rem;
}

.chat-reply-bar[hidden] {
  display: none;
}

.chat-reply-bar-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}

.chat-reply-bar-text strong {
  color: var(--text-primary);
}

.chat-reply-cancel {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0 0.2rem;
}

.chat-reply-cancel:hover {
  color: var(--accent-rose);
}

@media (max-width: 760px) {
  .inbox-layout {
    grid-template-columns: 1fr;
  }

  .inbox-list {
    max-height: 220px;
  }
}

@media (max-width: 640px) {
  .course-form-grid,
  .module-target-box,
  .student-picker-toolbar {
    grid-template-columns: 1fr;
  }
}
