/* Giao diện pastel – lấy cảm hứng từ app TA tham khảo */
:root {
  --bg: #eef4ff;
  --surface: #ffffff;
  --surface-2: #f4f7fd;
  --text: #1d2a4d;
  --muted: #6b7690;
  --border: #e3e9f5;
  --navy: #1e3a8a;
  --primary: #3563e9;
  --primary-soft: #e3ebff;
  --green: #22c55e;
  --green-soft: #dcfce7;
  --green-ink: #15803d;
  --amber: #f59e0b;
  --amber-soft: #fef3c7;
  --amber-ink: #b45309;
  --rose: #f0506e;
  --rose-soft: #ffe4ea;
  --rose-ink: #be123c;
  --radius: 20px;
  --shadow: 0 2px 6px rgba(30, 58, 138, .06), 0 10px 28px rgba(30, 58, 138, .07);
  --title: "Baloo 2", "Be Vietnam Pro", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: linear-gradient(180deg, #e7f0ff 0%, #f3f0ff 55%, #fdf2f8 100%) fixed;
  color: var(--text);
  font: 15px/1.45 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h3 { font-size: 16px; }
p { margin: 0; }
code { background: #fff; padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.italic { font-style: italic; }
.grow { flex: 1; min-width: 0; }
.bad-text { color: var(--rose-ink) !important; }
.title-font { font-family: var(--title); }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }

/* ---------- Ảnh 3D + emoji dự phòng ---------- */
.art, .mascot { position: relative; display: inline-grid; place-items: center; flex: none; }
.art.err::before, .mascot.err::before { content: attr(data-fb); line-height: 1; }
.art img, .mascot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.art { width: 40px; height: 40px; font-size: 26px; }
.art.md { width: 44px; height: 44px; font-size: 28px; }
.art.lg { width: 72px; height: 72px; font-size: 46px; }
.art.xl { width: 110px; height: 110px; font-size: 70px; }
.art.nav { width: 28px; height: 28px; font-size: 21px; }
.art.tile-art { width: 80px; height: 80px; font-size: 52px; }

/* ---------- Nút ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: linear-gradient(180deg, #4b7bff, #2f5be0); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(53, 99, 233, .3); }
.btn.danger { color: var(--rose-ink); border-color: var(--rose-soft); }
.btn.danger-fill { background: var(--rose); color: #fff; border-color: transparent; }
.btn.block { width: 100%; }
.btn.big { min-height: 54px; font-size: 17px; border-radius: 16px; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 13.5px; border-radius: 11px; }
.link { border: 0; background: none; padding: 2px 0; color: var(--primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.link svg.i { width: 14px; height: 14px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.icon-btn:disabled { opacity: .3; cursor: default; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- Form ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 13px; background: var(--surface-2); color: var(--text);
  font: inherit; font-size: 16px;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.form-error { min-height: 1.2em; margin: 0 0 10px; color: var(--rose-ink); font-size: 14px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form h3 { margin-bottom: 12px; }

/* ---------- Banner ---------- */
.banner {
  position: relative; overflow: hidden;
  min-height: 200px; padding: calc(12px + env(safe-area-inset-top)) 16px 46px;
  background:
    radial-gradient(120px 60px at 18% 30%, rgba(255,255,255,.9), transparent 70%),
    radial-gradient(160px 70px at 70% 18%, rgba(255,255,255,.8), transparent 70%),
    radial-gradient(240px 120px at 10% 110%, #ffd6e7, transparent 70%),
    radial-gradient(260px 140px at 95% 105%, #c9f2dd, transparent 70%),
    linear-gradient(180deg, #bcd8ff 0%, #dbe9ff 60%, #eef4ff 100%);
}
.banner-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.banner::after { /* làm mờ mép dưới banner hoà vào nền */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px;
  background: linear-gradient(180deg, rgba(231, 240, 255, 0), #e7f0ff 85%);
}
.banner-top, .banner-text { position: relative; z-index: 3; }
.banner-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.brand-tag {
  font-family: var(--title); font-weight: 800; font-size: 15px; color: var(--navy);
  background: rgba(255,255,255,.75); padding: 3px 12px; border-radius: 999px; backdrop-filter: blur(4px);
}
.round-btn {
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--navy); cursor: pointer; box-shadow: var(--shadow);
}
.round-btn svg.i { width: 22px; height: 22px; stroke-width: 2.6; }
.banner-text { max-width: calc(100% - 140px); margin-top: 12px; }
.banner-title {
  font-family: var(--title); font-weight: 800; font-size: 36px; line-height: 1.05; letter-spacing: -.5px;
  color: var(--navy);
  text-shadow: 3px 0 0 #fff, -3px 0 0 #fff, 0 3px 0 #fff, 0 -3px 0 #fff, 2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff, 0 6px 12px rgba(30,58,138,.25);
}
.banner-sub { margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--navy); text-shadow: 0 1px 0 rgba(255,255,255,.9); }
.banner .mascot { position: absolute; right: 4px; bottom: 22px; width: 148px; height: 148px; font-size: 76px; z-index: 2; filter: drop-shadow(0 8px 12px rgba(30,58,138,.18)); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow);
}

/* ---------- Khung trang ---------- */
.page { max-width: 600px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.content { position: relative; z-index: 2; margin-top: -30px; padding: 0 14px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr); max-width: 600px; margin: 0 auto;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); border-top: 1px solid var(--border);
  border-radius: 22px 22px 0 0; box-shadow: 0 -6px 24px rgba(30,58,138,.08);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; border: 0; border-radius: 16px; background: none;
  color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.tabbar button.active { color: var(--navy); background: var(--primary-soft); }
.tabbar button:not(.active) .art { filter: saturate(.75); opacity: .85; }
.nav-ic { position: relative; }
.dot {
  position: absolute; top: -4px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--rose); color: #fff; font-style: normal; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid #fff;
}

/* ---------- Thẻ ---------- */
.card {
  display: block; width: 100%; text-align: left; color: inherit; font: inherit;
  background: var(--surface); border: 1px solid rgba(255,255,255,.8); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
button.card { cursor: pointer; }
.row { display: flex; align-items: center; gap: 12px; }
.sec { font-family: var(--title); font-size: 20px; font-weight: 800; color: var(--navy); margin: 20px 4px 10px; display: flex; align-items: center; gap: 8px; }
.count { font-family: inherit; font-size: 13px; background: var(--primary-soft); color: var(--primary); padding: 1px 9px; border-radius: 999px; }
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 700;
}
.badge.ok { background: var(--green-soft); color: var(--green-ink); }
.badge.wait { background: var(--amber-soft); color: var(--amber-ink); }
.badge.bad { background: var(--rose-soft); color: var(--rose-ink); }
.pill { display: inline-block; margin: 4px 4px 0 0; padding: 3px 9px; border-radius: 9px; background: var(--green-soft); color: var(--green-ink); font-size: 12.5px; font-weight: 600; }
.pill.wait { background: var(--amber-soft); color: var(--amber-ink); }
.pill.gray { background: var(--surface-2); color: var(--muted); }
.stack { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.empty { padding: 22px 16px; text-align: center; color: var(--muted); background: rgba(255,255,255,.7); border: 2px dashed var(--border); border-radius: var(--radius); margin-bottom: 12px; }
.empty p { margin-top: 6px; }
.next { margin-top: 8px; color: var(--text); }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 32px; color: var(--muted); }
.loading span { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.note { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); }
.note svg.i { color: var(--primary); }

/* Hôm nay */
.hello { display: flex; align-items: center; gap: 12px; }
.hello .grow { display: flex; flex-direction: column; }
.clock { font-family: var(--title); font-size: 34px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1; }
.class-card .row { margin-bottom: 12px; }
.cls-id { font-family: var(--title); font-size: 21px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.class-card.open { box-shadow: 0 0 0 3px #bcd0ff, var(--shadow); }
.class-card.off, .class-card.missed { opacity: .8; }
.class-card .row:last-child { margin-bottom: 0; }
.done-line { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 14px; background: var(--green-soft); color: var(--green-ink); }
.who { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); }
.strip { margin-top: 8px; }
.strip .row { margin-bottom: 8px; }
.strip .pct { font-family: var(--title); font-weight: 800; font-size: 20px; color: var(--navy); }
.strip-item { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.strip-item b { font-variant-numeric: tabular-nums; font-size: 13px; }
.bar { height: 9px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 9px; }
.callout { display: flex; align-items: center; gap: 12px; background: linear-gradient(90deg, #fff7e0, #fff); }
.callout .grow { display: flex; flex-direction: column; }

/* Danh sách buổi */
.sess-list { list-style: none; margin: 10px 0 0; padding: 0; }
ul.card.sess-list { padding: 4px 14px; }
.sess { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
ul.card .sess:first-child { border-top: 0; }
.sess.off { opacity: .55; }
.date-chip { width: 50px; flex: none; text-align: center; padding: 5px 0; border-radius: 13px; background: var(--primary-soft); color: var(--navy); }
.date-chip b { display: block; font-size: 14px; }
.date-chip span { font-size: 11.5px; color: var(--muted); }
.summary { display: flex; align-items: center; gap: 16px; }
.month-bar, .monthbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px; margin-bottom: 12px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
}
.monthbar strong { color: var(--navy); font-size: 14.5px; }

/* Vòng tiến trình */
.ring { display: block; }
.ring circle { fill: none; }
.ring-bg { stroke: #edf1f8; }
.ring-wrap { position: relative; display: grid; place-items: center; flex: none; }
.ring-wrap > b { position: absolute; font-size: 13px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.ring-wrap.big > b { font-family: var(--title); font-size: 22px; color: var(--navy); }

/* Của tôi */
.content.overlap { margin-top: -38px; }
.profile { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile h2 { font-family: var(--title); font-size: 21px; color: var(--navy); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.profile .grow { min-width: 160px; }
@media (max-width: 480px) {
  .profile .kpi-mini { flex-basis: 100%; justify-content: center; }
}
.chips span { white-space: nowrap; padding: 2px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--navy); font-size: 12.5px; font-weight: 600; }
.avatar {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, #c7d7ff, #f5d0fe); color: var(--navy); font-weight: 800; font-family: var(--title); font-size: 18px;
}
.avatar.sm { width: 30px; height: 30px; font-size: 14px; }
.avatar.lg { width: 64px; height: 64px; font-size: 28px; border: 3px solid #fff; box-shadow: 0 0 0 3px #f9a8d4; }
.kpi-mini { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 16px; background: var(--green-soft); }
.kpi-mini small { display: block; font-size: 11.5px; color: var(--green-ink); font-weight: 600; }
.kpi-mini b { font-family: var(--title); font-size: 24px; color: var(--navy); line-height: 1; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.tile {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; gap: 4px 6px;
  min-height: 176px; padding: 14px 12px 12px 14px; border: 1px solid rgba(255,255,255,.9); border-radius: 22px;
  text-align: left; color: var(--text); font: inherit; cursor: pointer; box-shadow: var(--shadow); overflow: hidden;
}
.tile-head { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 2px; }
.tile-head b { font-family: var(--title); font-size: 19px; color: var(--navy); line-height: 1.1; }
.tile-head span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.tile .tile-art { align-self: end; justify-self: start; margin-left: -4px; }
.tile em { align-self: start; margin-top: 10px; padding-bottom: 36px; font-family: var(--title); font-size: 13.5px; line-height: 1.15; }
.tile-go { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; }
.tone-blue { background: linear-gradient(160deg, #e3efff, #cfe2ff); } .tone-blue em { color: #3b82f6; } .tone-blue .tile-go { background: #60a5fa; }
.tone-yellow { background: linear-gradient(160deg, #fff8e1, #ffefc2); } .tone-yellow em { color: #d97706; } .tone-yellow .tile-go { background: #f5b234; }
.tone-mint { background: linear-gradient(160deg, #e6fbef, #ccf3de); } .tone-mint em { color: #16a34a; } .tone-mint .tile-go { background: #4cc28a; }
.tone-peach { background: linear-gradient(160deg, #fff1e6, #ffe0c9); } .tone-peach em { color: #ea7a2e; } .tone-peach .tile-go { background: #f59a4a; }
.tone-pink { background: linear-gradient(160deg, #ffeef4, #ffd9e6); } .tone-pink em { color: #e14a7b; } .tone-pink .tile-go { background: #ec6a95; }
.tone-lilac { background: linear-gradient(160deg, #f2edff, #e3d8ff); } .tone-lilac em { color: #7c5ce0; } .tone-lilac .tile-go { background: #8b6cf0; }
.menu { padding: 6px; }
.menu button { display: block; width: 100%; padding: 13px 12px; border: 0; border-radius: 12px; background: none; text-align: left; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; }
.menu button:hover { background: var(--surface-2); }
.menu.flat { box-shadow: none; border: 1px solid var(--border); margin-top: 14px; }
.cheer { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); background: rgba(255,255,255,.75); }
.cheer b { display: inline-block; padding: 2px 12px; border-radius: 999px; background: #ece6ff; color: var(--navy); margin-bottom: 4px; }
.cheer span { display: block; font-size: 13.5px; color: var(--muted); }

/* Tiến trình */
.overall .row + .row { margin-top: 12px; }
.overall h3 { font-family: var(--title); font-size: 20px; color: var(--navy); }
.crown { font-size: 28px; }
.pill-msg { display: inline-block; padding: 5px 14px; border-radius: 999px; background: #ece6ff; color: #5b3fd0; font-weight: 700; margin-bottom: 6px; }
.pill-msg.ok { background: var(--green-soft); color: var(--green-ink); }
.sec-row { margin-bottom: -2px; }
.kpi-class { padding: 14px; border-radius: 22px; margin-bottom: 14px; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.9); }
.kpi-class-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.kpi-class-head h3 { font-family: var(--title); font-size: 21px; color: var(--navy); }
.status { display: flex; flex-direction: column; align-items: flex-end; padding: 6px 12px; border-radius: 14px; font-weight: 700; font-size: 13.5px; text-align: right; }
.status small { font-weight: 500; font-size: 11px; opacity: .9; }
.status.ok { background: var(--green-soft); color: var(--green-ink); }
.status.bad { background: var(--rose-soft); color: var(--rose-ink); }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 520px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metric { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; background: rgba(255,255,255,.92); border-radius: 16px; }
.metric-head { display: flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--navy); }
.miss { padding: 2px 9px; border-radius: 999px; background: var(--rose-soft); color: var(--rose-ink); font-size: 12px; font-weight: 700; }
.miss.ok { background: var(--green-soft); color: var(--green-ink); }
.pend { font-size: 11.5px; color: var(--amber-ink); font-weight: 600; }

/* Lịch sử / thống kê */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat { padding: 12px 8px; text-align: center; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.stat b { display: block; font-family: var(--title); font-size: 26px; color: var(--navy); line-height: 1.1; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat.warn b { color: var(--amber-ink); }

/* Lịch */
.day { padding: 10px 0; border-bottom: 1px solid var(--border); }
.day:first-child { padding-top: 0; }
.day:last-child { border-bottom: 0; padding-bottom: 0; }
.day-name { font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; color: var(--navy); }
.slot { display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px; margin-top: 6px; border-radius: 12px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.slot.dim { opacity: .4; }
.cal-day { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.cal-day:first-child { border-top: 0; padding-top: 0; }
.cal-day.today .date-chip { background: var(--navy); color: #fff; }
.cal-day.today .date-chip span { color: #c7d2fe; }
.cal-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.cal-row.off b { text-decoration: line-through; color: var(--muted); }

/* Quản lý */
.review .foot { margin-top: 12px; gap: 8px; }
.quote { margin-top: 10px; padding: 9px 12px; border-left: 3px solid #c7d2fe; background: var(--surface-2); border-radius: 0 12px 12px 0; font-size: 13.5px; }
.ta-card summary { list-style: none; cursor: pointer; }
.ta-card summary::-webkit-details-marker { display: none; }
.ta-card[open] summary { margin-bottom: 12px; }
.ta-card .kpi-class { box-shadow: none; }
.sup-card .row { align-items: flex-start; }
.guide h3 { margin: 16px 0 6px; color: var(--navy); }
.guide h3:first-child { margin-top: 0; }
.guide ol { margin: 0; padding-left: 20px; }
.guide li { margin-bottom: 6px; }
.guide p { margin-bottom: 4px; }

/* Đăng nhập */
.login { min-height: 100vh; min-height: 100dvh; max-width: 460px; margin: 0 auto; }
.login-hero { position: relative; overflow: hidden; height: 230px; padding: 16px; background: linear-gradient(180deg, #bcd8ff, #eef4ff); }
.login-hero .brand-tag { position: relative; z-index: 1; }
.login-hero { height: 270px; }
.login-hero .mascot { position: absolute; right: 50%; transform: translateX(50%); bottom: 28px; width: 180px; height: 180px; font-size: 96px; z-index: 1; filter: drop-shadow(0 8px 12px rgba(30,58,138,.2)); }
.login-card { position: relative; z-index: 2; margin: -30px 14px 24px; padding: 24px 20px 20px; background: #fff; border-radius: 26px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 28px; color: var(--navy); text-align: center; }
.login-card > p { text-align: center; margin-bottom: 18px; }
.demo-note { margin-top: 16px; padding: 12px; border-radius: 14px; background: var(--amber-soft); font-size: 13px; line-height: 1.7; }

/* Hộp thoại */
dialog.sheet {
  width: min(440px, calc(100% - 24px)); padding: 18px; border: 0; border-radius: 24px;
  background: #fff; color: var(--text); box-shadow: 0 20px 60px rgba(30,58,138,.25);
}
dialog.sheet::backdrop { background: rgba(20, 30, 60, .45); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head h3 { font-family: var(--title); font-size: 21px; color: var(--navy); }
dialog .muted { margin-bottom: 12px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 30;
  transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  padding: 12px 16px; border-radius: 14px; background: #1d2a4d; color: #fff;
  box-shadow: 0 8px 26px rgba(0,0,0,.2); font-size: 14px; font-weight: 500;
}
.toast.ok { background: #15803d; }
.toast.warn { background: #b45309; }
.toast.bad { background: #be123c; }

@media (max-width: 360px) {
  .banner-title { font-size: 34px; }
  .banner .mascot { width: 100px; height: 100px; }
  .tile em { font-size: 12px; }
  .tile { min-height: 140px; }
}

/* ---------- Quản trị ---------- */
button.pill { border: 0; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
button.pill.gray:hover { background: var(--primary-soft); color: var(--navy); }
.hint { display: block; margin-top: 4px; font-weight: 400; font-size: 12px; color: var(--muted); }
input[readonly] { background: #eef1f6; color: var(--muted); }
.check-row { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14.5px; font-weight: 600; }
.check-row input { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; }
.checks { border: 0; padding: 0; margin: 0 0 12px; }
.checks legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.check-chip { display: inline-block; margin: 0 6px 6px 0; font-weight: 600; color: var(--text); }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span { display: inline-block; padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); font-size: 13.5px; cursor: pointer; }
.check-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.check-chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.user-row { display: flex; align-items: center; gap: 12px; }
.user-row.locked { opacity: .6; }
.user-row svg.i { color: var(--muted); }
.class-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.class-row:first-child { border-top: 0; padding-top: 0; }
.class-row:last-child { padding-bottom: 0; }
pre.share { margin: 10px 0 0; padding: 12px; border-radius: 12px; background: var(--surface-2); color: var(--text); font: 13.5px/1.6 "Be Vietnam Pro", system-ui, sans-serif; white-space: pre-wrap; word-break: break-word; }
