/* =====================================================================
   QuizSystem UI  ·  Admin console, Presenter screen, Participant app
   ===================================================================== */
:root {
  --ink: #0b1224;
  --ink-2: #131c35;
  --ink-3: #1d2848;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-50: #eef2ff;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #0ea5e9;
  --bg: #f4f6fb;
  --card: #ffffff;
  --line: #e6e9f2;
  --text: #1e2433;
  --muted: #6b7489;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --sidebar-w: 256px;
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body { background: var(--bg); color: var(--text); font-feature-settings: "tnum" 1; }
a { color: var(--primary); }
.num { font-variant-numeric: tabular-nums; }
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-600); --bs-btn-hover-border-color: var(--primary-600); --bs-btn-active-bg: var(--primary-600); }
.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); }
.btn-soft { background: var(--primary-50); color: var(--primary); border: 0; }
.btn-soft:hover { background: #e0e7ff; color: var(--primary-600); }
.btn-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 9px; }
.form-control, .form-select { border-radius: 10px; border-color: var(--line); padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { border-color: #a5b4fc; box-shadow: 0 0 0 .25rem rgba(79, 70, 229, .12); }
.form-label { font-weight: 600; font-size: .875rem; color: #3a4256; margin-bottom: .35rem; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ------------------------------------------------------------- shell */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--ink); color: #c7cde0;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 1030;
}
.brand { display: flex; align-items: center; gap: .7rem; padding: 1.25rem 1.25rem 1rem; color: #fff; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 1.15rem;
  background: linear-gradient(135deg, var(--primary), #8b5cf6); box-shadow: 0 6px 18px rgba(79, 70, 229, .45);
}
.brand-name { font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; font-size: .72rem; color: #8b93ad; letter-spacing: .04em; }
.nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #667090; padding: 1rem 1.4rem .4rem; }
.side-nav { list-style: none; margin: 0; padding: 0 .75rem; }
.side-nav a {
  display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; border-radius: 10px; margin-bottom: 2px;
  color: #c7cde0; text-decoration: none; font-weight: 500; font-size: .92rem; transition: background .15s, color .15s;
}
.side-nav a i { font-size: 1.05rem; opacity: .85; }
.side-nav a:hover { background: var(--ink-2); color: #fff; }
.side-nav a.active { background: var(--ink-3); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.side-foot { margin-top: auto; padding: 1rem; border-top: 1px solid #1b2440; }
.user-chip { display: flex; align-items: center; gap: .65rem; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #2a3560; color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .85rem; flex-shrink: 0;
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem; position: sticky; top: 0; z-index: 1020;
}
.page-title { font-weight: 700; font-size: 1.1rem; margin: 0; }
.crumb { color: var(--muted); font-size: .8rem; }
.content { padding: 1.5rem; max-width: 1400px; width: 100%; }

@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(11, 18, 36, .45); }
  .content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
}

/* ------------------------------------------------------------- cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); padding: 1rem 1.25rem; font-weight: 700; }
.card-body { padding: 1.25rem; }
.stat {
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem; display: flex; gap: 1rem; align-items: center; height: 100%;
}
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-value { font-size: 1.65rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: .8rem; font-weight: 600; margin-top: .3rem; }
.tint-primary { background: var(--primary-50); color: var(--primary); }
.tint-success { background: #ecfdf5; color: #059669; }
.tint-danger { background: #fef2f2; color: #dc2626; }
.tint-warning { background: #fffbeb; color: #d97706; }
.tint-info { background: #f0f9ff; color: #0284c7; }
.tint-slate { background: #f1f5f9; color: #475569; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty i { font-size: 2.5rem; display: block; margin-bottom: .75rem; color: #c3c9da; }

/* ------------------------------------------------------------- tables */
.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .8rem 1rem; border-color: var(--line); vertical-align: middle; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; background: #fafbfe; white-space: nowrap; }
.table-hover > tbody > tr:hover > * { background: #f8f9ff; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.badge { font-weight: 600; border-radius: 999px; padding: .38em .7em; }
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 700; padding: .28rem .65rem; border-radius: 999px; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-live { background: #ecfdf5; color: #059669; }
.pill-live::before { animation: pulse 1.4s infinite; }
.pill-scheduled { background: #fffbeb; color: #b45309; }
.pill-closed { background: #f1f5f9; color: #64748b; }
.pill-active { background: #eef2ff; color: var(--primary); }
.pill-completed { background: #ecfdf5; color: #059669; }
.pill-terminated { background: #fef2f2; color: #dc2626; }
.diff-Easy { background: #ecfdf5; color: #047857; }
.diff-Medium { background: #fffbeb; color: #b45309; }
.diff-Hard { background: #fef2f2; color: #b91c1c; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* quiz cards */
.quiz-card { transition: transform .15s, box-shadow .15s; }
.quiz-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(16, 24, 40, .1); }
.quiz-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; color: var(--muted); font-size: .82rem; }
.quiz-meta i { color: #9aa3ba; margin-right: .25rem; }

/* option editor */
.opt-row { display: flex; gap: .6rem; align-items: center; padding: .5rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, background .15s; }
.opt-row.is-correct { border-color: #6ee7b7; background: #f0fdf9; }
.opt-letter { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; background: #f1f3f9; color: #475069; flex-shrink: 0; }
.opt-row.is-correct .opt-letter { background: var(--success); color: #fff; }
.opt-row .form-control { border: 0; box-shadow: none; padding-left: .25rem; }
.opt-pick { flex-shrink: 0; }
.opt-pick input { display: none; }
.opt-pick label { cursor: pointer; font-size: .75rem; font-weight: 700; padding: .35rem .6rem; border-radius: 8px; color: var(--muted); border: 1px dashed #cfd5e3; white-space: nowrap; }
.opt-pick input:checked + label { color: #047857; border: 1px solid #6ee7b7; background: #d1fae5; }

/* setting switches */
.setting { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; height: 100%; }
.setting .form-switch { margin: 0; padding-left: 2.8em; }
.setting .form-switch .form-check-input { width: 2.4em; height: 1.3em; margin-left: -2.8em; cursor: pointer; }
.setting-title { font-weight: 700; font-size: .9rem; }
.setting-desc { color: var(--muted); font-size: .8rem; }

.dropzone { border: 2px dashed #c7cdf8; border-radius: var(--radius); background: #fafaff; padding: 2.5rem 1rem; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone.drag { background: var(--primary-50); border-color: var(--primary); }
.dropzone i { font-size: 2.4rem; color: var(--primary); }

.toast-wrap { position: fixed; top: 76px; right: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; }
.toast-msg { display: flex; gap: .65rem; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--success); box-shadow: 0 10px 30px rgba(16, 24, 40, .14); border-radius: 12px; padding: .8rem 1rem; min-width: 280px; max-width: 420px; animation: slideIn .25s ease-out; }
.toast-msg.err { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.nav-tabs-clean { border-bottom: 1px solid var(--line); gap: .25rem; }
.nav-tabs-clean .nav-link { border: 0; color: var(--muted); font-weight: 600; padding: .75rem 1rem; border-bottom: 2px solid transparent; border-radius: 0; }
.nav-tabs-clean .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }

.bar { height: 8px; border-radius: 99px; background: #eef0f6; overflow: hidden; min-width: 80px; }
.bar > span { display: block; height: 100%; border-radius: 99px; }

/* ------------------------------------------------------------- login */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art {
  background: radial-gradient(1200px 600px at 10% 10%, #312e81 0%, transparent 60%), radial-gradient(800px 600px at 90% 90%, #7c3aed 0%, transparent 55%), var(--ink);
  color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-art h1 { font-weight: 800; font-size: 2.6rem; letter-spacing: -.03em; line-height: 1.1; }
.auth-art .feature { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; color: #d6dbf5; }
.auth-art .feature i { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #fff; }
.auth-box { width: 100%; max-width: 380px; }
@media (max-width: 900px) { .auth-page { grid-template-columns: 1fr; } .auth-art { display: none; } }

/* =====================================================================
   PRESENTER SCREEN (projector, dark)
   ===================================================================== */
.presenter {
  min-height: 100vh; color: #fff; overflow-x: hidden;
  background: radial-gradient(1000px 700px at 0% 0%, #312e81 0%, transparent 60%), radial-gradient(900px 700px at 100% 100%, #5b21b6 0%, transparent 55%), #070b18;
}
.presenter-top { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 2rem; gap: 1rem; }
.presenter-title { font-weight: 800; font-size: clamp(1.4rem, 2.4vw, 2.4rem); letter-spacing: -.02em; margin: 0; }
.presenter-grid { display: grid; grid-template-columns: minmax(320px, 0.9fr) 1.1fr; gap: 2rem; padding: 0 2rem 2rem; }
@media (max-width: 1100px) { .presenter-grid { grid-template-columns: 1fr; } }
.qr-card { background: #fff; color: var(--ink); border-radius: 28px; padding: 2rem; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
.qr-card img { width: 100%; max-width: 420px; aspect-ratio: 1; image-rendering: pixelated; }
.qr-step { display: flex; justify-content: center; gap: 1.2rem; margin-top: 1rem; flex-wrap: wrap; font-weight: 600; color: #475069; font-size: 1.05rem; }
.qr-step span { display: flex; align-items: center; gap: .45rem; }
.qr-step b { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: .85rem; }
.join-url { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; color: #6b7489; word-break: break-all; margin-top: .75rem; }
.big-count { text-align: center; padding: 1rem 0 1.5rem; }
.big-count .value { font-size: clamp(5rem, 11vw, 9.5rem); font-weight: 800; line-height: .95; letter-spacing: -.05em; background: linear-gradient(180deg, #fff, #c7d2fe); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big-count .label { color: #a5b4fc; text-transform: uppercase; letter-spacing: .22em; font-weight: 700; font-size: .95rem; }
.p-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 700px) { .p-stats { grid-template-columns: repeat(2, 1fr); } }
.p-stat { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; padding: 1.1rem 1.2rem; }
.p-stat .v { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.p-stat .l { color: #a8b0d0; font-weight: 600; font-size: .85rem; margin-top: .35rem; display: flex; align-items: center; gap: .4rem; }
.p-stat.active .v { color: #a5b4fc; }
.p-stat.done .v { color: #6ee7b7; }
.p-stat.term .v { color: #fca5a5; }
.p-stat.resp .v { color: #fcd34d; }
.p-panel { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; padding: 1.2rem; }
.p-panel h6 { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: #a5b4fc; font-weight: 700; margin-bottom: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 40px; }
.chip { background: rgba(255, 255, 255, .1); border-radius: 999px; padding: .45rem .9rem; font-weight: 600; font-size: .95rem; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.leader { display: flex; align-items: center; gap: .9rem; padding: .55rem 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.leader:last-child { border-bottom: 0; }
.leader .rk { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: rgba(255, 255, 255, .1); }
.leader .rk.g { background: #f59e0b; color: #1f1300; }
.leader .rk.s { background: #cbd5e1; color: #0f172a; }
.leader .rk.b { background: #c2763a; color: #fff; }
.p-controls .btn { border-radius: 12px; padding: .65rem 1.2rem; }
.btn-glass { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); color: #fff; }
.btn-glass:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.conn-dot { width: 9px; height: 9px; border-radius: 50%; background: #64748b; display: inline-block; }
.conn-dot.on { background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .2); }
.acc-ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#34d399 calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0); }
.acc-ring > div { width: 96px; height: 96px; border-radius: 50%; background: #0d1226; display: grid; place-items: center; font-weight: 800; font-size: 1.35rem; white-space: nowrap; }
.bump { animation: bump .4s ease-out; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* =====================================================================
   PARTICIPANT APP (mobile-first)
   ===================================================================== */
.play-body { background: linear-gradient(180deg, #eef2ff 0, #f7f8fc 280px); min-height: 100vh; -webkit-tap-highlight-color: transparent; }
.play-wrap { max-width: 560px; margin: 0 auto; padding: 1rem 1rem 6.5rem; }
.play-head { display: flex; align-items: center; gap: .7rem; padding: .25rem 0 1rem; }
.play-head .brand-mark { width: 34px; height: 34px; font-size: 1rem; color: #fff; }
.play-card { background: #fff; border-radius: 20px; box-shadow: 0 10px 40px rgba(30, 36, 80, .08); border: 1px solid #e8ebf5; padding: 1.4rem; }
.hero-quiz { background: linear-gradient(135deg, var(--primary), #7c3aed); color: #fff; border-radius: 20px; padding: 1.4rem; margin-bottom: 1rem; box-shadow: 0 14px 40px rgba(79, 70, 229, .35); }
.hero-quiz h1 { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 .35rem; }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.hero-facts div { background: rgba(255, 255, 255, .15); border-radius: 12px; padding: .6rem; text-align: center; }
.hero-facts b { display: block; font-size: 1.2rem; }
.hero-facts small { opacity: .85; font-size: .72rem; }
.rules { list-style: none; padding: 0; margin: 0; }
.rules li { display: flex; gap: .7rem; padding: .55rem 0; font-size: .9rem; color: #3a4256; }
.rules li i { color: var(--primary); font-size: 1.05rem; margin-top: .05rem; }
.rules li.warn i { color: var(--danger); }
.rules li.warn { color: #991b1b; font-weight: 600; }
.play-input { font-size: 1.05rem; padding: .85rem 1rem; border-radius: 12px; }
.btn-xl { padding: .95rem 1.2rem; font-size: 1.05rem; border-radius: 14px; }

/* question screen */
.q-top { position: sticky; top: 0; z-index: 10; background: rgba(247, 248, 252, .92); backdrop-filter: blur(8px); padding: .75rem 1rem; margin: -1rem -1rem 1rem; }
.q-top-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.q-count { font-weight: 800; font-size: .95rem; }
.q-count span { color: var(--muted); font-weight: 600; }
.q-progress { height: 6px; border-radius: 99px; background: #e3e7f3; margin-top: .6rem; overflow: hidden; }
.q-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #8b5cf6); border-radius: 99px; transition: width .4s; }
.timer { position: relative; width: 58px; height: 58px; flex-shrink: 0; }
.timer svg { transform: rotate(-90deg); width: 58px; height: 58px; }
.timer .track { stroke: #e3e7f3; }
.timer .arc { stroke: var(--success); stroke-linecap: round; transition: stroke .3s; }
.timer.mid .arc { stroke: var(--warning); }
.timer.low .arc { stroke: var(--danger); }
.timer .t { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; }
.timer.low .t { color: var(--danger); animation: bump .9s infinite; }
.q-text { font-size: 1.22rem; font-weight: 700; line-height: 1.45; letter-spacing: -.01em; margin: .25rem 0 1.2rem; white-space: pre-wrap; word-break: break-word; }
.opts { display: grid; gap: .7rem; }
.opt {
  display: flex; align-items: center; gap: .85rem; width: 100%; text-align: left; background: #fff; border: 2px solid #e5e8f2;
  border-radius: 16px; padding: .95rem 1rem; font-size: 1rem; font-weight: 600; color: var(--text); transition: border-color .12s, background .12s, transform .08s; min-height: 62px;
}
.opt:active { transform: scale(.985); }
.opt .l { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; background: #f1f3f9; color: #5a6380; flex-shrink: 0; transition: inherit; }
.opt.sel { border-color: var(--primary); background: var(--primary-50); }
.opt.sel .l { background: var(--primary); color: #fff; }
.opt:disabled { opacity: .7; }
.q-foot { position: fixed; left: 0; right: 0; bottom: 0; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(247, 248, 252, 0), #f7f8fc 35%); }
.q-foot .inner { max-width: 560px; margin: 0 auto; }
.fade-in { animation: fadeUp .3s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.no-select { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* states */
.state-card { text-align: center; padding: 2.5rem 1.5rem; }
.state-icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.1rem; font-size: 2.4rem; }
.score-ring { --p: 0; width: 170px; height: 170px; border-radius: 50%; margin: .5rem auto 1.2rem; display: grid; place-items: center; background: conic-gradient(var(--primary) calc(var(--p) * 1%), #e8ebf5 0); }
.score-ring > div { width: 138px; height: 138px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; }
.score-ring b { font-size: 2.3rem; font-weight: 800; line-height: 1; display: block; }
.score-ring small { color: var(--muted); font-weight: 600; }
.res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
.res-grid div { border-radius: 14px; padding: .8rem; background: #f7f8fc; }
.res-grid b { font-size: 1.4rem; display: block; }
.res-grid small { color: var(--muted); font-weight: 600; }
.overlay { position: fixed; inset: 0; background: rgba(11, 18, 36, .55); display: grid; place-items: center; z-index: 2000; padding: 1rem; }
.offline-bar { position: fixed; top: 0; left: 0; right: 0; background: var(--danger); color: #fff; text-align: center; font-size: .85rem; font-weight: 600; padding: .4rem; z-index: 3000; display: none; }

/* ------------------------------------------------------------- print (PDF export via browser) */
@media print {
  .sidebar, .topbar, .no-print, .toast-wrap { display: none !important; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { box-shadow: none; break-inside: avoid; }
  .tab-pane { display: block !important; opacity: 1 !important; margin-bottom: 1.5rem; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
