/* Farmadent design system, on top of Pico.css 2 (vendored). Light theme only.
   Layout: sidebar shell on laptops (>= 1024px), drawer + top bar on tablets and phones.
   Density is tuned for HD (1366x768) and FHD laptops. */

/* ---------- tokens ---------- */
:root,
[data-theme="light"],
:root:not([data-theme="dark"]) {
  --fd-accent: #0f766e;
  --fd-accent-strong: #115e59;
  --fd-accent-soft: #e6f4f2;
  --fd-bg: #f4f6f8;
  --fd-surface: #ffffff;
  --fd-border: #e3e7eb;
  --fd-text: #1f2933;
  --fd-muted: #5c6874;
  --fd-danger: #b13c0a;
  --fd-danger-soft: #fdeee6;
  --fd-ok: #14713a;
  --fd-ok-soft: #e7f6ec;
  --fd-warn: #92580a;
  --fd-warn-soft: #fdf6e3;
  --fd-info-soft: #e8f1fb;
  --fd-radius: 10px;
  --fd-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --fd-sidebar: 232px;

  --pico-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pico-font-size: 93.75%;          /* 15px: fits HD laptops */
  --pico-line-height: 1.45;
  --pico-color: var(--fd-text);
  --pico-muted-color: var(--fd-muted);
  --pico-muted-border-color: var(--fd-border);
  --pico-background-color: var(--fd-bg);
  --pico-card-background-color: var(--fd-surface);
  --pico-card-sectioning-background-color: #fafbfc;
  --pico-card-box-shadow: var(--fd-shadow);
  --pico-border-radius: 8px;
  --pico-spacing: 0.9rem;
  --pico-typography-spacing-vertical: 0.9rem;
  --pico-block-spacing-vertical: 1rem;
  --pico-block-spacing-horizontal: 1rem;
  --pico-form-element-spacing-vertical: 0.5rem;
  --pico-form-element-spacing-horizontal: 0.75rem;
  --pico-form-element-background-color: #fff;
  --pico-form-element-border-color: #cfd6dd;
  --pico-form-element-focus-color: var(--fd-accent);
  --pico-primary: var(--fd-accent);
  --pico-primary-background: var(--fd-accent);
  --pico-primary-border: var(--fd-accent);
  --pico-primary-underline: rgba(15, 118, 110, 0.4);
  --pico-primary-hover: var(--fd-accent-strong);
  --pico-primary-hover-background: var(--fd-accent-strong);
  --pico-primary-hover-border: var(--fd-accent-strong);
  --pico-primary-focus: rgba(15, 118, 110, 0.25);
  --pico-primary-inverse: #fff;
  /* Secondary actions: white with teal text and border, so they read as buttons next to the
     one solid main action, never as empty boxes. "outline" buttons look the same. */
  --pico-secondary: var(--fd-accent-strong);
  --pico-secondary-background: #fff;
  --pico-secondary-border: #9fcfc8;
  --pico-secondary-underline: rgba(17, 94, 89, 0.4);
  --pico-secondary-hover: var(--fd-accent-strong);
  --pico-secondary-hover-background: var(--fd-accent-soft);
  --pico-secondary-hover-border: var(--fd-accent);
  --pico-secondary-focus: rgba(15, 118, 110, 0.25);
  --pico-secondary-inverse: var(--fd-accent-strong);
  --pico-table-border-color: var(--fd-border);
  --pico-table-row-stripped-background-color: #f8fafb;
}
@media (min-width: 1600px) {
  :root { --pico-font-size: 100%; --fd-sidebar: 248px; }
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body { background: var(--fd-bg); min-height: 100vh; }
h1 { font-size: 1.55rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 0.6rem; }
h3 { font-size: 1.05rem; }
h1, h2, h3 { color: var(--fd-text); letter-spacing: -0.01em; }
a { text-underline-offset: 2px; }
small, .muted { color: var(--fd-muted); }
.icon { flex: none; vertical-align: -0.2em; }
:where(button, [role="button"], input[type="submit"]) { font-weight: 600; }
/* Icon + text inside any button: one gap, centred. */
:is(button, a[role="button"], [role="button"]):not(.icon-button, [hidden]):has(> .icon) { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; }
button.secondary, [role="button"].secondary, input[type="submit"].secondary {
  color: var(--pico-secondary-inverse); background: #fff;
}
:where(button, [role="button"]).outline { background: #fff; }
:where(button, [role="button"]).secondary:hover, :where(button, [role="button"]).outline:hover {
  background: var(--fd-accent-soft); color: var(--fd-accent-strong);
}
/* Links in tables, lists and cards: no permanent underline (calmer lists). Links inside running
   text keep it, so they are not told apart by colour alone (WCAG 1.4.1). */
:where(td, th, li, dd, dt, .list-item, .card > header, article > header, .stat, .course-card) a:not([role="button"]) { text-decoration: none; font-weight: 550; }
:where(td, th, li, dd, dt, .list-item, .card > header, article > header, .stat, .course-card) a:not([role="button"]):hover { text-decoration: underline; }
.icon-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; padding: 0; margin: 0;
  background: transparent; border: 0; color: inherit; border-radius: 8px;
}
.icon-button:hover { background: rgba(15, 23, 42, 0.06); }
.icon-button:focus-visible { box-shadow: 0 0 0 3px var(--pico-primary-focus); }

/* ---------- app shell ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--fd-sidebar); z-index: 40;
  display: flex; flex-direction: column; gap: 0.75rem;
  background: var(--fd-surface); border-right: 1px solid var(--fd-border);
  padding: 1rem 0.75rem; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 0.6rem; padding: 0 0.35rem; }
.brand-mark {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 9px;
  background: linear-gradient(135deg, #14b8a6, var(--fd-accent)); color: #fff; font-weight: 800;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { font-size: 0.78rem; }
.sidebar-close { margin-left: auto; display: none; }
.brand-home { margin-left: auto; color: var(--fd-muted); }
.brand-home:hover { color: var(--fd-accent); }
.brand-home + .sidebar-close { margin-left: 0; }
.systems {
  display: flex; gap: 3px; justify-content: stretch;
  background: #f1f4f7; border-radius: 9px; padding: 3px;
}
.systems a {
  flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  text-align: center; font-size: 0.72rem; font-weight: 600; padding: 0.3rem 0.05rem; letter-spacing: -0.01em;
  border-radius: 7px; color: var(--fd-muted); text-decoration: none; white-space: nowrap;
}
.systems a:hover { color: var(--fd-text); }
.systems a[aria-current="page"] { background: #fff; color: var(--fd-accent); box-shadow: var(--fd-shadow); }
.side-nav { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 2px; flex: 1; }
.side-nav .nav-section { font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--fd-muted); margin: 0.8rem 0.6rem 0.25rem; }
.nav-link {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.48rem 0.6rem; border-radius: 8px;
  color: #3b4752; text-decoration: none; font-weight: 500; font-size: 0.93rem;
}
.nav-link:hover { background: #f1f4f7; color: var(--fd-text); }
.nav-link[aria-current="page"] { background: var(--fd-accent-soft); color: var(--fd-accent-strong); font-weight: 600; }
.nav-link .badge { margin-left: auto; }
.side-footer { border-top: 1px solid var(--fd-border); padding-top: 0.6rem; display: flex; flex-direction: column; gap: 2px; }
.user-chip { display: flex; align-items: center; gap: 0.55rem; padding: 0.35rem 0.4rem; }
.avatar {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--fd-accent-soft); color: var(--fd-accent-strong); font-weight: 700; font-size: 0.85rem;
}
.user-name { flex: 1; font-size: 0.88rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backdrop { display: none; }

.app { min-height: 100vh; }
body.with-shell .app { margin-left: var(--fd-sidebar); }
.topbar { display: none; }
.content { max-width: 1440px; padding: 1.5rem 2rem 3rem; margin: 0 auto; }
body.no-shell .content { padding-top: 3rem; }

/* Tablets and phones: drawer navigation. */
@media (max-width: 1023px) {
  body.with-shell .app { margin-left: 0; }
  .sidebar { transform: translateX(-105%); transition: transform 0.2s ease; box-shadow: 0 10px 30px rgba(0,0,0,.15); width: min(84vw, 300px); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(15, 23, 42, 0.35); }
  .sidebar-close { display: inline-flex; }
  .topbar {
    display: flex; align-items: center; gap: 0.5rem; position: sticky; top: 0; z-index: 20;
    background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--fd-border); padding: 0.4rem 0.75rem;
    padding-top: max(0.4rem, env(safe-area-inset-top));
  }
  .topbar-title { font-size: 0.95rem; }
  .content { padding: 1rem 1rem 3rem; }
}
@media (max-width: 1366px) and (min-width: 1024px) {
  .content { padding: 1.25rem 1.5rem 2.5rem; }
}

/* ---------- page building blocks ---------- */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-header h1 { margin: 0; }
.page-header .subtitle { margin: 0.2rem 0 0; color: var(--fd-muted); }
.page-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.page-actions > * { margin: 0; }
.btn, a.btn[role="button"] { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.btn-sm, .actions button, table button, table [role="button"] { padding: 0.3rem 0.65rem; font-size: 0.85rem; margin: 0; }

article, .card {
  background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius);
  box-shadow: var(--fd-shadow); padding: 1.1rem 1.2rem; margin: 0 0 1rem;
}
article > header, .card > header {
  margin: -1.1rem -1.2rem 1rem; padding: 0.75rem 1.2rem; border-bottom: 1px solid var(--fd-border);
  background: transparent; border-radius: var(--fd-radius) var(--fd-radius) 0 0; font-weight: 600;
  display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem;
}
article > header > a:last-child, .card > header > a:last-child { margin-left: auto; font-weight: 550; font-size: 0.88rem; }
article > header .icon, .card > header .icon { color: var(--fd-accent); }
article > footer, .card > footer { margin: 1rem -1.2rem -1.1rem; padding: 0.7rem 1.2rem; border-top: 1px solid var(--fd-border); background: #fafbfc; border-radius: 0 0 var(--fd-radius) var(--fd-radius); }
.card-title { font-weight: 600; margin: 0 0 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
article.narrow { max-width: 26rem; margin: 2rem auto; }

/* Responsive layouts: two columns on laptops, one on phones. */
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 1rem; align-items: start; }
.layout-2-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .layout-2, .layout-2-even { grid-template-columns: minmax(0, 1fr); } }

/* KPI tiles */
.kpis, .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.85rem; margin-bottom: 1rem; }
.kpis article, .stat { margin: 0; }
.stat {
  display: flex; flex-direction: column; gap: 0.15rem; text-decoration: none; color: inherit;
  background: var(--fd-surface); border: 1px solid var(--fd-border); border-radius: var(--fd-radius);
  box-shadow: var(--fd-shadow); padding: 0.9rem 1rem;
}
a.stat:hover { border-color: #b9d9d4; }
.stat .stat-label { display: flex; align-items: center; gap: 0.4rem; color: var(--fd-muted); font-size: 0.85rem; font-weight: 550; }
.stat .stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.15; }
.stat .stat-note { font-size: 0.8rem; color: var(--fd-muted); }
.stat.accent .stat-label .icon { color: var(--fd-accent); }
.stat.warn .stat-value { color: var(--fd-warn); }
.stat.danger .stat-value { color: var(--fd-danger); }
p.big { font-size: 2.1rem; font-weight: 700; margin: 0; line-height: 1.1; }
.kpi .big { font-size: 1.5rem; white-space: nowrap; }

/* Badges / statuses */
.badge, .status {
  display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.76rem; font-weight: 600;
  padding: 0.12rem 0.5rem; border-radius: 999px; background: #eef1f4; color: #475569; white-space: nowrap;
}
.badge-ok, .status-completed, .status-comp-met, .badge-accepted, .badge-closed, .badge-done, .badge-issued { background: var(--fd-ok-soft); color: var(--fd-ok); }
.badge-warn, .status-in_progress, .status-comp-gap, .badge-prepared, .badge-draft, .badge-booked, .badge-signed { background: var(--fd-warn-soft); color: var(--fd-warn); }
.badge-danger, .status-overdue, .status-comp-missing, .badge-rejected, .badge-failed, .badge-cancelled, .badge-annulled, .badge-no_show, .badge-reversed { background: var(--fd-danger-soft); color: var(--fd-danger); }
.badge-info, .badge-open, .badge-arrived { background: var(--fd-info-soft); color: #1d4ed8; }
.status-comp-extra { background: #eef1f4; }

/* Notices */
.flash { display: grid; gap: 0.5rem; margin-bottom: 1rem; }
.alert, article.message { border-radius: 9px; padding: 0.7rem 0.9rem; border: 1px solid; margin: 0; transition: opacity .4s; }
.alert-success, .message-success { background: var(--fd-ok-soft); border-color: #bfe5cb; color: #14532d; }
.alert-error, .message-error, p.error { background: var(--fd-danger-soft); border-color: #f6c9b3; color: #7c2d12; }
.alert-warning { background: var(--fd-warn-soft); border-color: #f0dca6; color: #713f12; }
.alert-info { background: var(--fd-info-soft); border-color: #c9dcf5; color: #1e3a8a; }
.alert.fade { opacity: 0; pointer-events: none; }
p.error { padding: 0.6rem 0.8rem; border-radius: 8px; border: 1px solid; }
.empty { text-align: center; color: var(--fd-muted); padding: 1.5rem 1rem; }
.empty .icon { color: #a8b3bd; margin-bottom: 0.4rem; }

/* Tables */
.table-wrap, .overflow-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1rem; }
table { font-size: 0.92rem; margin-bottom: 1rem; }
article table, .card table { margin-bottom: 0; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fd-muted); font-weight: 650; }
td, th { padding: 0.55rem 0.7rem; }
tbody tr:hover td { background: #f8fafb; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot th, tfoot td { font-size: 0.95rem; text-transform: none; color: var(--fd-text); }
/* Phones: rows become cards (labels come from the header, see ui.js). */
@media (max-width: 640px) {
  table.stackable thead { display: none; }
  table.stackable, table.stackable tbody, table.stackable tr, table.stackable td { display: block; width: 100%; }
  table.stackable tr { border: 1px solid var(--fd-border); border-radius: 9px; margin-bottom: 0.6rem; padding: 0.35rem 0.2rem; background: #fff; }
  table.stackable td { border: 0; padding: 0.25rem 0.7rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  table.stackable td::before { content: attr(data-label); color: var(--fd-muted); font-size: 0.8rem; font-weight: 600; text-align: left; }
  table.stackable td:not([data-label])::before, table.stackable td[data-label=""]::before { content: none; }
  table.stackable tfoot { display: table; width: 100%; }
}

/* Forms */
label { font-size: 0.88rem; font-weight: 550; }
input:not([type="checkbox"], [type="radio"]), select, textarea { font-size: 0.95rem; }
/* Tick boxes stay square (the 8px radius above would make them look like round radio buttons). */
[type="checkbox"]:not([role="switch"]) { border-radius: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0 1rem; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid .span-2 { grid-column: auto; } }
.form-row { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: flex-end; }
.form-row > * { margin: 0; }
.form-row > label { flex: 1 1 10rem; }
.form-row > label > input, .form-row > label > select { margin-bottom: 0; }
.field-error, .errorlist { color: var(--fd-danger); font-size: 0.85rem; list-style: none; padding: 0; margin: -0.4rem 0 0.6rem; }
.helptext { display: block; color: var(--fd-muted); font-size: 0.8rem; margin-top: -0.4rem; margin-bottom: 0.6rem; }
/* Tick-box choices (Django CheckboxSelectMultiple renders <div id><div><label><input>…). */
fieldset > legend { font-size: 0.88rem; font-weight: 600; margin-bottom: 0.4rem; }
.choice-row > div { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.choice-row > div > div label, .choice-list > div > div label {
  display: flex; align-items: center; gap: 0.5rem; margin: 0; font-weight: 500; cursor: pointer;
}
.choice-row > div > div label {
  padding: 0.35rem 0.75rem; border: 1px solid var(--pico-form-element-border-color); border-radius: 999px; background: #fff;
}
.choice-row > div > div label:has(input:checked) { border-color: var(--fd-accent); background: var(--fd-accent-soft); color: var(--fd-accent-strong); }
.choice-row input, .choice-list input { margin: 0; }
.choice-list { max-height: 18rem; overflow-y: auto; border: 1px solid var(--fd-border); border-radius: 9px; margin-top: 0.5rem; }
.choice-list > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); }
.choice-list > div > div label { width: 100%; padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--fd-border); line-height: 1.3; }
.choice-list label small { display: block; font-size: 0.8rem; color: var(--fd-muted); }
.choice-list > div > div label:hover { background: #f8fafb; }
.choice-list > div > div label:has(input:checked) { background: var(--fd-accent-soft); }
.choice-list > div > div[hidden] { display: none; }
.form-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.form-actions > *, .form-actions > button[type="submit"] { margin: 0; width: auto; }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--fd-muted); pointer-events: none; }
.search-box input[type="search"] { padding-left: 2.4rem; margin: 0; }
form.inline { margin: 0; display: inline; }
form.inline button { margin: 0; }
details { margin-bottom: 0.75rem; }
details > summary { font-weight: 550; }
/* "Add ..." sections inside cards open a form: they look like a secondary button. */
:where(article, .card) details { border: 0; padding: 0; margin: 0.75rem 0 0; }
:where(article, .card) details > summary {
  display: inline-flex; align-items: center; gap: 0.35rem; width: auto; list-style: none;
  padding: 0.4rem 0.8rem; border: 1px solid var(--pico-secondary-border); border-radius: 8px;
  background: #fff; color: var(--fd-accent-strong); font-weight: 600; font-size: 0.9rem; line-height: 1.3;
}
:where(article, .card) details > summary::-webkit-details-marker { display: none; }
:where(article, .card) details > summary::after { float: none; margin: 0; height: 0.9rem; width: 0.9rem; }
:where(article, .card) details > summary:hover { background: var(--fd-accent-soft); border-color: var(--fd-accent); }
:where(article, .card) details[open] > summary { margin-bottom: 0.75rem; background: var(--fd-accent-soft); }

/* Legacy helpers used across the systems */
nav.subnav { display: none; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.toolbar h1 { margin: 0; }
.overdue { color: var(--fd-danger); font-weight: 600; }
.warn { color: var(--fd-danger); }
.actions { display: flex; gap: 0.3rem; flex-wrap: wrap; }
nav.pager { display: flex; gap: 1rem; justify-content: center; }
dl dt { font-weight: 600; font-size: 0.82rem; color: var(--fd-muted); }
dl dd { margin: 0 0 0.6rem 0; }
.score { display: inline-block; min-width: 2rem; text-align: center; border-radius: 4px; padding: 0 0.3rem; color: #fff; }
.score-promoter { background: #2e7d32; }
.score-passive { background: #f9a825; }
.score-detractor { background: #c62828; }
body.kiosk main { padding-top: 3rem; text-align: center; }
.kiosk-scores { display: grid; grid-template-columns: repeat(11, 1fr); gap: 0.4rem; }
.kiosk-score { padding: 1rem 0; font-size: 1.6rem; font-weight: 700; border-radius: 8px; cursor: pointer; color: #fff; }
.kiosk-score input { display: none; }
.kiosk-score:has(input:checked) { outline: 4px solid var(--pico-primary); transform: scale(1.08); }
.kiosk-legend { display: flex; justify-content: space-between; }
@media (max-width: 700px) { .kiosk-scores { grid-template-columns: repeat(6, 1fr); } }
.chart { width: 100%; height: 320px; }
@media (max-width: 640px) { .chart { height: 260px; } }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.filters select, .filters input, .filters button { width: auto; margin: 0; }
.filters .custom { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
.filters .custom[hidden] { display: none; }
.good { color: var(--fd-ok); }
.bad { color: var(--fd-danger); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.course-card { margin: 0; }
.course-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.course-card header a { font-weight: 600; line-height: 1.3; }
.course-card header .badge { flex: none; margin-top: 0.1rem; }
ol.lessons li.done a { color: var(--fd-muted); }
.lesson-video { width: 100%; max-height: 70vh; background: #000; border-radius: 8px; }
.lesson-pdf { width: 100%; height: 75vh; border: 1px solid var(--fd-border); border-radius: 8px; }
.lesson-body { max-width: 50rem; }
fieldset.question { border: 1px solid var(--fd-border); border-radius: 9px; padding: 1rem; }
table.matrix td.cell { text-align: center; }
table.matrix th.rotate { white-space: normal; max-width: 7.5rem; font-size: .72rem; vertical-align: bottom; text-align: center; }
.lesson-h5p { width: 100%; min-height: 400px; }

/* Login */
body.no-shell .login-card { max-width: 24rem; margin: 6vh auto 0; }
.login-brand { display: flex; align-items: center; gap: 0.6rem; justify-content: center; margin-bottom: 1.25rem; }
.login-brand .brand-mark { width: 2.6rem; height: 2.6rem; font-size: 1.2rem; }
.login-card button[type="submit"] { width: 100%; }

@media print {
  .sidebar, .topbar, .backdrop, .page-actions, .no-print { display: none !important; }
  body.with-shell .app { margin: 0; }
  .content { padding: 0; max-width: none; }
  article, .card { box-shadow: none; }
}

/* Demo server banner (FARMADENT_DEMO=1) */
.demo-banner { display: flex; align-items: center; gap: .4rem; margin: 0 0 1rem; padding: .45rem .8rem;
  border-radius: 8px; background: var(--fd-warn-soft); border: 1px solid #f0dca6; color: #713f12;
  font-size: .85rem; font-weight: 600; }
.login-demo { margin-top: 1rem; font-size: .85rem; }
.login-demo code { font-size: .85rem; }
