/* ============================================================
   ∞LMS — Component CSS (vendored from v3-next/src/app/design-tokens.css)
   This is the working stylesheet the live product ships.
   Pair with ../../colors_and_type.css for the token layer.
   ============================================================ */

:root {
  --primary: #00ACC1;
  --primary-dark: #00838F;
  --primary-bright: #26C6DA;
  --primary-soft: #E0F7FA;
  --accent: #FF7043;
  --accent-soft: #FFE0D2;
  --success: #43A047;
  --success-soft: #E8F5E9;
  --warn: #F57C00;
  --warn-soft: #FFE0B2;
  --info: #5C6BC0;
  --info-soft: #E8EAF6;
  --purple: #8E24AA;
  --purple-soft: #F3E5F5;
  --danger: #E53935;
  --text-dark: #0F1B26;
  --text: #2A3540;
  --text-muted: #6B7C8C;
  --text-faint: #A8B4BD;
  --line: #E8ECEF;
  --line-soft: #F1F4F6;
  --bg: #F5F8FA;
  --bg-card: #FFFFFF;
}

html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; }

.mi {
  font-family: 'Material Symbols Outlined';
  font-weight: 400; font-style: normal;
  line-height: 1; vertical-align: middle;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}
.mi.fill { font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

/* APP SHELL */
.app { display: grid; grid-template-rows: 64px 1fr; grid-template-areas: "header" "main"; height: 100vh; min-height: 720px; }
.app.with-subnav { grid-template-rows: 64px 48px 1fr; grid-template-areas: "header" "subnav" "main"; }

.h { grid-area: header; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; gap: 32px; }
.h-logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding-right: 18px; border-right: 1px solid var(--line); height: 44px; }
.h-logo .brand-logo { height: 38px; width: auto; display: block; }
.h-logo .role-chip { font-size: 9px; font-weight: 700; color: var(--primary-dark); background: var(--primary-soft); padding: 4px 8px; border-radius: 6px; letter-spacing: 1.5px; white-space: nowrap; }

.h-nav { display: flex; align-items: center; gap: 6px; height: 100%; flex: 1; }
.h-link { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 100%; color: var(--text-muted); font-size: 13px; font-weight: 500; position: relative; cursor: pointer; transition: color .15s ease; }
.h-link:hover { color: var(--text-dark); }
.h-link .mi { font-size: 20px; }
.h-link.active { color: var(--primary-dark); font-weight: 700; }
.h-link.active .mi { color: var(--primary); font-variation-settings: 'FILL' 1, 'wght' 500; }
.h-link.active::after { content: ""; position: absolute; bottom: -1px; left: 14px; right: 14px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.h-link .pip { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.h-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.h-icon { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); border-radius: 10px; position: relative; cursor: pointer; }
.h-icon:hover { background: var(--bg); color: var(--text-dark); }
.h-icon .mi { font-size: 22px; }
.h-icon .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }
.h-user { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--bg); margin-left: 4px; cursor: pointer; }
.h-user .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #FFAB91, #FF7043); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.h-user .av.instructor { background: linear-gradient(135deg, #90CAF9, #42A5F5); }
.h-user .av.admin { background: linear-gradient(135deg, #B39DDB, #7E57C2); }
.h-user .name { font-size: 12px; font-weight: 500; color: var(--text-dark); }
.h-user .mi { color: var(--text-muted); font-size: 18px; }

.role-switch { display: flex; gap: 2px; padding: 3px; background: var(--bg); border-radius: 8px; margin-right: 8px; border: 1px dashed var(--text-faint); }
.role-switch .r { display: flex; align-items: center; gap: 4px; padding: 5px 10px; font-size: 11px; font-weight: 500; color: var(--text-muted); border-radius: 6px; cursor: pointer; }
.role-switch .r .mi { font-size: 14px; }
.role-switch .r.active { background: #fff; color: var(--text-dark); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }

.subnav { grid-area: subnav; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; gap: 8px; }
.crumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.crumb .mi { font-size: 14px; }
.crumb b { color: var(--text-dark); font-weight: 600; }

.main { grid-area: main; overflow-y: auto; padding: 28px 36px 60px; }
.main::-webkit-scrollbar { width: 10px; }
.main::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.main::-webkit-scrollbar-track { background: transparent; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 700; color: var(--text-dark); letter-spacing: -0.3px; }
.page-head .sub { font-size: 12px; color: var(--text-muted); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.page-head .sub .mi { font-size: 14px; }
.page-head-right { display: flex; align-items: center; gap: 10px; }

/* common */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 12px; font-weight: 500; cursor: pointer; }
.btn:hover { border-color: var(--text-muted); }
.btn.primary { border-color: transparent; background: linear-gradient(135deg, var(--primary), var(--primary-bright)); color: #fff; box-shadow: 0 2px 6px rgba(0,172,193,0.25); }
.btn.outline { background: transparent; }
.btn.ghost { border: none; background: transparent; }
.btn.danger { color: var(--danger); }
.btn.big { padding: 12px 22px; font-size: 13px; font-weight: 700; }
.btn .mi { font-size: 18px; }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 999px; background: var(--line-soft); color: var(--text-muted); }
.tag .mi { font-size: 13px; }
.tag.ok    { background: var(--success-soft); color: var(--success); }
.tag.new   { background: var(--primary-soft); color: var(--primary-dark); }
.tag.warn  { background: var(--warn-soft); color: var(--warn); }
.tag.acc   { background: var(--accent-soft); color: var(--accent); }
.tag.info  { background: var(--info-soft); color: var(--info); }
.tag.danger{ background: #FFEBEE; color: var(--danger); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.card-head { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line-soft); }
.card-head .ttl { font-size: 13px; font-weight: 700; color: var(--text-dark); display: flex; align-items: center; gap: 8px; }
.card-head .ttl .mi { color: var(--primary); font-size: 18px; }
.card-head .right { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.card-body { padding: 18px 20px; }

.pbar { height: 6px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.pbar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-bright)); border-radius: 4px; }
.pbar.thin { height: 4px; }
.pbar.warn > span { background: linear-gradient(90deg, #FFB74D, #FB8C00); }
.pbar.success > span { background: linear-gradient(90deg, #66BB6A, #43A047); }
.pbar.danger > span { background: linear-gradient(90deg, #EF5350, #C62828); }

.avatar { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #FFAB91, #FF7043); color: #fff; font-weight: 700; border-radius: 50%; flex-shrink: 0; }
.avatar.instructor { background: linear-gradient(135deg, #90CAF9, #42A5F5); }
.avatar.admin { background: linear-gradient(135deg, #B39DDB, #7E57C2); }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.kpi .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kpi .ic .mi { font-size: 28px; }
.kpi.acc .ic { background: var(--accent-soft); color: var(--accent); }
.kpi.warn .ic { background: var(--warn-soft); color: var(--warn); }
.kpi.success .ic { background: var(--success-soft); color: var(--success); }
.kpi.info .ic { background: var(--info-soft); color: var(--info); }
.kpi.purple .ic { background: var(--purple-soft); color: var(--purple); }
.kpi .v { font-size: 28px; font-weight: 700; line-height: 1; color: var(--text-dark); }
.kpi .v .u { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-left: 4px; }
.kpi .l { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.kpi .delta { font-size: 11px; font-weight: 700; margin-top: 3px; display: inline-flex; align-items: center; gap: 2px; }
.kpi .delta.up { color: var(--success); }
.kpi .delta.down { color: var(--danger); }
.kpi .delta .mi { font-size: 12px; }
.kpi.clickable { cursor: pointer; transition: all .15s ease; position: relative; }
.kpi.clickable:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20,40,60,0.08); border-color: var(--text-muted); }
.kpi.clickable::after { content: "chevron_right"; font-family: 'Material Symbols Outlined'; font-size: 20px; position: absolute; top: 12px; right: 12px; color: var(--text-faint); opacity: 0; transition: opacity .15s ease; }
.kpi.clickable:hover::after { opacity: 1; }

/* list row */
.lrow { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.lrow:last-child { border-bottom: none; }
.lrow .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--bg); color: var(--text-muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lrow .ic .mi { font-size: 20px; }
.lrow .ic.primary { background: var(--primary-soft); color: var(--primary-dark); }
.lrow .ic.acc { background: var(--accent-soft); color: var(--accent); }
.lrow .ic.success { background: var(--success-soft); color: var(--success); }
.lrow .ic.warn { background: var(--warn-soft); color: var(--warn); }
.lrow .ic.info { background: var(--info-soft); color: var(--info); }
.lrow .body { flex: 1; min-width: 0; }
.lrow .body .t { font-size: 13px; font-weight: 500; color: var(--text-dark); }
.lrow .body .m { font-size: 11px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 10px; align-items: center; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }

/* Course cards */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.course-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; transition: all .15s ease; }
.course-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20,40,60,0.06); }
.course-card .banner { height: 60px; background: linear-gradient(135deg, #006064, #00ACC1); display: flex; align-items: center; padding: 12px 16px; color: #fff; position: relative; }
.course-card .banner.c-ux { background: linear-gradient(135deg, #BF360C, #FF7043); }
.course-card .banner.c-data { background: linear-gradient(135deg, #4527A0, #7E57C2); }
.course-card .banner.c-locked { background: linear-gradient(135deg, #455A64, #78909C); }
.course-card .banner .ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; }
.course-card .banner .ic .mi { font-size: 22px; }
.course-card .banner .badge-right { margin-left: auto; padding: 3px 8px; background: rgba(255,255,255,0.2); border-radius: 999px; font-size: 10px; font-weight: 600; }
.course-card .body { padding: 14px 18px 12px; }
.course-card .body h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--text-dark); }
.course-card .body .cat { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.course-card .body .pwrap { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.course-card .body .pwrap .pbar { flex: 1; }
.course-card .body .pwrap .pct { font-size: 12px; font-weight: 700; color: var(--primary-dark); }
.course-card .body .next { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.course-card .body .next b { color: var(--text-dark); font-weight: 500; }
.course-card .foot { padding: 10px 18px; background: var(--bg); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.course-card .foot .play { display: flex; align-items: center; gap: 4px; color: var(--primary-dark); font-weight: 600; }
.course-card.locked { opacity: 0.6; cursor: not-allowed; }

/* notif row */
.notif-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--bg); margin: 0 -10px; padding: 12px 10px; border-radius: 8px; }
.notif-row .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--bg); color: var(--text-muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif-row .ic .mi { font-size: 18px; }
.notif-row.unread .ic { background: var(--accent-soft); color: var(--accent); }
.notif-row .body { flex: 1; min-width: 0; }
.notif-row .body .t { font-size: 12px; color: var(--text-dark); line-height: 1.5; }
.notif-row.unread .body .t { font-weight: 600; }
.notif-row .body .m { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

/* Form */
.form-row { margin-bottom: 18px; }
.form-label { font-size: 12px; font-weight: 700; color: var(--text-dark); display: block; margin-bottom: 6px; }
.form-input, .form-textarea, .form-select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 13px; background: #fff; color: var(--text); }
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,172,193,0.12); }
.form-textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

/* Course detail hero */
.cd-hero { background: linear-gradient(135deg, #006064 0%, #00ACC1 100%); border-radius: 16px; color: #fff; padding: 24px 28px; margin-bottom: 22px; position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.cd-hero::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,0.07); }
.cd-hero .cat { font-size: 11px; opacity: 0.85; letter-spacing: 2px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.cd-hero h1 { margin: 0 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -0.3px; position: relative; z-index: 1; }
.cd-hero .meta { display: flex; gap: 18px; font-size: 12px; opacity: 0.9; position: relative; z-index: 1; }
.cd-hero .meta span { display: inline-flex; align-items: center; gap: 5px; }
.cd-hero .meta .mi { font-size: 15px; }
.cd-hero .progress-block { text-align: right; position: relative; z-index: 1; }
.cd-hero .big-num { font-size: 50px; font-weight: 900; line-height: 1; letter-spacing: -2px; }
.cd-hero .big-num .u { font-size: 16px; font-weight: 500; opacity: 0.8; }
.cd-hero .lbl { font-size: 10px; opacity: 0.8; letter-spacing: 1.5px; font-weight: 700; margin-top: 4px; }
.cd-hero .pbar { width: 180px; background: rgba(255,255,255,0.2); margin-top: 6px; }
.cd-hero .pbar > span { background: #fff; }

.cd-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }

.continue { background: linear-gradient(135deg, #FFF8F2, #FFE0D2); border: 1px solid #FFD8B8; border-radius: 14px; padding: 16px 20px; margin-bottom: 18px; display: flex; align-items: center; gap: 16px; }
.continue .ic { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--accent), #FF8A65); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.continue .ic .mi { font-size: 30px; }
.continue .body { flex: 1; min-width: 0; }
.continue .eyebrow { font-size: 10px; font-weight: 700; color: var(--accent); letter-spacing: 1.5px; }
.continue .ttl { font-size: 15px; font-weight: 700; color: var(--text-dark); margin: 3px 0; }
.continue .m { font-size: 12px; color: var(--text-muted); }

/* sprint */
.sprint { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.sprint-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; }
.sprint-head.locked { cursor: not-allowed; opacity: 0.5; }
.sprint-head .num { width: 38px; height: 38px; border-radius: 11px; background: var(--line-soft); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.sprint.done .num { background: var(--success-soft); color: var(--success); }
.sprint.done .num .mi { font-size: 22px; }
.sprint.active .num { background: linear-gradient(135deg, var(--primary), var(--primary-bright)); color: #fff; }
.sprint-head .body { flex: 1; min-width: 0; }
.sprint-head .body .title { font-size: 14px; font-weight: 600; color: var(--text-dark); }
.sprint-head .body .meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 10px; }
.sprint-body { padding: 4px 18px 12px 70px; border-top: 1px solid var(--line-soft); }
.lesson { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.lesson:last-child { border-bottom: none; }
.lesson .check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lesson.done .check { background: var(--success); border-color: var(--success); color: #fff; }
.lesson.done .check .mi { font-size: 16px; }
.lesson.now .check { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px rgba(255,112,67,0.18); }
.lesson.now .check .mi { font-size: 14px; }
.lesson.locked .check { background: var(--bg); border-style: dashed; }
.lesson.locked .check .mi { font-size: 14px; color: var(--text-faint); }
.lesson .ic { width: 30px; height: 30px; border-radius: 8px; background: var(--bg); color: var(--text-muted); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.lesson .ic .mi { font-size: 18px; }
.lesson .body { flex: 1; min-width: 0; }
.lesson .body .t { font-size: 13px; font-weight: 500; color: var(--text-dark); }
.lesson.done .body .t { color: var(--text-muted); }
.lesson.locked .body .t { color: var(--text-faint); }
.lesson.now .body .t { font-weight: 700; }
.lesson .body .m { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.lesson .right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-size: 11px; color: var(--text-muted); }

/* table */
.t-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.t-table thead th { text-align: left; font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.8px; text-transform: uppercase; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.t-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.t-table tbody tr:last-child td { border-bottom: none; }
.t-table tbody tr:hover { background: var(--bg); }
.t-student { display: flex; align-items: center; gap: 10px; }
.t-student .av { width: 32px; height: 32px; font-size: 12px; flex-shrink: 0; }
.t-student .info .n { font-size: 12px; font-weight: 600; color: var(--text-dark); }
.t-student .info .e { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.t-progress { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.t-progress .pbar { flex: 1; min-width: 60px; }
.t-progress .pct { font-size: 11px; font-weight: 700; color: var(--text-dark); width: 32px; text-align: right; }

/* Grading */
.grade-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.grade-queue { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; max-height: 720px; display: flex; flex-direction: column; }
.grade-queue .head { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); font-size: 12px; font-weight: 700; color: var(--text-dark); display: flex; align-items: center; gap: 6px; }
.grade-queue .head .mi { color: var(--primary); }
.grade-queue .list { overflow-y: auto; flex: 1; }
.grade-queue .item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.grade-queue .item:hover { background: var(--bg); }
.grade-queue .item.active { background: var(--primary-soft); border-left: 3px solid var(--primary); padding-left: 13px; }
.grade-queue .item .av { width: 30px; height: 30px; font-size: 11px; }
.grade-queue .item .body { flex: 1; min-width: 0; }
.grade-queue .item .body .t { font-size: 12px; font-weight: 600; color: var(--text-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grade-queue .item .body .m { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.grade-detail { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }

/* stuck card */
.stuck-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; grid-template-columns: 280px 1fr auto; gap: 16px; align-items: center; margin-bottom: 12px; }
.stuck-card.warn { border-color: #FFD8B8; background: linear-gradient(135deg, #FFFAF5, #fff); }
.stuck-card.danger { border-color: #FFCDD2; background: linear-gradient(135deg, #FFEBEE, #fff); }
.stuck-card .student { display: flex; align-items: center; gap: 10px; }
.stuck-card .student .av { width: 40px; height: 40px; font-size: 14px; }
.stuck-card .student .info .n { font-size: 13px; font-weight: 700; color: var(--text-dark); }
.stuck-card .student .info .e { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.stuck-card .reason { display: flex; flex-direction: column; gap: 4px; }
.stuck-card .reason .label { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; }
.stuck-card .reason .why { font-size: 13px; color: var(--text-dark); line-height: 1.5; }
.stuck-card .reason .why b { color: var(--danger); }
.stuck-card .reason .stats { display: flex; gap: 14px; margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.stuck-card .reason .stats b { color: var(--text-dark); font-weight: 700; }
.stuck-card .actions { display: flex; flex-direction: column; gap: 6px; }

/* Slack chip on header */
.slack-mark { display: inline-block; width: 14px; height: 14px; flex-shrink: 0; background: radial-gradient(circle at 30% 30%, #E01E5A 0 18%, transparent 19%), radial-gradient(circle at 70% 30%, #ECB22E 0 18%, transparent 19%), radial-gradient(circle at 30% 70%, #2EB67D 0 18%, transparent 19%), radial-gradient(circle at 70% 70%, #36C5F0 0 18%, transparent 19%); }
.h-slack { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 9px; font-size: 12px; font-weight: 600; color: #4A154B; background: #f9f4fa; border: 1px solid #ead5ec; text-decoration: none; margin-right: 4px; cursor: pointer; }
.h-slack:hover { background: #4A154B; color: #fff; border-color: #4A154B; }
.h-slack-pip { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }

/* LOGIN */
.login-stage { position: relative; width: 100%; height: 100vh; min-height: 720px; background: linear-gradient(135deg, #f5f8fa 0%, #e6f0f3 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.login-bg { position: absolute; inset: 0; pointer-events: none; }
.bg-circle { position: absolute; border-radius: 50%; background: linear-gradient(135deg, rgba(0,172,193,0.18), rgba(38,198,218,0.05)); }
.bg-circle.c1 { width: 480px; height: 480px; top: -120px; left: -120px; }
.bg-circle.c2 { width: 360px; height: 360px; bottom: -100px; right: -80px; background: linear-gradient(135deg, rgba(255,112,67,0.18), rgba(255,112,67,0.04)); }
.bg-circle.c3 { width: 240px; height: 240px; top: 40%; right: 20%; background: linear-gradient(135deg, rgba(142,36,170,0.08), rgba(142,36,170,0.02)); }
.login-card { position: relative; z-index: 1; background: #fff; border-radius: 24px; box-shadow: 0 24px 64px rgba(15,27,38,0.18); width: 920px; max-width: calc(100vw - 48px); display: grid; grid-template-columns: 380px 1fr; overflow: hidden; min-height: 580px; }
.login-brand { background: linear-gradient(135deg, #00838F 0%, #006064 100%); color: #fff; padding: 40px 36px; display: flex; flex-direction: column; position: relative; }
.login-brand::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 280px; height: 280px; border-radius: 50%; background: rgba(255,255,255,0.07); }
.login-logo { height: 44px; width: auto; filter: brightness(0) invert(1); margin-bottom: 8px; }
.login-brand-tag { font-size: 12px; opacity: 0.85; letter-spacing: 1px; margin-bottom: 36px; }
.login-brand-body { display: flex; flex-direction: column; gap: 20px; flex: 1; position: relative; z-index: 1; }
.login-bullet { display: flex; gap: 14px; }
.login-bullet .mi { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.14); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.login-bullet .t { font-size: 13px; font-weight: 700; }
.login-bullet .m { font-size: 11px; opacity: 0.8; margin-top: 3px; }
.login-brand-foot { font-size: 10px; opacity: 0.6; margin-top: 24px; position: relative; z-index: 1; }
.login-form-pane { padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; }
.login-title { margin: 0 0 6px; font-size: 26px; font-weight: 700; color: var(--text-dark); letter-spacing: -0.3px; }
.login-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.login-link { font-size: 11px; color: var(--primary-dark); font-weight: 600; cursor: pointer; }
.login-link:hover { text-decoration: underline; }
.login-role-switch { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 5px; background: var(--bg); border-radius: 12px; margin-bottom: 22px; }
.role-tab { display: flex; align-items: center; gap: 8px; padding: 10px 10px; border-radius: 8px; cursor: pointer; background: transparent; color: var(--text-muted); }
.role-tab .mi { font-size: 22px; flex-shrink: 0; }
.role-tab .t { font-size: 12px; font-weight: 600; color: var(--text-dark); }
.role-tab .m { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.role-tab.active { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.role-tab.active .mi { color: var(--primary); }
.input-with-ic { position: relative; display: flex; align-items: center; }
.input-with-ic .form-input { padding-left: 42px; padding-right: 38px; }
.input-with-ic > .mi { position: absolute; left: 12px; color: var(--text-muted); font-size: 20px; pointer-events: none; z-index: 1; }
.input-with-ic .input-tail { position: absolute; right: 6px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); border-radius: 6px; border: none; background: transparent; cursor: pointer; }
.input-with-ic .input-tail:hover { background: var(--bg); }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-divider span { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.login-foot { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 22px; }
.oauth-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 10px 8px; white-space: nowrap; }
.login-form-pane .form-input { padding: 12px 12px; font-size: 13px; border-radius: 10px; }
.login-form-pane .input-with-ic .form-input { padding-left: 44px; padding-right: 40px; }
