/* =====================================================================
   UI v3 — clean professional theme
   One calm navy accent, neutral greys, flat surfaces with soft shadows.
   Class names are unchanged from earlier versions (btn-3d, card-3d, stat …) so every page picks this up.
   ===================================================================== */
:root {
  /* v21 — one identity for the website and the portal: Swat cedar green, Jahanzeb brass, green-black ink */
  --ink: #15231d; --muted: #5e6b65; --line: #e2e7e3; --line-strong: #cfd8d2;
  --bg: #f2f5f2; --surface: #ffffff; --surface-2: #f7f9f7;
  --primary: #0e5a43; --primary-dark: #0a4433; --primary-soft: #e4efe9; --accent: #b8913e; --accent-soft: #f6eedc;
  --success: #1f7a4a; --success-soft: #e6f3eb; --danger: #b42318; --danger-soft: #fbeae8;
  --warning: #9a5b06; --warning-soft: #fdf3e2; --info: #0e5a43;
  --sidebar: #0c2a21; --sidebar-2: #08211a; --sidebar-ink: #b5c7be;
  --radius: 12px; --sw: 264px;
  --shadow-1: 0 1px 2px rgba(12,42,33,.06), 0 1px 1px rgba(12,42,33,.03);
  --shadow-2: 0 14px 32px -14px rgba(12,42,33,.28);
  --shadow-3d: 0 1px 0 rgba(255,255,255,.7) inset, 0 2px 0 rgba(12,42,33,.06), 0 12px 24px -16px rgba(12,42,33,.35);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  /* chart roles (validated: light categorical #13845f/#d0731c/#5a63c7, dark #21a074/#cf7424/#7f86e0) */
  --series-1: #13845f; --series-2: #d0731c; --series-3: #5a63c7;
  --seq-1: #e3f1ea; --seq-2: #b9dccb; --seq-3: #85c2a6; --seq-4: #4fa07e; --seq-5: #1f7a57; --seq-6: #0f5a3f;
  --st-good: #0ca30c; --st-warning: #fab219; --st-critical: #d03b3b; --grid: #e7ece8;
}
[data-theme="dark"] {
  --ink: #e4ece7; --muted: #9db0a6; --line: #22332c; --line-strong: #2d4239;
  --bg: #0b1512; --surface: #111e19; --surface-2: #0e1915; --primary: #7cc4a5; --primary-dark: #9fd6bd; --primary-soft: #16302a; --accent: #d2b26a; --accent-soft: #2a2414;
  --success-soft: #12291d; --danger-soft: #2d1414; --warning-soft: #2b2010;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 10px 30px -12px rgba(0,0,0,.7); --shadow-3d: 0 12px 24px -16px rgba(0,0,0,.8);
  --series-1: #21a074; --series-2: #cf7424; --series-3: #7f86e0;
  --seq-1: #16302a; --seq-2: #1d4a3b; --seq-3: #26664f; --seq-4: #2f8564; --seq-5: #48a883; --seq-6: #7cc4a5; --grid: #1f2e28;
}
[data-theme="dark"] .table { --bs-table-color: var(--ink); --bs-table-bg: transparent; --bs-table-striped-color: var(--ink); --bs-table-hover-color: var(--ink); --bs-table-striped-bg: rgba(255,255,255,.03); --bs-table-hover-bg: rgba(255,255,255,.04); }
[data-theme="dark"] .form-control, [data-theme="dark"] .form-select { background-color: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
[data-theme="dark"] .dropdown-menu, [data-theme="dark"] .modal-content { background: var(--surface); color: var(--ink); }
[data-theme="dark"] .dropdown-item { color: var(--ink); }
[data-theme="dark"] .text-muted { color: var(--muted) !important; }
[data-theme="dark"] .list-group-item { background: var(--surface); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .bg-light, [data-theme="dark"] .table-light { background-color: var(--surface-2) !important; --bs-table-bg: var(--surface-2); color: var(--ink); }
[data-theme="dark"] .input-group-text { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }

html, body { font-family: var(--font); color: var(--ink); }
body { min-height: 100vh; font-size: .925rem; background: var(--bg); }
a { color: var(--primary); text-decoration: none; font-weight: 600; }
a:hover { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }
.text-muted { color: var(--muted) !important; }
::selection { background: rgba(14,90,67,.16); }

/* ---------------- Sidebar ---------------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sw); z-index: 1040; overflow-y: auto; scrollbar-width: thin;
  background: var(--sidebar); color: var(--sidebar-ink); padding: 18px 12px 28px; transition: transform .25s ease; border-right: 1px solid rgba(255,255,255,.04); }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; padding: 4px 8px 16px; font-weight: 700; }
.brand:hover { color: #fff; text-decoration: none; }
.brand img { width: auto; max-width: 52px; height: 44px; object-fit: contain; border-radius: 10px; background: #fff; padding: 3px; }
.brand-mark { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; color: #fff; flex-shrink: 0; background: var(--primary); }
.brand-text { line-height: 1.2; font-size: .95rem; }
.role-pill { font-size: .72rem; letter-spacing: .01em; margin: 0 8px 12px; padding: 4px 10px; border-radius: 6px; display: inline-flex; gap: 6px; align-items: center;
  background: rgba(255,255,255,.06); color: #cfd8e6; font-weight: 700; }
.nav-section { font-size: .74rem; letter-spacing: .01em; color: rgba(181,199,190,.62); font-weight: 700; margin: 18px 12px 6px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; margin: 1px 0; border-radius: 8px; position: relative;
  color: var(--sidebar-ink); font-weight: 500; font-size: .88rem; transition: background .15s, color .15s; }
.side-nav a .chip { width: 22px; height: 22px; display: grid; place-items: center; font-size: 1rem; flex-shrink: 0; background: none !important; color: inherit !important; box-shadow: none !important; }
.side-nav a:hover { background: rgba(255,255,255,.05); color: #fff; text-decoration: none; }
.side-nav a.active { color: #fff; background: rgba(255,255,255,.09); font-weight: 600; }
.side-nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sidebar-foot { margin: 22px 8px 0; padding: 12px; border-radius: 8px; background: rgba(255,255,255,.04); font-size: .78rem; }
.sidebar-foot b { color: #fff; }

/* ---------------- Topbar ---------------- */
.topbar { position: sticky; top: 0; z-index: 1030; margin-left: var(--sw); display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.crumb { font-size: .76rem; color: var(--muted); font-weight: 500; }
.content { margin-left: var(--sw); padding: 26px 28px 60px; max-width: 1640px; }
.btn-icon { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 8px; width: 38px; height: 38px; }
.btn-icon:hover { background: var(--surface-2); }
.btn-user { background: var(--surface); color: var(--ink); border-radius: 8px; border: 1px solid var(--line-strong); display: flex; align-items: center; gap: 10px; font-weight: 600; padding: 4px 10px 4px 5px; }
.btn-user:hover, .btn-user:focus { background: var(--surface-2); color: var(--ink); }
.avatar { width: 28px; height: 28px; border-radius: 6px; display: inline-grid; place-items: center; color: #fff; font-weight: 700; background: var(--primary); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: var(--shadow-2) !important; }
.dropdown-item { border-radius: 6px; font-weight: 500; padding: 7px 12px; }
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1035; }
  .topbar, .content { margin-left: 0; }
  .content { padding: 18px 16px 50px; }
  .topbar { padding: 10px 16px; }
}

/* ---------------- Buttons (flat, one accent) ---------------- */
.btn-3d { --b: var(--primary); --bh: var(--primary-dark); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid var(--b); border-radius: 8px;
  font-weight: 600; padding: .55rem 1.05rem; color: var(--fg); background: var(--b); box-shadow: 0 1px 2px rgba(15,23,42,.08); transition: background .15s, border-color .15s, box-shadow .15s; }
.btn-3d:hover { color: var(--fg); background: var(--bh); border-color: var(--bh); text-decoration: none; }
.btn-3d:active, .btn-3d.active { box-shadow: inset 0 2px 3px rgba(0,0,0,.15); }
.btn-3d:focus-visible { outline: 3px solid color-mix(in srgb, var(--b) 30%, transparent); outline-offset: 2px; }
.btn-3d:disabled { opacity: .55; }
.btn-3d.btn-sm { padding: .3rem .65rem; border-radius: 6px; font-size: .8rem; gap: .3rem; }
.btn-3d.btn-lg { padding: .75rem 1.5rem; font-size: 1rem; border-radius: 10px; }
.btn-3d.btn-primary, .btn-3d.btn-info, .btn-3d.btn-purple, .btn-3d.btn-dark { --b: var(--primary); --bh: var(--primary-dark); }
.btn-3d.btn-success { --b: var(--success); --bh: #25643f; }
.btn-3d.btn-danger  { --b: var(--danger); --bh: #912018; }
.btn-3d.btn-warning { --b: #fff; --bh: var(--warning-soft); --fg: var(--warning); border-color: #e7c89a; }
.btn-3d.btn-light   { --b: var(--surface); --bh: var(--surface-2); --fg: var(--ink); border-color: var(--line-strong); }
.btn-3d.btn-light:hover { color: var(--ink); }
[data-theme="dark"] .btn-3d.btn-primary, [data-theme="dark"] .btn-3d.btn-info, [data-theme="dark"] .btn-3d.btn-purple, [data-theme="dark"] .btn-3d.btn-dark { --b: #1b6b51; --bh: #23805f; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark); --bs-btn-active-bg: var(--primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary); }

/* ---------------- Cards & tiles ---------------- */
.card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); }
.card-3d { box-shadow: var(--shadow-1); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); font-weight: 700; padding: 14px 20px; font-size: .93rem; display: flex; align-items: center; }
.card-header > i:first-child, .card-header > span > i:first-child { color: var(--primary); margin-right: 10px !important; font-size: 1rem; }
.card-header.text-danger > i:first-child { color: var(--danger); }
.card-header.text-success > i:first-child { color: var(--success); }
.card-body { padding: 20px; }

.stat { position: relative; padding: 18px; border-radius: var(--radius); height: 100%; display: block; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.stat:hover { color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-2); text-decoration: none; }
.stat .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; color: var(--primary); background: var(--primary-soft); }
.stat .num { font-size: 1.6rem; font-weight: 700; line-height: 1.1; margin-top: 12px; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }

/* Welcome banner */
.hero { position: relative; overflow: hidden; border-radius: var(--radius); padding: 24px 28px; color: #fff; margin-bottom: 24px; background: var(--primary);
  border-left: 4px solid var(--accent); }
.hero h2 { font-weight: 700; margin: 0; font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.hero p { margin: 4px 0 0; color: rgba(255,255,255,.8); }
.hero .cube { display: none; }
.hero .btn-3d.btn-light { --b: #fff; --bh: #eef2f7; --fg: var(--primary); border-color: #fff; }

.table { color: var(--ink); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .68rem .8rem; border-color: var(--line); }
.table thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; background: var(--surface-2); white-space: nowrap; border-bottom: 1px solid var(--line-strong); }
.table-hover > tbody > tr:hover > * { background: var(--surface-2); }
.form-control, .form-select { border-radius: 8px; border: 1px solid var(--line-strong); padding: .52rem .8rem; background-color: var(--surface); transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,59,100,.12); }
.form-control-sm, .form-select-sm { border-radius: 6px; padding: .28rem .5rem; }
.form-label { font-weight: 600; font-size: .8rem; margin-bottom: .35rem; color: #334155; }
[data-theme="dark"] .form-label { color: var(--ink); }
.form-check-input { width: 1.1em; height: 1.1em; border: 1.5px solid var(--line-strong); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.input-group-text { border-radius: 8px; background: var(--surface-2); border-color: var(--line-strong); color: var(--muted); }
.alert-3d { border: 1px solid var(--line); border-radius: 10px; border-left: 4px solid currentColor; box-shadow: var(--shadow-1); }
.badge { font-weight: 600; letter-spacing: .02em; padding: .4em .65em; border-radius: 6px; }
.badge-soft { background: var(--primary-soft); color: var(--primary); }
.text-bg-success { background: var(--success-soft) !important; color: var(--success) !important; }
.text-bg-danger { background: var(--danger-soft) !important; color: var(--danger) !important; }
.text-bg-warning { background: var(--warning-soft) !important; color: var(--warning) !important; }
.text-bg-info, .text-bg-primary { background: var(--primary-soft) !important; color: var(--primary) !important; }
.text-bg-secondary { background: #eef1f5 !important; color: #475569 !important; }
.empty { text-align: center; color: var(--muted); padding: 36px 10px; }
.empty i { font-size: 2.2rem; display: block; margin-bottom: 8px; opacity: .45; }
.photo-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.photo-lg { width: 120px; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.nav-tabs { border-bottom: 1px solid var(--line); gap: 4px; }
.nav-tabs .nav-link { font-weight: 600; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .6rem .9rem; background: none; }
.nav-tabs .nav-link:hover { color: var(--ink); }
.nav-tabs .nav-link.active { color: var(--primary); background: none; border-bottom-color: var(--primary); }
.material-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin-bottom: 10px; }
.material-item:hover { border-color: var(--line-strong); }
.material-item .mi-ico { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; font-size: 1.15rem; color: var(--primary); background: var(--primary-soft); flex-shrink: 0; }
.progress { height: 8px; border-radius: 99px; background: #e9edf3; }
.progress-bar { border-radius: 99px; background: var(--primary); }
.marks-grid input { width: 74px; text-align: center; padding: .3rem; font-weight: 600; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); padding: 14px 16px; border-top: 1px solid var(--line); z-index: 5; border-radius: 0 0 var(--radius) var(--radius); }
.ai-card { background: var(--surface); border-left: 4px solid var(--accent); }
.search-bar { max-width: 340px; }
.list-group-item { border-color: var(--line); }
.pagination .page-link { border-radius: 6px !important; margin: 0 2px; border-color: var(--line); color: var(--primary); font-weight: 600; }
.pagination .active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Section heading */
.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.section-head .ico { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 1.25rem; color: var(--primary); background: var(--primary-soft); flex-shrink: 0; }
.section-head h3 { margin: 0; font-weight: 700; font-size: 1.15rem; }
.section-head p { margin: 0; color: var(--muted); font-size: .86rem; }

/* Option tiles (radio cards) */
.opt-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.opt-tiles input { position: absolute; opacity: 0; pointer-events: none; }
.opt-tiles label { display: block; cursor: pointer; border-radius: 10px; padding: 10px; text-align: center; font-weight: 600; font-size: .8rem; background: var(--surface);
  border: 1.5px solid var(--line-strong); transition: border-color .12s, background .12s; }
.opt-tiles label:hover { border-color: #b7c2d3; }
.opt-tiles label i { color: var(--muted); }
.opt-tiles label .sw { display: block; height: 42px; border-radius: 6px; margin-bottom: 6px; }
.opt-tiles input:checked + label { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.opt-tiles input:checked + label i { color: var(--primary); }
.opt-tiles input:focus-visible + label { outline: 3px solid rgba(31,59,100,.25); }

/* Student Desk */
.desk-steps { display: flex; gap: 10px; flex-wrap: wrap; }
.desk-step { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.desk-step:hover { border-color: var(--primary); text-decoration: none; }
.desk-step span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: .8rem; }
.desk-marks .form-control { text-align: right; }
.date-pill { padding: 6px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: .82rem; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.doc-tile { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; }
.doc-tile:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.doc-ico { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 1.05rem; margin-bottom: 8px; }
.doc-name { font-weight: 600; line-height: 1.25; }
.doc-prev { font-size: .76rem; margin-top: 4px; margin-bottom: auto; }

/* ---------------- Login ---------------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.auth-hero { position: relative; overflow: hidden; color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: center; background: var(--sidebar); }
.auth-hero::after { content: ""; position: absolute; left: 64px; bottom: 56px; width: 64px; height: 3px; background: var(--accent); }
.auth-hero h1 { font-weight: 700; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.15; max-width: 16ch; }
.auth-hero .lead { color: #b7c2d3; max-width: 42ch; }
.auth-feature { display: flex; gap: 12px; align-items: center; margin-top: 12px; color: #d5dde8; font-weight: 500; }
.auth-feature i { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-size: 1.05rem; background: rgba(255,255,255,.07); color: #e6d3b3; }
.float-card { display: none !important; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 14px; padding: 32px 30px; border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.role-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
@media (max-width: 380px) { .role-tabs { grid-template-columns: repeat(3, 1fr); } }
.role-tabs input { display: none; }
.role-tabs label { text-align: center; padding: 10px 4px; border-radius: 8px; background: var(--surface); border: 1.5px solid var(--line-strong); cursor: pointer; font-weight: 600; font-size: .74rem; color: var(--muted); }
.role-tabs label i { display: block; font-size: 1.2rem; margin-bottom: 2px; }
.role-tabs input:checked + label { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-hero { display: none; } }

/* ---------------- Print ---------------- */
@media print {
  .sidebar, .topbar, .no-print, .alert { display: none !important; }
  .content { margin: 0 !important; padding: 0 !important; }
  body { background: #fff !important; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
.btn-group > .btn { font-weight: 600; }
.hero .btn-3d.btn-dark, .hero .btn-3d.btn-primary, .hero .btn-3d.btn-info, .hero .btn-3d.btn-purple { --b: transparent; --bh: rgba(255,255,255,.1); border-color: rgba(255,255,255,.55); --fg: #fff; }
.hero .btn-3d.btn-warning { --b: #fff; --bh: #fff7ea; }

/* ---------------- College Management (v19) ---------------- */
/* Academic calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-head { text-align: center; font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--muted); padding: 4px 0; }
.cal-cell { min-height: 64px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--surface); overflow: hidden; }
.cal-cell.empty-cell { background: transparent; border-style: dashed; }
.cal-off { background: var(--surface-2); color: var(--muted); }
.cal-holiday { background: var(--danger-soft); border-color: #f1b8b2; }
.cal-today { outline: 2px solid var(--primary); }
.cal-tag { font-size: .66rem; line-height: 1.2; color: var(--danger); font-weight: 600; }
.cal-tag-scoped { color: var(--warning); }
.cal-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; border: 1px solid var(--line-strong); }
.cal-key.cal-tag-scoped { background: var(--warning-soft); }
@media (max-width: 576px) { .cal-cell { min-height: 46px; padding: 2px 3px; } .cal-tag { display: none; } }

/* Messages */
.chat-card { display: flex; flex-direction: column; }
.chat-body { height: 56vh; min-height: 300px; overflow-y: auto; padding: 16px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.msg { display: flex; }
.msg-mine { justify-content: flex-end; }
.msg-bubble { max-width: 78%; padding: 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); word-wrap: break-word; }
.msg-mine .msg-bubble { background: var(--primary-soft); border-color: transparent; border-bottom-right-radius: 4px; }
.msg-theirs .msg-bubble { border-bottom-left-radius: 4px; }
.msg-meta { font-size: .7rem; color: var(--muted); margin-top: 2px; }
@media (max-width: 576px) { .msg-bubble { max-width: 92%; } .chat-body { height: 50vh; } }

/* Progress report (screen + print) */
.progress-report { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 10px; padding: 24px; font-size: .88rem; }
[data-theme="dark"] .progress-report { background: #fff; color: #111; }
.pr-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #1f3b64; padding-bottom: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.pr-inst { font-weight: 800; font-size: 1.15rem; color: #1f3b64; }
.pr-title { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.pr-h { font-weight: 700; color: #1f3b64; margin: 16px 0 6px; text-transform: uppercase; font-size: .75rem; letter-spacing: .06em; }
.pr-info, .pr-table { width: 100%; border-collapse: collapse; }
.pr-info th, .pr-info td, .pr-table th, .pr-table td { border: 1px solid #d5dbe5; padding: 4px 6px; vertical-align: top; }
.pr-info th, .pr-table thead th { background: #f1f4f9; font-weight: 600; }
.pr-table { font-size: .8rem; }
.pr-sub { font-size: .7rem; color: #64748b; }
.pr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pr-comment { border-left: 3px solid #b08d57; padding: 4px 8px; margin-bottom: 6px; background: #fbf8f2; }
.pr-sign { display: flex; justify-content: space-between; margin-top: 48px; gap: 12px; }
.pr-sign div { border-top: 1px solid #333; padding-top: 4px; min-width: 150px; text-align: center; font-size: .78rem; }
@media (max-width: 768px) { .pr-grid { grid-template-columns: 1fr; } .progress-report { padding: 12px; overflow-x: auto; } }
@media print {
  .d-print-none, .sticky-actions, .nav-tabs { display: none !important; }
  .card, .card-3d { box-shadow: none !important; border-color: #ccc !important; }
  .progress-report { border: none; padding: 0; }
  .table-danger, .table-warning { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.hero .badge { white-space: normal; text-align: left; }
.hero .small.fw-bold { word-break: break-word; }


/* ---------- v22: institutional logos, printable reports ---------- */
.auth-logos { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.auth-logo { background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 10px 24px -12px rgba(0,0,0,.45); }
.rep-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; border-bottom: 3px double #0b4f3c; padding-bottom: 10px; margin-bottom: 14px; }
.rep-head .rep-mid { text-align: center; }
.rep-head .rep-inst { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.35rem; color: #0b4f3c; line-height: 1.2; }
.rep-head .rep-aff { font-size: .8rem; color: #555; }
.rep-head .rep-title { font-weight: 700; font-size: 1.05rem; margin-top: 4px; }
.rep-head .rep-sub { font-size: .82rem; color: #555; }
.rep-head .rep-right { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.rep-head img { display: block; }
.print-page { background: #fff; }
.logo-tile { border: 1px dashed var(--line-strong, #cbd5e1); border-radius: 14px; padding: 14px; text-align: center; height: 100%; }
.logo-tile .logo-box { height: 96px; display: grid; place-items: center; margin-bottom: 10px; }
.logo-tile .logo-box img { max-height: 96px; max-width: 100%; width: auto; object-fit: contain; }
@media print { .rep-head { break-inside: avoid; } .print-page .container { max-width: none !important; } }
@media (max-width: 575px) { .rep-head { grid-template-columns: 1fr; text-align: center; } .rep-head img { margin: 0 auto; } .rep-head .rep-right { justify-content: center; } }

.print-only { display: none; }
@media print { .print-only { display: block !important; } }
.dash-logo { background: #fff; border-radius: 16px; padding: 5px; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); }
.class-tile { transition: transform .15s ease, box-shadow .15s ease; background: var(--surface, #fff); }
.class-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -16px rgba(15,23,42,.45); }
@media (prefers-reduced-motion: reduce) { .class-tile, .class-tile:hover { transition: none; transform: none; } }

/* developer credit (v24) */
.dev-credit { text-align: center; font-size: .78rem; line-height: 1.5; color: #6b7280; padding: 14px 12px 18px; }
.dev-credit b { color: #374151; font-weight: 600; }
.dev-credit .dc-q { opacity: .85; }
[data-theme="dark"] .dev-credit { color: #9ca3af; }
[data-theme="dark"] .dev-credit b { color: #e5e7eb; }
.auth-form { position: relative; flex-direction: column; }
.dc-auth { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 24px 14px; }
@media (max-height: 760px), (max-width: 900px) { .dc-auth { position: static; padding-top: 24px; } }

/* ---------- v25 messages ---------- */
.cm-wrap { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 18px; align-items: stretch; }
.cm-side { display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 150px); }
.cm-side-head { padding: 12px; border-bottom: 1px solid var(--line); }
.cm-list { overflow-y: auto; flex: 1; }
.cm-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; }
.cm-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cm-item.active { background: var(--primary-soft); color: inherit; border-color: var(--line); }
.cm-role { color: var(--muted); font-size: .72rem; }
.cm-av { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff; background: #64748b; }
.cm-av-admin { background: #b91c1c; } .cm-av-department { background: #0b4f3c; } .cm-av-teacher { background: #b45309; } .cm-av-student { background: #2563eb; }
.cm-results { max-height: 280px; overflow-y: auto; }
.cm-results .list-group-item { padding: 8px 6px; }
.cm-main { min-height: 520px; max-height: calc(100vh - 150px); }
.cm-main .chat-body { flex: 1; height: auto; min-height: 260px; }
.cm-head { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cm-compose { padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.cm-compose textarea { resize: none; min-height: 40px; }
.cm-icon { width: 42px; height: 40px; display: inline-grid; place-items: center; padding: 0; flex: 0 0 auto; }
.cm-icon.rec-on { background: #dc2626; color: #fff; animation: cmPulse 1.2s infinite; }
@keyframes cmPulse { 50% { box-shadow: 0 0 0 6px rgba(220,38,38,.25); } }
.cm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.cm-chips:empty { display: none; }
.cm-chip { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .78rem; }
.cm-chip button { border: 0; background: none; padding: 0 0 0 4px; color: var(--muted); }
.msg-img img { display: block; max-width: 240px; max-height: 220px; border-radius: 10px; margin-top: 6px; object-fit: cover; }
.msg-file { display: flex; gap: 8px; align-items: center; margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: rgba(0,0,0,.05); color: inherit; text-decoration: none; max-width: 280px; }
.msg-file i { font-size: 1.4rem; }
.msg-file span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; font-size: .85rem; }
.msg-file small { color: var(--muted); }
.msg-st.st-read { color: #2563eb; font-weight: 600; }
.msg-st.st-delivered { color: var(--muted); }
.min-w-0 { min-width: 0; }
@media (max-width: 991.98px) {
  .cm-wrap { grid-template-columns: 1fr; }
  .cm-wrap.has-conv .cm-side { display: none; }
  .cm-wrap:not(.has-conv) .cm-main { display: none; }
  .cm-side, .cm-main { max-height: none; }
  .cm-main { min-height: calc(100vh - 170px); }
}
.role-tabs { grid-template-columns: repeat(3, 1fr); }   /* v25: six portals (student, teacher, department, partner, website, admin) */
.role-pill.role-department { background: rgba(11,79,60,.25); }
/* v26 training videos (admin) */
.vid-admin-thumb { width: 112px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; box-shadow: 0 3px 0 rgba(0,0,0,.12); background: #0b4f3c; }
.vid-admin-prev { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg,#0b4f3c,#06261c); box-shadow: 0 5px 0 rgba(0,0,0,.12), 0 14px 24px -12px rgba(0,0,0,.4); }
.vid-admin-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-admin-prev img:not([src]) { visibility: hidden; }
.vid-admin-prev span { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: #c81e1e; color: #fff; display: grid; place-items: center; font-size: 1.8rem; box-shadow: 0 4px 0 #7f1414; }

/* =====================================================================
   v29 Side panel — clean, light, professional
   Same markup & class names as v26 (groups, search, mini mode, user card),
   restyled: white surface, outline icons, soft hover, tinted active item.
   ===================================================================== */
:root {
  --sw: 268px;
  --sb-bg: #ffffff; --sb-line: #e6eae7; --sb-ink: #3a434d; --sb-ink-strong: #1d252c;
  --sb-icon: #7a8490; --sb-muted: #97a0a9; --sb-hover: #f3f6f4; --sb-field: #f5f7f6;
  --sb-active-bg: #e7f1ec; --sb-active-ink: #0e5a43; --sb-active-bar: #0e5a43;
  --sb-shadow: 1px 0 0 var(--sb-line), 8px 0 24px -20px rgba(15,35,28,.25);
}
[data-theme="dark"] {
  --sb-bg: #0f1a16; --sb-line: #1f2e28; --sb-ink: #c3d0c9; --sb-ink-strong: #eef4f0;
  --sb-icon: #8a9d94; --sb-muted: #71857c; --sb-hover: rgba(255,255,255,.045); --sb-field: #13211c;
  --sb-active-bg: rgba(124,196,165,.13); --sb-active-ink: #9fd6bd; --sb-active-bar: #7cc4a5;
  --sb-shadow: 1px 0 0 var(--sb-line);
}
.sidebar.sb3d { display: flex; flex-direction: column; padding: 18px 14px 14px; background: var(--sb-bg); color: var(--sb-ink);
  border-right: 0; box-shadow: var(--sb-shadow); scrollbar-width: thin; scrollbar-color: transparent transparent;
  transition: transform .28s cubic-bezier(.4,0,.2,1), width .25s ease; }
.sidebar.sb3d:hover { scrollbar-color: rgba(120,132,144,.35) transparent; }
.sb3d::-webkit-scrollbar { width: 6px; } .sb3d::-webkit-scrollbar-thumb { background: transparent; border-radius: 6px; }
.sb3d:hover::-webkit-scrollbar-thumb { background: rgba(120,132,144,.35); }

/* brand */
.sb3d .sb-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 14px; margin-bottom: 14px; border-bottom: 1px solid var(--sb-line); }
.sb3d .brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 2px; color: var(--sb-ink-strong); font-weight: 700;
  background: none; border: 0; box-shadow: none; border-radius: 10px; }
.sb3d .brand:hover { color: var(--sb-ink-strong); text-decoration: none; }
.sb3d .brand img { height: 40px; max-width: 46px; padding: 2px; border-radius: 10px; background: #fff; border: 1px solid var(--sb-line); box-shadow: none; }
.sb3d .brand-mark { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); }
.sb3d .brand-text { font-size: .84rem; line-height: 1.28; letter-spacing: -.005em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.sb-mini-btn { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--sb-icon);
  background: transparent; border: 1px solid var(--sb-line); box-shadow: none; transition: background .18s, color .18s, border-color .18s; }
.sb-mini-btn:hover { color: var(--sb-ink-strong); background: var(--sb-hover); }
.sb-mini-btn i { font-size: .8rem; transition: transform .25s ease; }

.sb-head-tools { flex: none; display: flex; flex-direction: column; gap: 4px; }
.sb-edit-btn i { font-size: .78rem; }
/* quick name & logo dialog */
.brand-modal .modal-content { border: 1px solid var(--line); border-radius: 14px; }
.brand-modal .modal-header, .brand-modal .modal-footer { border-color: var(--line); }
.bm-preview { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.bm-logo { width: 76px; height: 76px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: #fff; overflow: hidden; color: #fff; font-size: 1.8rem; }
.bm-logo img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 4px; }
.bm-logo i { width: 100%; height: 100%; display: grid; place-items: center; background: var(--primary); }

/* role + search */
.sb3d .role-pill { align-self: flex-start; margin: 0 4px 12px; padding: 4px 10px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em;
  background: var(--accent-soft); color: #7a5c1c; border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
[data-theme="dark"] .sb3d .role-pill { color: #e2c98d; }
.sb-search { position: relative; margin: 0 2px 8px; }
.sb-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--sb-muted); font-size: .85rem; pointer-events: none; }
.sb-search input { width: 100%; padding: 8px 12px 8px 34px; border-radius: 10px; font-size: .84rem; color: var(--sb-ink-strong); outline: none;
  background: var(--sb-field); border: 1px solid var(--sb-line); box-shadow: none; transition: border-color .18s, box-shadow .18s, background .18s; }
.sb-search input::placeholder { color: var(--sb-muted); }
.sb-search input:focus { background: var(--sb-bg); border-color: color-mix(in srgb, var(--sb-active-bar) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sb-active-bar) 14%, transparent); }

/* groups */
.sb3d .side-nav { flex: 1; padding: 0 2px; }
.sb3d .nav-section { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; background: none; cursor: pointer;
  margin: 16px 0 4px; padding: 4px 12px; border-radius: 6px; font-size: .67rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sb-muted);
  transition: color .18s; }
.sb3d .nav-group:first-child .nav-section { margin-top: 6px; }
.sb3d .nav-section:hover { color: var(--sb-ink); }
.sb3d .nav-section:focus-visible { outline: 2px solid var(--sb-active-bar); outline-offset: 1px; }
.sb3d .nav-section i { font-size: .65rem; opacity: .7; transition: transform .22s ease; }
.sb3d .nav-group.collapsed .nav-section i { transform: rotate(-90deg); }
.sb3d .nav-items { display: grid; gap: 2px; }
.sb3d .nav-group.collapsed .nav-items { display: none; }

/* menu item — flat, like the reference */
.sb3d .side-nav a { display: flex; align-items: center; gap: 13px; margin: 0; padding: 9px 12px; border-radius: 10px; position: relative;
  color: var(--sb-ink); font-weight: 600; font-size: .875rem; line-height: 1.3; text-decoration: none;
  background: transparent; border: 0; box-shadow: none; transform: none;
  transition: background .18s ease, color .18s ease; }
.sb3d .side-nav a .chip { width: 22px; height: 22px; border-radius: 0; font-size: 1.12rem; display: grid; place-items: center; flex: none;
  background: none !important; box-shadow: none !important; text-shadow: none; color: var(--sb-icon) !important; transition: color .18s ease, transform .18s ease; }
.sb3d .side-nav a .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb3d .side-nav a:hover { background: var(--sb-hover); color: var(--sb-ink-strong); transform: none; box-shadow: none; text-decoration: none; }
.sb3d .side-nav a:hover .chip { color: var(--c2, var(--sb-ink-strong)) !important; transform: translateX(1px); }
[data-theme="dark"] .sb3d .side-nav a:hover .chip { color: var(--c1, var(--sb-ink-strong)) !important; }
.sb3d .side-nav a:active { background: color-mix(in srgb, var(--sb-hover) 60%, var(--sb-line)); transform: none; box-shadow: none; }
.sb3d .side-nav a:focus-visible { outline: 2px solid var(--sb-active-bar); outline-offset: 1px; }
.sb3d .side-nav a.active { background: var(--sb-active-bg); color: var(--sb-active-ink); font-weight: 700; border: 0; box-shadow: none; }
.sb3d .side-nav a.active .chip { color: var(--sb-active-ink) !important; box-shadow: none !important; }
.sb3d .side-nav a.active::before { display: block; content: ""; position: absolute; left: -2px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--sb-active-bar); }
.sb3d .nav-badge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; font-size: .68rem; font-weight: 700; text-align: center;
  background: var(--danger-soft); color: var(--danger); box-shadow: none; }
[data-theme="dark"] .sb3d .nav-badge { color: #f19a92; }
.sb3d .side-nav a.sb-hidden, .sb3d .nav-group.sb-hidden { display: none !important; }
.sb-empty { font-size: .8rem; color: var(--sb-muted); padding: 12px; }

/* user card */
.sb-user { display: flex; align-items: center; gap: 10px; margin: 14px -2px 0; padding: 12px 6px 2px; border-top: 1px solid var(--sb-line);
  background: none; border-radius: 0; box-shadow: none; }
.sb-avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  color: var(--sb-active-ink); background: var(--sb-active-bg); box-shadow: none; }
.sb-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sb-who b { color: var(--sb-ink-strong); font-size: .83rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-who small { color: var(--sb-muted); font-size: .71rem; }
.sb-ubtn { width: 32px; height: 32px; flex: none; border-radius: 8px; display: grid; place-items: center; color: var(--sb-icon); text-decoration: none;
  background: transparent; border: 1px solid transparent; box-shadow: none; transition: background .18s, color .18s; }
.sb-ubtn:hover { background: var(--sb-hover); color: var(--sb-ink-strong); text-decoration: none; transform: none; }
.sb-ubtn:active { transform: none; box-shadow: none; }
.sb-ubtn.sb-out:hover { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

/* mini (icons only) — desktop */
@media (min-width: 992px) {
  body.sb-mini { --sw: 76px; }
  body.sb-mini .sb3d { padding: 16px 10px 12px; overflow-x: hidden; }
  body.sb-mini .sb3d .sb-head { flex-direction: column; gap: 10px; padding-bottom: 12px; }
  body.sb-mini .sb3d .brand { justify-content: center; }
  body.sb-mini .sb3d .brand-text, body.sb-mini .sb3d .role-pill span, body.sb-mini .sb3d .sb-search, body.sb-mini .sb3d .lbl,
  body.sb-mini .sb3d .nav-section span, body.sb-mini .sb3d .sb-who, body.sb-mini .sb3d .sb-ubtn:not(.sb-out) { display: none; }
  body.sb-mini .sb3d .role-pill { align-self: center; margin: 0 0 8px; padding: 4px 8px; }
  body.sb-mini .sb3d .nav-section { justify-content: center; margin: 10px 0 6px; padding: 0; pointer-events: none; }
  body.sb-mini .sb3d .nav-section::before { content: ""; width: 24px; height: 1px; background: var(--sb-line); }
  body.sb-mini .sb3d .nav-group:first-child .nav-section { display: none; }
  body.sb-mini .sb3d .nav-section i { display: none; }
  body.sb-mini .sb3d .nav-group.collapsed .nav-items { display: grid; }
  body.sb-mini .sb3d .side-nav a { justify-content: center; padding: 10px; }
  body.sb-mini .sb3d .side-nav a.active::before { left: -10px; }
  body.sb-mini .sb3d .nav-badge { position: absolute; top: 3px; right: 3px; min-width: 0; padding: 0 5px; font-size: .6rem; background: var(--danger); color: #fff; }
  body.sb-mini .sb3d .sb-user { flex-direction: column; padding: 12px 0 0; margin: 12px 0 0; }
  body.sb-mini .sb-mini-btn i { transform: rotate(180deg); }
  body.sb-mini .sb-edit-btn { display: none; }
  .sidebar, .topbar, .content { transition: width .25s ease, margin-left .25s ease; }
}
/* tablet & phone: off-canvas drawer */
@media (max-width: 991.98px) {
  .sb-mini-btn:not(.sb-edit-btn) { display: none; }
  .sidebar.sb3d { width: min(84vw, 296px); box-shadow: none; }
  body.sidebar-open .sidebar.sb3d { box-shadow: 0 0 0 1px var(--sb-line), 24px 0 48px -16px rgba(15,35,28,.35); }
  body.sidebar-open .sidebar-backdrop { background: rgba(15,23,20,.38); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
  .sb3d .side-nav a { padding: 11px 12px; }   /* larger touch targets */
}
@media (prefers-reduced-motion: reduce) {
  .sidebar.sb3d, .sb3d .side-nav a, .sb3d .side-nav a .chip, .sb3d .nav-section i { transition: none; }
}

/* ---------- v27 website builder: live preview, setup wizard ---------- */
.preview-stage { background: repeating-linear-gradient(45deg, #eef1f5, #eef1f5 10px, #e6eaf0 10px, #e6eaf0 20px); padding: 12px; border-radius: 0 0 14px 14px; }
.preview-stage iframe { display: block; width: 100%; height: 72vh; min-height: 480px; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 10px 30px -14px rgba(0,0,0,.45); transition: width .3s ease; margin: 0 auto; }
.preview-stage.pv-mobile iframe { width: 390px; max-width: 100%; height: 720px; border: 10px solid #1f2937; border-radius: 28px; }
.pf-swatch { width: 22px; height: 22px; border-radius: 6px; flex: none; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.theme-pick { height: 100%; border-radius: 12px; }
.btn-check:checked + .theme-pick { border-color: var(--bs-primary); box-shadow: 0 0 0 3px rgba(52,86,244,.25); background: #f4f6ff; color: inherit; }
.menu-table .menu-child td:first-child { padding-left: 28px; }
.menu-table .menu-top { background: #f8fafc; }
.wiz-steps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.wiz-step { flex: 1 0 86px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: #475569; font-size: .76rem; font-weight: 600; text-align: center; padding: 10px 6px 8px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0; position: relative; transition: transform .15s, box-shadow .15s; }
.wiz-step:hover { transform: translateY(-2px); box-shadow: 0 8px 18px -12px rgba(0,0,0,.35); color: #1e293b; }
.wiz-step .wn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; background: #e2e8f0; color: #334155; box-shadow: 0 3px 0 #cbd5e1; }
.wiz-step.done .wn { background: #16a34a; color: #fff; box-shadow: 0 3px 0 #15803d; }
.wiz-step.todo-req .wn { background: #fef3c7; color: #92400e; box-shadow: 0 3px 0 #f59e0b; }
.wiz-step.current { border-color: #3456f4; box-shadow: 0 0 0 3px rgba(52,86,244,.18); color: #1e293b; }
.wiz-step.current .wn { background: #3456f4; color: #fff; box-shadow: 0 3px 0 #1e3a8a; }
.wiz-missing { border-left: 4px solid #f59e0b; background: #fffbeb; border-radius: 10px; padding: 10px 14px; }
.wiz-req::after { content: " *"; color: #dc2626; }
.wiz-item { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; background: #fff; }
.wiz-item img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.pv-pair { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.pv-pair .pv-desk { width: 100%; height: 620px; border: 0; border-radius: 10px; box-shadow: 0 10px 30px -14px rgba(0,0,0,.45); background: #fff; }
.pv-pair .pv-mob { width: 360px; height: 680px; border: 10px solid #1f2937; border-radius: 28px; background: #fff; }
@media (max-width: 1199px) { .pv-pair { grid-template-columns: 1fr; } .pv-pair .pv-mob { margin: 0 auto; max-width: 100%; } }
.theme-pick { color: #1e293b; background: #fff; }
.theme-pick:hover { color: #1e293b; background: #f8fafc; }

/* ---------- v28 Digital lecture delivery ---------- */
.btn-live-start, .btn-live-join { --b: #dc2626; --b2: #991b1b; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; border: 0; cursor: pointer;
  padding: 1rem 2.1rem; border-radius: 16px; font-size: 1.2rem; font-weight: 800; letter-spacing: .01em; color: #fff !important; text-decoration: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--b) 80%, #fff), var(--b)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 0 var(--b2), 0 18px 30px -12px color-mix(in srgb, var(--b) 80%, transparent);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s; }
.btn-live-join { --b: #16a34a; --b2: #166534; }
.btn-live-start:hover, .btn-live-join:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-live-start:active, .btn-live-join:active { transform: translateY(5px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 0 var(--b2); }
.btn-live-start:disabled { filter: grayscale(.8); opacity: .6; cursor: not-allowed; transform: none; }
.btn-live-start.btn-sm-live, .btn-live-join.btn-sm-live { padding: .55rem 1.1rem; font-size: .95rem; border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 0 var(--b2); }
.btn-live-join.opened { --b: #475569; --b2: #1e293b; }
.live-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; background: linear-gradient(145deg, #f87171, #dc2626); box-shadow: 0 4px 0 #991b1b; }
.live-stage { position: relative; min-height: 64vh; background: #0f172a; overflow: hidden; border-radius: 18px; }
.live-stage:fullscreen { border-radius: 0; }
.live-cover { min-height: 64vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #fff; padding: 30px;
  background: radial-gradient(circle at 30% 20%, #1e3a8a, #0f172a 70%); }
.live-jitsi { position: absolute; inset: 0; }
.live-pulse { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: #fff; background: rgba(220,38,38,.9); animation: livePulse 1.8s infinite; }
.live-wait .live-pulse { background: #3456f4; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.55); } 70% { box-shadow: 0 0 0 22px rgba(220,38,38,0); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } }
.live-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.lc-btn { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 82px; padding: 9px 10px 7px; border: 0; border-radius: 14px; font-size: .74rem; font-weight: 700; color: #1e293b;
  background: linear-gradient(180deg, #fff, #e2e8f0); box-shadow: inset 0 1px 0 #fff, 0 4px 0 #94a3b8, 0 10px 16px -10px rgba(0,0,0,.4); transition: transform .12s, box-shadow .12s; }
.lc-btn i { font-size: 1.25rem; }
.lc-btn:hover:not(:disabled) { transform: translateY(-2px); }
.lc-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 1px 0 #fff, 0 1px 0 #94a3b8; }
.lc-btn:disabled { opacity: .45; }
.lc-btn.off, .lc-btn.active { background: linear-gradient(180deg, #fde68a, #f59e0b); box-shadow: inset 0 1px 0 #fff7, 0 4px 0 #b45309; }
.lc-btn.lc-leave { background: linear-gradient(180deg, #fecaca, #f87171); box-shadow: 0 4px 0 #b91c1c; }
.lc-btn.lc-end { color: #fff; background: linear-gradient(180deg, #f87171, #dc2626); box-shadow: 0 4px 0 #991b1b; }
.presence { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #f1f5f9; color: #64748b; white-space: nowrap; }
.presence i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; display: inline-block; }
.presence.on { background: #dcfce7; color: #166534; } .presence.on i { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.25); }
.presence.live { background: #fee2e2; color: #991b1b; } .presence.live i { background: #dc2626; animation: livePulse 1.8s infinite; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; display: inline-block; margin-right: 5px; animation: livePulse 1.8s infinite; }
.live-card { border-left: 5px solid #dc2626 !important; }
.live-card.st-scheduled { border-left-color: #3456f4 !important; } .live-card.st-completed { border-left-color: #16a34a !important; } .live-card.st-cancelled, .live-card.st-missed { border-left-color: #94a3b8 !important; }
.live-plist { max-height: 46vh; overflow-y: auto; }
.teacher-tile { border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px 14px; background: #fff; height: 100%; }
body.live-guest { background: #f1f5f9; }
@media (max-width: 575px) { .live-stage, .live-cover { min-height: 56vh; } .lc-btn { min-width: 66px; } .btn-live-start, .btn-live-join { font-size: 1.05rem; padding: .9rem 1.4rem; } }
.pf-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; color: #fff; background: var(--c); box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 60%, #000); flex: none; }

/* ---------- v29 install as an app ---------- */
.pwa-modal .modal-header{gap:12px}
.pwa-ico{width:44px;height:44px;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,.18)}
.pwa-steps{padding-left:1.2rem;margin-bottom:.5rem}.pwa-steps li{margin-bottom:.45rem}
.pwa-page{background:#f2f5f4;min-height:100vh}
.pwa-big{width:112px;height:112px;border-radius:26px;box-shadow:0 8px 22px -8px rgba(0,0,0,.45)}
.pwa-qr svg{width:150px;height:150px;display:block}
.is-app .pwa-install{display:none!important}
