/* ═══════════════════════════════════════════════════════════════
   Eyeziyo Admin — Bento + colorful + playful
   Top horizontal nav · Big logo · Cards-only layout · Plus Jakarta Sans
   ═══════════════════════════════════════════════════════════════ */

:root {
  --primary: #0891B2;
  --primary-dark: #0E7490;
  --primary-50: #ECFEFF;
  --primary-100: #CFFAFE;
  --accent: #06B6D4;
  --sky: #38BDF8;

  --violet: #7C3AED;
  --violet-50: #F5F3FF;
  --violet-100: #EDE9FE;
  --violet-600: #7C3AED;

  --sunny: #F59E0B;
  --sunny-50: #FFFBEB;
  --sunny-100: #FEF3C7;
  --sunny-700: #B45309;

  --mint: #10B981;
  --mint-50: #ECFDF5;
  --mint-100: #D1FAE5;
  --mint-700: #047857;

  --coral: #F43F5E;
  --coral-50: #FFF1F2;
  --coral-100: #FFE4E6;
  --coral-700: #BE123C;

  --peach: #FB923C;
  --peach-50: #FFF7ED;
  --peach-100: #FFEDD5;
  --peach-700: #C2410C;

  --pink: #EC4899;
  --pink-50: #FDF2F8;
  --pink-100: #FCE7F3;

  --success: #10B981;
  --success-50: #D1FAE5;
  --success-700: #047857;
  --warning: #F59E0B;
  --warning-50: #FEF3C7;
  --warning-700: #B45309;
  --danger: #EF4444;
  --danger-50: #FEE2E2;
  --danger-700: #B91C1C;

  --canvas: #FBF7F0;
  --surface: #FFFFFF;

  --ink-900: #0F172A;
  --ink-800: #1E293B;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;
  --ink-400: #94A3B8;
  --ink-300: #CBD5E1;
  --ink-200: #E2E8F0;
  --ink-100: #F1F5F9;
  --ink-50: #F8FAFC;

  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-pop: 0 20px 60px rgba(8, 145, 178, 0.18);
}

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

html, body {
  font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink-900);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  font-size: 14.5px;
  line-height: 1.55;
}

#app { min-height: 100vh; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
a { color: var(--primary); text-decoration: none; }

/* ════════════════════════════════════════════════════════════
   LOGIN — split screen
   ════════════════════════════════════════════════════════════ */
.login-page {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}

.login-left {
  background: linear-gradient(155deg, #ECFEFF 0%, #F5F3FF 50%, #FFFBEB 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.15;
  filter: blur(80px);
  top: -100px;
  right: -100px;
}
.login-left::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: var(--violet);
  opacity: 0.12;
  filter: blur(80px);
  bottom: -80px;
  left: -80px;
}

.login-left-inner {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.big-logo {
  width: 260px;
  height: 160px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.big-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-headline {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.2px;
  color: var(--ink-900);
  margin-bottom: 16px;
}
.login-tagline {
  font-size: 16px;
  color: var(--ink-600);
  font-weight: 500;
  margin-bottom: 28px;
}
.login-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-700);
  font-weight: 600;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-mint { background: var(--mint); }
.dot-violet { background: var(--violet); }
.dot-sunny { background: var(--sunny); }

.login-right {
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.login-form-card {
  width: 100%;
  max-width: 400px;
}
.login-form-card h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink-900);
}
.muted { color: var(--ink-500); font-size: 13px; font-weight: 500; }
.login-form-card .muted { margin-bottom: 24px; }

.field { display: block; margin-bottom: 16px; }
.field .label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ink-500);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 14px 16px;
  background: var(--ink-50);
  border: 1.5px solid var(--ink-200);
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-900);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.field input:focus { border-color: var(--primary); background: white; }

.password-row { position: relative; }
.password-row input { padding-right: 50px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  color: var(--ink-400);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pw-toggle:hover { background: var(--ink-100); color: var(--ink-700); }
.pw-toggle svg { width: 20px; height: 20px; }

.btn-primary {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  margin-top: 6px;
  box-shadow: 0 8px 24px rgba(8, 145, 178, 0.3);
  transition: transform 0.1s, box-shadow 0.15s;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(8, 145, 178, 0.4);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.error {
  display: none;
  background: var(--danger-50);
  color: var(--danger-700);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
  border: 1px solid #FECACA;
}
.error.show { display: block; }

.legal {
  margin-top: 28px;
  font-size: 11px;
  color: var(--ink-400);
  text-align: center;
}

/* ════════════════════════════════════════════════════════════
   APP SHELL — top horizontal nav
   ════════════════════════════════════════════════════════════ */
.shell { min-height: 100vh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--ink-100);
}
.topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 56px;
  height: 36px;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-text .b1 {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.3px;
}
.brand-text .b2 {
  font-size: 10px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.top-nav {
  display: flex;
  gap: 4px;
  background: var(--ink-50);
  padding: 4px;
  border-radius: 12px;
}
.topnav-item {
  padding: 9px 18px;
  border: none;
  background: transparent;
  color: var(--ink-600);
  font-size: 13px;
  font-weight: 700;
  border-radius: 9px;
  transition: background 0.15s, color 0.15s;
}
.topnav-item:hover { color: var(--ink-900); }
.topnav-item.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  background: var(--ink-50);
  border-radius: 999px;
}
.uc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}
.uc-info { line-height: 1.15; }
.uc-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-900);
}
.uc-email {
  font-size: 11px;
  color: var(--ink-500);
  font-weight: 500;
}
.logout-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink-200);
  background: white;
  border-radius: 12px;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.logout-btn svg { width: 16px; height: 16px; }
.logout-btn:hover {
  background: var(--danger-50);
  color: var(--danger-700);
  border-color: #FECACA;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 32px 80px;
}

/* ════════════════════════════════════════════════════════════
   DASHBOARD — colorful bento grid
   ════════════════════════════════════════════════════════════ */
.hero-banner {
  position: relative;
  background: linear-gradient(135deg, #0891B2 0%, #06B6D4 50%, #38BDF8 100%);
  border-radius: 28px;
  padding: 36px 40px;
  margin-bottom: 24px;
  color: white;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  top: -120px;
  right: -80px;
}
.hero-banner::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  bottom: -100px;
  right: 200px;
}
.hero-banner > * { position: relative; }
.hero-banner h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.hero-banner p {
  font-size: 14px;
  opacity: 0.92;
  font-weight: 500;
}
.hero-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.hero-pill svg { width: 14px; height: 14px; }

/* Bento grid — mixed sizes */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: 18px;
  margin-bottom: 32px;
}

.bento-tile {
  background: white;
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s, box-shadow 0.15s;
}
.bento-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.bento-tile.colored { color: white; }
.bento-tile.bg-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.bento-tile.bg-violet { background: linear-gradient(135deg, var(--violet), #8B5CF6); }
.bento-tile.bg-mint { background: linear-gradient(135deg, var(--mint), #34D399); }
.bento-tile.bg-sunny { background: linear-gradient(135deg, var(--sunny), #FBBF24); }
.bento-tile.bg-coral { background: linear-gradient(135deg, var(--coral), #FB7185); }
.bento-tile.bg-peach { background: linear-gradient(135deg, var(--peach), #FDBA74); }

.bento-tile.span-2 { grid-column: span 2; }
.bento-tile.span-3 { grid-column: span 3; }
.bento-tile.row-2 { grid-row: span 2; }

.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.bento-tile:not(.colored) .bento-icon {
  background: var(--primary-50);
  color: var(--primary);
}
.bento-icon svg { width: 24px; height: 24px; }

.bento-value {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1;
}
.bento-tile.colored .bento-value { color: white; }
.bento-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 8px;
  opacity: 0.92;
}
.bento-tile:not(.colored) .bento-label { color: var(--ink-500); }
.bento-sub {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}

/* Section heading + colorful card grid */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 32px 0 18px;
}
.section-title h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink-900);
}
.section-title .sub {
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 500;
}
.section-title .right-actions {
  display: flex;
  gap: 8px;
}

.btn-secondary {
  padding: 10px 18px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s, border-color 0.1s, color 0.1s;
}
.btn-secondary svg { width: 16px; height: 16px; }
.btn-secondary:hover {
  background: var(--ink-50);
  border-color: var(--ink-300);
  color: var(--ink-900);
}

/* Teacher card grid */
.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.teacher-card {
  background: white;
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  border: none;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.teacher-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.teacher-card .top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.tc-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tc-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}
.tc-avatar.violet { background: linear-gradient(135deg, var(--violet), #8B5CF6); }
.tc-avatar.mint { background: linear-gradient(135deg, var(--mint), #34D399); }
.tc-avatar.sunny { background: linear-gradient(135deg, var(--sunny), #FBBF24); }
.tc-avatar.coral { background: linear-gradient(135deg, var(--coral), #FB7185); }
.tc-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-900);
  line-height: 1.15;
}
.tc-course {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 600;
  margin-top: 2px;
}

.tc-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--ink-100);
  color: var(--ink-500);
}
.tc-rank.is-top {
  background: linear-gradient(135deg, var(--sunny), #FBBF24);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.tc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  padding: 5px 12px;
  background: var(--primary-50);
  color: var(--primary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.tag.muted { background: var(--ink-100); color: var(--ink-500); }

.tc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--ink-100);
}
.tc-stat {
  display: flex;
  flex-direction: column;
}
.tc-stat .v {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-900);
}
.tc-stat .l {
  font-size: 10px;
  color: var(--ink-500);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}
.tc-stat.score .v.success { color: var(--success); }
.tc-stat.score .v.warning { color: var(--warning); }
.tc-stat.score .v.danger { color: var(--danger); }

/* Empty + loading */
.empty {
  background: white;
  border-radius: 22px;
  padding: 60px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.empty .e-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-50), var(--violet-50));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty .e-icon svg { width: 36px; height: 36px; }
.empty .e-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-800);
}
.empty .e-sub {
  font-size: 13px;
  color: var(--ink-500);
  margin-top: 4px;
}

.loading {
  text-align: center;
  padding: 100px 20px;
  color: var(--ink-500);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   TEACHER DETAIL — bento layout
   ════════════════════════════════════════════════════════════ */
.detail-hero {
  background: linear-gradient(135deg, var(--violet), #8B5CF6 50%, var(--primary));
  color: white;
  border-radius: 28px;
  padding: 36px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.detail-hero::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  top: -120px;
  right: -100px;
}
.detail-hero > * { position: relative; }

.detail-hero-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.detail-avatar {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 36px;
  font-weight: 800;
  flex-shrink: 0;
}
.detail-info { flex: 1; min-width: 0; }
.detail-info .name {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.1;
}
.detail-info .course {
  font-size: 15px;
  font-weight: 600;
  opacity: 0.92;
  margin-top: 4px;
}
.detail-info .email {
  font-size: 13px;
  opacity: 0.78;
  margin-top: 2px;
}
.detail-pills {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-500);
  font-size: 13px;
  font-weight: 700;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 18px;
}
.back-link svg { width: 16px; height: 16px; }
.back-link:hover { color: var(--ink-900); }

/* Detail bento */
.detail-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}
.detail-bento .bento-tile { padding: 22px; min-height: auto; }

/* Groups manager */
.groups-card {
  background: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}
.groups-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink-900);
  margin-bottom: 4px;
}
.groups-card .sub {
  font-size: 12px;
  color: var(--ink-500);
  margin-bottom: 18px;
}

.groups-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  min-height: 40px;
}
.group-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  background: linear-gradient(135deg, var(--primary-50), var(--violet-50));
  color: var(--primary);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  border: 1.5px solid var(--primary-100);
}
.group-chip svg.g-icon { width: 16px; height: 16px; }
.group-chip .remove-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: white;
  border: none;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.group-chip .remove-btn:hover { background: var(--danger-50); color: var(--danger); }
.group-chip .remove-btn svg { width: 14px; height: 14px; }

.groups-empty {
  color: var(--ink-400);
  font-size: 13px;
  font-style: italic;
  padding: 8px 0;
}

.add-group-row {
  display: flex;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--ink-100);
}
.add-group-row input {
  flex: 1;
  padding: 13px 16px;
  background: var(--ink-50);
  border: 1.5px solid var(--ink-200);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  outline: none;
}
.add-group-row input:focus { border-color: var(--primary); background: white; }
.add-group-row button {
  padding: 13px 22px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(8, 145, 178, 0.25);
}
.add-group-row button svg { width: 16px; height: 16px; }
.add-group-row button:hover:not(:disabled) { transform: translateY(-1px); }
.add-group-row button:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

/* Per-group stat cards */
.gstat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.gstat-card {
  background: white;
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.gstat-card .accent-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.gstat-card.success .accent-strip { background: var(--success); }
.gstat-card.warning .accent-strip { background: var(--warning); }
.gstat-card.danger .accent-strip { background: var(--danger); }
.gstat-card .gtop {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.gstat-card .gbadge {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-50), var(--violet-50));
  color: var(--primary);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gstat-card .gbadge svg { width: 22px; height: 22px; }
.gstat-card .ginfo { flex: 1; min-width: 0; }
.gstat-card .gname {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-900);
}
.gstat-card .gcourse {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
}
.gstat-card .gscore {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.gstat-card.success .gscore { color: var(--success); }
.gstat-card.warning .gscore { color: var(--warning); }
.gstat-card.danger .gscore { color: var(--danger); }

.gstat-card .progress {
  height: 8px;
  background: var(--ink-100);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}
.gstat-card .progress-fill {
  height: 100%;
  border-radius: 999px;
}

.gmeta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 700;
}
.gmeta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.gmeta svg { width: 13px; height: 13px; }

/* Lessons list */
.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lesson-row {
  background: white;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.lesson-row:hover { border-color: var(--primary-100); }
.lesson-row .l-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lesson-row .l-icon svg { width: 20px; height: 20px; }
.lesson-row .l-main { flex: 1; min-width: 0; }
.lesson-row .l-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lesson-row .l-sub {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
  margin-top: 1px;
}
.lesson-row .l-meta {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lesson-row .l-meta svg { width: 13px; height: 13px; }
.score-chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.score-chip.success { background: var(--success-50); color: var(--success-700); }
.score-chip.warning { background: var(--warning-50); color: var(--warning-700); }
.score-chip.danger { background: var(--danger-50); color: var(--danger-700); }
.score-chip.muted { background: var(--ink-100); color: var(--ink-500); }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — desktop → tablet → mobile
   ════════════════════════════════════════════════════════════ */

/* Tablet ~ 1100px */
@media (max-width: 1100px) {
  .login-page { grid-template-columns: 1fr; }
  .login-left { padding: 48px 36px; min-height: auto; }
  .login-headline { font-size: 32px; }
  .big-logo { width: 200px; height: 120px; margin-bottom: 24px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-tile.span-3 { grid-column: span 2; }
  .bento-tile.span-2.row-2 { grid-column: span 2; grid-row: span 1; }
  .detail-bento { grid-template-columns: repeat(3, 1fr); }
  .gstat-grid { grid-template-columns: 1fr; }
  .page { padding: 24px 24px 80px; }
}

/* Small tablet / large phone ~ 768px */
@media (max-width: 768px) {
  .topbar-inner {
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .brand-area { flex: 0 0 auto; }
  .brand-text { display: none; }
  .brand-logo { width: 44px; height: 30px; }
  .top-nav {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .top-nav::-webkit-scrollbar { display: none; }
  .topnav-item {
    flex-shrink: 0;
    padding: 9px 16px;
    font-size: 13px;
  }
  .topbar-right { margin-left: auto; gap: 8px; }
  .uc-info { display: none; }
  .user-chip { padding: 4px; background: transparent; }
  .uc-avatar { width: 38px; height: 38px; }
  .logout-btn { width: 38px; height: 38px; }

  .page { padding: 20px 16px 60px; }
  .hero-banner {
    padding: 28px 22px;
    border-radius: 22px;
    margin-bottom: 18px;
  }
  .hero-banner h1 { font-size: 26px; }
  .hero-banner p { font-size: 13px; }
  .hero-actions { gap: 6px; margin-top: 16px; }
  .hero-pill { padding: 8px 12px; font-size: 11px; }

  .bento { grid-template-columns: 1fr 1fr; gap: 12px; }
  .bento-tile { padding: 18px; border-radius: 18px; min-height: 130px; }
  .bento-value { font-size: 30px; letter-spacing: -1px; }
  .bento-icon { width: 40px; height: 40px; margin-bottom: 12px; }
  .bento-icon svg { width: 20px; height: 20px; }
  .bento-tile.span-2 { grid-column: span 2; }
  .bento-tile.span-3 { grid-column: span 2; }

  .section-title {
    margin: 24px 0 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .section-title h2 { font-size: 20px; }
  .section-title .right-actions { width: 100%; justify-content: flex-end; }

  .teachers-grid { grid-template-columns: 1fr; gap: 12px; }
  .teacher-card { padding: 18px; }

  .detail-hero { padding: 24px 22px; border-radius: 22px; }
  .detail-hero-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .detail-info .name { font-size: 22px; }
  .detail-info .course { font-size: 13px; }
  .detail-avatar { width: 76px; height: 76px; font-size: 28px; border-radius: 22px; }
  .detail-pills { gap: 6px; margin-top: 14px; }

  .detail-bento { grid-template-columns: 1fr 1fr; gap: 12px; }

  .groups-card { padding: 22px 18px; border-radius: 22px; }
  .groups-card h3 { font-size: 16px; }
  .add-group-row { flex-direction: column; gap: 10px; }
  .add-group-row button { width: 100%; justify-content: center; padding: 14px; }

  .gstat-card { padding: 18px; border-radius: 18px; }
  .gstat-card .gscore { font-size: 22px; }

  .lesson-row { padding: 14px 16px; gap: 12px; border-radius: 14px; }
  .lesson-row .l-icon { width: 36px; height: 36px; }
  .lesson-row .l-meta { display: none; }
}

/* Phone ~ 480px */
@media (max-width: 480px) {
  .login-form-card h2 { font-size: 24px; }
  .login-headline { font-size: 26px; }
  .login-tagline { font-size: 14px; }
  .big-logo { width: 160px; height: 100px; margin-bottom: 18px; }
  .login-features li { font-size: 13px; }
  .login-left { padding: 36px 24px; }
  .login-right { padding: 32px 24px; }

  .topbar-inner { padding: 10px 14px; }
  .brand-logo { width: 40px; height: 28px; }
  .topnav-item { padding: 8px 14px; font-size: 12px; }
  .uc-avatar { width: 36px; height: 36px; font-size: 13px; }
  .logout-btn { width: 36px; height: 36px; }

  .page { padding: 16px 14px 60px; }
  .hero-banner {
    padding: 24px 20px;
    border-radius: 20px;
  }
  .hero-banner h1 { font-size: 22px; }
  .hero-banner p { font-size: 12px; }

  .bento {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .bento-tile {
    padding: 18px;
    min-height: auto;
  }
  .bento-tile.span-2,
  .bento-tile.span-3,
  .bento-tile.row-2 {
    grid-column: span 1;
    grid-row: span 1;
  }
  .bento-value { font-size: 32px; }

  .section-title h2 { font-size: 18px; }
  .section-title .sub { font-size: 12px; }

  .teacher-card { padding: 16px; gap: 12px; border-radius: 18px; }
  .tc-avatar { width: 46px; height: 46px; font-size: 16px; border-radius: 14px; }
  .tc-name { font-size: 15px; }
  .tc-course { font-size: 11px; }
  .tc-stat .v { font-size: 17px; }

  .detail-hero { padding: 22px 20px; border-radius: 20px; }
  .detail-info .name { font-size: 20px; }
  .detail-avatar { width: 68px; height: 68px; font-size: 24px; }

  .detail-bento { grid-template-columns: 1fr; }

  .groups-card { padding: 20px 16px; }
  .group-chip {
    padding: 8px 8px 8px 14px;
    font-size: 13px;
  }
  .group-chip svg.g-icon { width: 14px; height: 14px; }
  .group-chip .remove-btn { width: 24px; height: 24px; }
  .group-chip .remove-btn svg { width: 13px; height: 13px; }

  .gstat-card { padding: 18px 16px; }
  .gstat-card .gname { font-size: 14px; }
  .gstat-card .gscore { font-size: 20px; }
  .gstat-card .gbadge { width: 42px; height: 42px; }

  .lesson-row { padding: 12px 14px; }
  .lesson-row .l-title { font-size: 13px; }
  .lesson-row .l-sub { font-size: 11px; }
  .score-chip { padding: 5px 10px; font-size: 12px; }

  .empty { padding: 50px 18px; }
  .empty .e-icon { width: 64px; height: 64px; }
  .empty .e-icon svg { width: 30px; height: 30px; }
  .empty .e-title { font-size: 16px; }

  .back-link { font-size: 12px; }
}

/* Tiny phones < 360px */
@media (max-width: 360px) {
  .topnav-item { padding: 7px 11px; font-size: 11px; }
  .uc-avatar, .logout-btn { width: 34px; height: 34px; }
  .hero-banner h1 { font-size: 20px; }
  .bento-value { font-size: 28px; }
}
