:root {
  --navy: #0a1628;
  --navy-2: #12243f;
  --crimson: #c8102e;
  --crimson-d: #9b0d24;
  --gold: #d4a017;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1a2332;
  --muted: #5c6b80;
  --line: #e2e8f0;
  --ok: #0f7b4c;
  --warn: #b45309;
  --shadow: 0 10px 30px rgba(10, 22, 40, 0.08);
  --radius: 14px;
  --sidebar: 260px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Manrope, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  background: linear-gradient(180deg, var(--navy) 0%, #07101c 100%);
  color: #fff;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 20px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--crimson); display: grid; place-items: center;
  font-weight: 800; letter-spacing: .5px;
}
.brand h1 { font-size: 15px; margin: 0; line-height: 1.2; }
.brand p { margin: 0; font-size: 11px; opacity: .7; }
.nav a, .nav button.nav-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left; background: none; border: 0; color: #d7dee8;
  padding: 10px 12px; border-radius: 10px; cursor: pointer; text-decoration: none;
}
.nav a:hover, .nav button.nav-link:hover, .nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.nav .section { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; opacity: .45; padding: 16px 12px 6px; }
.sidebar .userbox { margin-top: auto; padding: 12px; background: rgba(255,255,255,.06); border-radius: 12px; }
.sidebar .userbox strong { display: block; font-size: 13px; }
.sidebar .userbox span { font-size: 11px; opacity: .7; }
.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 28px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.topbar h2 { margin: 0; font-size: 18px; }
.content { padding: 24px 28px 48px; }
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.stat { padding: 18px; }
.stat .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.stat .value { font-size: 28px; font-weight: 700; margin-top: 6px; color: var(--navy); }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: #e8eef7; color: var(--navy);
}
.badge.ok { background: #d9f5e7; color: var(--ok); }
.badge.warn { background: #fde9d0; color: var(--warn); }
.badge.bad { background: #fde2e7; color: var(--crimson); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-size: 12px; font-weight: 600; }
.btn {
  border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 600;
  background: var(--navy); color: #fff;
}
.btn.crimson { background: var(--crimson); }
.btn.ghost { background: #eef2f7; color: var(--navy); }
.btn.small { padding: 7px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff;
}
.auth-page {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
}
.auth-hero {
  background: linear-gradient(160deg, var(--navy), #16325a 55%, var(--crimson));
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero h1 { font-size: 42px; line-height: 1.1; margin: 12px 0; }
.auth-panel { display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(420px, 100%); }
.course-card h3 { margin: 0 0 6px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.module { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.module summary { padding: 12px 14px; cursor: pointer; font-weight: 600; background: #f8fafc; }
.module .inner { padding: 12px 14px; }
.content-item { padding: 8px 0; border-bottom: 1px dashed var(--line); }
iframe.video { width: 100%; height: 280px; border: 0; border-radius: 10px; }
.forum-post { padding: 12px; background: #f8fafc; border-radius: 10px; margin-bottom: 8px; }
.hidden { display: none !important; }
.toast {
  position: fixed; right: 20px; bottom: 20px; background: var(--navy); color: #fff;
  padding: 12px 16px; border-radius: 10px; display: none; z-index: 20;
}
@media (max-width: 960px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .grid.cols-4, .grid.cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
}

h1, h2, h3, .brand h1, .topbar h2 { font-family: Sora, Manrope, sans-serif; }
.brand-mark { background: #fff; padding: 4px; }
.brand-mark img { width: 34px; height: 34px; object-fit: contain; display: block; }

h1, h2, h3, .brand h1, .topbar h2 { font-family: Sora, Manrope, sans-serif; }
.brand-mark { background: #fff; padding: 4px; overflow: hidden; }
.brand-mark img { width: 34px; height: 34px; object-fit: contain; display: block; }
.nav button.nav-link.active { background: var(--crimson); color: #fff; }

.topbar { backdrop-filter: saturate(1.2); }
.topbar .meta { text-align: right; font-size: 12px; color: var(--muted); }
.hero {
  background:
    radial-gradient(800px 200px at 90% -20%, rgba(200,16,46,.35), transparent 50%),
    linear-gradient(125deg, #07101c 0%, #12243f 55%, #1a3358 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 18px 40px rgba(10,22,40,.22);
  padding: 22px 24px;
}
.hero h2 { margin: 4px 0 8px; font-size: 26px; letter-spacing: -.02em; color: #fff; }
.hero .kicker { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #f0c9cf; }
.hero p { color: #c5d0df; margin: 0; font-size: 14px; max-width: 720px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.kpi {
  position: relative; overflow: hidden; min-height: 108px;
}
.kpi::after {
  content: ""; position: absolute; right: -18px; top: -18px; width: 88px; height: 88px;
  border-radius: 50%; background: rgba(200,16,46,.08);
}
.kpi .label { font-family: Sora, sans-serif; }
.kpi .value { font-family: Sora, sans-serif; font-size: 30px; letter-spacing: -.03em; }
.kpi .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.panel-title h3 { margin: 0; font-size: 15px; }
.feed-item { display: grid; grid-template-columns: 10px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--crimson); margin-top: 6px; }
.dot.navy { background: var(--navy); }
.dot.gold { background: var(--gold); }
.dot.ok { background: var(--ok); }
.cmd { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cmd button { width: 100%; justify-content: center; }
.table thead th { font-family: Sora, sans-serif; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 1100px) {
  .cmd { grid-template-columns: repeat(3, 1fr); }
}

.brand-logo { width: 56px; height: 56px; object-fit: contain; background: transparent; border-radius: 10px; padding: 0; }
.auth-crest { width: 230px; height: 230px; object-fit: contain; background: transparent; border-radius: 24px; padding: 0; margin-bottom: 22px; box-shadow: 0 14px 36px rgba(0,0,0,.28); display: block; }
.auth-card-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.auth-card-brand img { width: 48px; height: 48px; object-fit: contain; }
.auth-page { min-height: 100vh; }
.auth-hero h1 { font-family: Sora, Manrope, sans-serif; font-size: 40px; letter-spacing: -.03em; }
.btn { letter-spacing: .01em; }
.btn.crimson { box-shadow: 0 8px 18px rgba(200,16,46,.25); }
input, select, textarea {
  border-radius: 10px !important;
  border-color: #d5dee8 !important;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(10,22,40,.15);
  border-color: #0a1628 !important;
}
.table { border-radius: 12px; overflow: hidden; }
.content-item { border-radius: 10px; }
.auth-hero {
  background:
    radial-gradient(600px 240px at 20% 0%, rgba(200,16,46,.28), transparent 55%),
    linear-gradient(165deg, #07101c, #12243f 60%, #0a1628);
}

.auth-hero {
  background:
    linear-gradient(165deg, rgba(7,16,28,.82), rgba(10,22,40,.72)),
    url("../assets/hero.webp") center/cover no-repeat !important;
}
.hero {
  background:
    linear-gradient(125deg, rgba(7,16,28,.88), rgba(18,36,63,.72)),
    url("../assets/campus.webp") right center/cover no-repeat !important;
}
.course-card { overflow: hidden; padding-top: 0; }
.course-photo {
  height: 110px; margin: -18px -18px 12px; background: #12243f center/cover no-repeat;
}
.course-photo.computing { background-image: url("../assets/computing.webp"); }
.course-photo.health { background-image: url("../assets/health.webp"); }
.course-photo.medicine { background-image: url("../assets/medicine.webp"); }
.course-photo.campus { background-image: url("../assets/campus.webp"); }
.course-photo.hub { background-image: url("../assets/hub.webp"); }
.photo-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.photo-row img { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; display: block; }
.accredit { display: flex; gap: 16px; align-items: center; margin-top: 18px; }
.accredit img { height: 42px; width: auto; background: #fff; border-radius: 8px; padding: 4px; }
.auth-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.auth-strip img { width: 100%; height: 90px; object-fit: cover; border-radius: 10px; }
@media (max-width: 900px) { .photo-row { grid-template-columns: 1fr 1fr; } }
.search-bar { display: flex; gap: 8px; flex: 1; max-width: 420px; margin: 0 18px; }
.search-bar input[type="search"] {
  flex: 1; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: #f4f6f9;
}
@media (max-width: 900px) {
  .search-bar { display: none; }
}
.transcript-doc {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 32px 40px;
  overflow: hidden;
}
.transcript-watermark {
  position: absolute; inset: 18% 12% 22%;
  background-repeat: no-repeat; background-position: center; background-size: contain;
  opacity: .07; pointer-events: none;
}
.letterhead { display: flex; gap: 16px; align-items: center; border-bottom: 3px solid #c8102e; padding-bottom: 14px; }
.letterhead img { width: 88px; height: auto; }
.letterhead h1 { margin: 0; font-family: Sora, Manrope, sans-serif; font-size: 22px; color: #0a1628; }
.letterhead p { margin: 2px 0; font-size: 12px; color: #5c6b80; }
.transcript-title { text-align: center; letter-spacing: .12em; text-transform: uppercase; font-size: 16px; margin: 18px 0 6px; }
.id-block { width: 100%; border-collapse: collapse; margin: 12px 0 16px; font-size: 13px; }
.id-block th { text-align: left; width: 18%; color: #5c6b80; padding: 4px 8px; }
.id-block td { padding: 4px 8px; }
.transcript-sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 56px; page-break-inside: avoid; }
.sign-date { text-align: center; flex: 1; font-size: 13px; }
.sign-line { text-align: center; min-width: 240px; }
.sign-space { height: 54px; border-bottom: 1px solid #0a1628; margin-bottom: 8px; }
.sign-line span { display: block; font-size: 12px; color: #5c6b80; }
@media print {
  .sidebar, .topbar, .no-print, .toast { display: none !important; }
  .app-shell, .main, .content { display: block; padding: 0; margin: 0; }
  .transcript-doc { box-shadow: none; border: 0; }
  .transcript-watermark { opacity: .08; }
}
.portal-btn { position: relative; z-index: 3; pointer-events: auto; text-decoration: none; }
.hero-actions .btn { color: #fff; }
.letterhead { align-items: flex-start; }
.student-photo { margin-left: auto; text-align: center; min-width: 96px; }
.student-photo img { width: 96px; height: 112px; object-fit: cover; border: 1px solid #c9d2de; background: #fff; }
.student-photo span { display: block; font-size: 10px; color: #5c6b80; margin-top: 4px; }
.photo-fallback { width: 96px; height: 112px; display: grid; place-items: center; background: #0a1628; color: #fff; font-family: Sora, sans-serif; font-size: 22px; }
.menu-toggle { display: none; border: 0; background: #0a1628; color: #fff; width: 40px; height: 40px; border-radius: 10px; margin-right: 10px; }
.topbar { flex-wrap: wrap; gap: 10px; }
.search-bar { min-width: 180px; }
@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; place-items: center; }
  .sidebar { display: none; }
  .sidebar.open { display: flex; }
  .search-bar { display: flex !important; max-width: none; margin: 8px 0 0; order: 4; width: 100%; }
  .topbar .meta { display: none; }
  .auth-hero { display: block !important; min-height: 220px; padding: 24px; }
  .auth-crest { width: 230px; height: 230px; object-fit: contain; background: transparent; border-radius: 24px; padding: 0; margin-bottom: 22px; box-shadow: 0 14px 36px rgba(0,0,0,.28); display: block; }
  .letterhead { flex-wrap: wrap; }
  .student-photo { margin-left: 0; }
  .cmd { grid-template-columns: 1fr 1fr; }
  .transcript-sign { flex-direction: column; gap: 24px; align-items: center; }
}
@media (max-width: 640px) {
  .hero h2 { font-size: 22px; }
  .photo-row { grid-template-columns: 1fr 1fr; }
  .photo-row img { height: 88px; }
}
.student-id { display: flex; gap: 16px; align-items: center; margin-bottom: 4px; }
.student-id .student-photo img, .student-id .photo-fallback { width: 84px; height: 96px; }
@media (max-width: 640px) {
  .student-id { flex-direction: column; align-items: flex-start; }
  .student-id .row { width: 100%; }
  .student-id .btn { flex: 1; }
}

.auth-crest, .brand-logo, .auth-card-brand img, .letterhead img { background: transparent !important; box-shadow: none !important; }
.pay-ico { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.pay-ico.ok { background: #d9f5e7; color: #0f7b4c; }
.pay-ico.warn { background: #fff4e0; color: #b45309; }
.pay-ico.bad { background: #fde8ec; color: #c8102e; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  .pay-table, .pay-table thead, .pay-table tbody, .pay-table tr, .pay-table td { display: block; width: 100%; }
  .pay-table thead { display: none; }
  .pay-table tr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 8px 10px; background: #fff; }
  .pay-table td { border: 0; display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; text-align: right; }
  .pay-table td::before { content: attr(data-label); font-weight: 700; color: var(--muted); text-align: left; font-size: 12px; }
}

@media (max-width: 960px) {
  .sidebar { width: 100%; height: auto; position: relative; }
  .sidebar:not(.open) { display: none; }
  .sidebar.open { display: flex; height: auto; max-height: 70vh; overflow: auto; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .main { width: 100%; }
  .topbar { padding: 12px 14px; }
  .content { padding: 14px; }
  .grid.cols-4, .grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .hero { padding: 16px; }
  .hero h2 { font-size: 22px; }
  .photo-row { grid-template-columns: 1fr 1fr; }
  .cmd { grid-template-columns: 1fr 1fr; }
  .student-id { flex-direction: column; align-items: flex-start; }
  .search-bar { display: flex !important; width: 100%; max-width: none; margin: 8px 0 0; order: 5; }
}
@media (max-width: 640px) {
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .kpi .value { font-size: 24px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .student-id .btn { width: 100%; }
  .panel-title { flex-direction: column; align-items: flex-start; gap: 8px; }
  .photo-row img { height: 88px; }
  .accredit { flex-wrap: wrap; }
  .auth-crest { width: 230px; height: 230px; }
  .letterhead { flex-direction: column; }
  .letterhead img { width: 120px; height: 120px; }
}
.pay-cards { display: none; }
.pay-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.pay-card strong { display: block; margin-bottom: 4px; }
.pay-card div { margin-top: 4px; font-size: 14px; }
@media (max-width: 800px) {
  .pay-table { display: none !important; }
  .pay-cards { display: block !important; }
  .table-wrap { overflow: visible; }
}
.health-modal { position: fixed; inset: 0; background: rgba(7,16,28,.55); display: grid; place-items: center; z-index: 40; padding: 16px; }
.health-card { background: #fff; border-radius: 16px; padding: 22px; max-width: 420px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.health-card h2 { margin: 0 0 8px; font-family: Sora, sans-serif; color: #c8102e; letter-spacing: .04em; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.res-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.res-code { font-family: Sora, sans-serif; color: #c8102e; font-size: 12px; letter-spacing: .06em; }
.sidebar .nav { overflow: auto; flex: 1; }

.auth-hero { display: flex; align-items: center; }
.auth-hero > div { width: 100%; }
.auth-crest { width: 230px; height: 230px; object-fit: contain; object-position: center; margin: 0 auto 16px; display: block; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 120px; height: 48px; object-fit: contain; object-position: left center; }
.letterhead { align-items: center; }
.letterhead img { width: 180px; height: auto; max-height: 64px; object-fit: contain; object-position: left center; }
@media (max-width: 640px) {
  .auth-crest { width: 230px; height: 120px; }
  .letterhead { flex-direction: row; align-items: center; }
  .letterhead img { width: 140px; height: auto; }
}

.auth-crest {
  width: min(230px, 70vw) !important;
  height: auto !important;
  max-height: 120px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto 16px;
  display: block;
}
.brand-logo { width: 120px; height: 48px; object-fit: contain; object-position: left center; }
.letterhead img { width: min(180px, 46vw); height: auto !important; max-height: 64px; object-fit: contain; }
@media (max-width: 640px) {
  .auth-crest { width: min(230px, 70vw) !important; height: auto !important; max-height: 72px; }
  .brand-logo { width: 96px; height: 36px; }
  .letterhead { flex-direction: row; align-items: center; }
  .letterhead img { width: min(140px, 42vw); height: auto !important; max-height: 48px; }
}

.auth-crest {
  width: min(320px, 86vw) !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain;
  object-position: center;
  margin: 8px auto 18px;
  display: block;
}
@media (max-width: 640px) {
  .auth-crest { width: min(280px, 88vw) !important; max-height: none !important; height: auto !important; }
}

.guide-fab{position:fixed;right:18px;bottom:18px;z-index:80;border:0;border-radius:999px;background:#0a1628;color:#fff;padding:12px 16px;font-weight:700;cursor:pointer}
.guide-panel{position:fixed;right:18px;bottom:68px;z-index:80;width:min(360px,calc(100vw - 24px));background:#fff;border-radius:16px;box-shadow:0 16px 40px rgba(10,22,40,.25);display:flex;flex-direction:column;max-height:70vh}
.guide-panel header{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;background:#0a1628;color:#fff;border-radius:16px 16px 0 0}
.guide-panel header button{background:transparent;color:#fff;border:0;font-size:20px;cursor:pointer}
.guide-log{padding:12px;overflow:auto;display:flex;flex-direction:column;gap:8px}
.guide-log .bot{background:#f4f7fb;border-radius:12px;padding:8px 10px;margin:0}
.guide-log .me{background:#0a1628;color:#fff;border-radius:12px;padding:8px 10px;margin:0;align-self:flex-end}
.guide-stars{padding:0 12px 8px;color:#5c6b80;font-size:13px}
.guide-stars button{border:0;background:transparent;color:#cbd5e1;font-size:18px;cursor:pointer}
.guide-stars button.on{color:#c8102e}
#guide-form{display:flex;gap:8px;padding:10px;border-top:1px solid #e2e8f0}
#guide-form input{flex:1;border:1px solid #d5deea;border-radius:8px;padding:8px}

@media (max-width: 900px) {
  .menu-toggle { display: inline-grid !important; place-items: center; }
  .sidebar { display: none; position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100vh; z-index: 40; box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  .sidebar.open { display: flex; }
  .app-shell { display: block; }
}
.guide-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.guide-chips button { border: 1px solid #d5deea; background: #fff; border-radius: 999px; padding: 6px 10px; cursor: pointer; }
.guide-panel { z-index: 90; }
.guide-fab { z-index: 90; }

.theme-fab{position:fixed;right:18px;bottom:68px;z-index:90;border:0;border-radius:999px;background:#fff;color:#0a1628;padding:8px 12px;font-weight:700;cursor:pointer;box-shadow:0 6px 16px rgba(0,0,0,.15)}
body.dark{background:#0b1220;color:#e8eef7}
body.dark .card, body.dark .auth-card, body.dark .guide-panel{background:#121a2b;color:#e8eef7}
body.dark .muted, body.dark .guide-stars{color:#a9b6c9}
body.dark .topbar, body.dark .table th{background:#121a2b;color:#e8eef7}
body.dark input, body.dark select, body.dark textarea{background:#0b1220;color:#e8eef7;border-color:#2a3954}
body.dark .guide-log .bot{background:#1c2740;color:#e8eef7}
body.dark .content-item{border-color:#2a3954}

.guide-fab{width:56px;height:56px;padding:0;display:grid;place-items:center;border-radius:50%;touch-action:none;cursor:grab}
.guide-fab:active{cursor:grabbing}
@media (max-width:640px){.guide-fab{width:48px;height:48px}}

.guide-fab{transition:transform .15s ease}
.guide-fab:active{transform:scale(.96)}

.brand-logo { width: 200px !important; height: 64px !important; object-fit: contain !important; }
.letterhead img, .auth-card-brand img { width: 230px !important; height: auto !important; max-height: 80px !important; object-fit: contain !important; }
@media (max-width: 640px) {
  .brand-logo { width: 150px !important; height: 48px !important; }
  .letterhead img { width: min(230px, 70vw) !important; max-height: 64px !important; }
}
