/* Design clair et épuré — socle commun des applications */
:root {
  --accent: #1a73e8;
  --accent-weak: color-mix(in srgb, var(--accent) 10%, #fff);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, #fff);
  --accent-strong: color-mix(in srgb, var(--accent) 85%, #000);
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e6e8eb;
  --border-strong: #d4d7dc;
  --text: #1f2328;
  --text-2: #57606a;
  --text-3: #8b949e;
  --ok: #1a7f37; --ok-bg: #e9f7ee;
  --warn: #b35900; --warn-bg: #fff4e5;
  --danger: #c62828; --danger-bg: #fdecec;
  --info: #0b6bcb; --info-bg: #e8f1fd;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --sidebar: 248px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15.5px; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; word-break: break-all; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.ic { flex-shrink: 0; vertical-align: middle; }
.hidden { display: none !important; }

/* ---------- Structure ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 40; transition: transform .2s ease; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: var(--text); font-weight: 650; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-weak); display: grid; place-items: center; font-size: 19px; flex-shrink: 0; }
.brand-mark.sm { width: 28px; height: 28px; font-size: 16px; border-radius: 8px; margin-right: 8px; }
.brand-mark.lg { width: 56px; height: 56px; font-size: 30px; border-radius: 16px; margin: 0 auto 14px; }
.nav { padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-weak); color: var(--accent-strong); }
.nav-link.active .ic { color: var(--accent); }
.nav-sep { height: 1px; background: var(--border); margin: 10px 8px; }
.sidebar-user { border-top: 1px solid var(--border); padding: 12px; display: flex; align-items: center; gap: 6px; }
.user-chip { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); padding: 6px; border-radius: 10px; }
.user-chip:hover { background: var(--surface-2); text-decoration: none; }
.user-chip-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-chip-text strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-text span { font-size: 12px; color: var(--text-3); }
.content { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: rgba(246, 247, 249, .85); backdrop-filter: saturate(180%) blur(12px); position: sticky; top: 0; z-index: 30; }
.topbar-spacer { flex: 1; }
.topbar-brand { display: flex; align-items: center; font-weight: 650; color: var(--text); }
.topbar-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; height: 38px; width: min(360px, 50vw); color: var(--text-3); }
.topbar-search input, .topbar-search input[type=search] { border: 0; box-shadow: none; min-height: 0; border-radius: 0; outline: 0; background: transparent; flex: 1; font: inherit; color: var(--text); padding: 0; height: 100%; }
.topbar-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.main { padding: 8px 28px 48px; max-width: 1200px; width: 100%; }
.main.wide { max-width: none; }
.only-mobile { display: none !important; }
.scrim { display: none; }
.bottomnav { display: none; }

/* ---------- En-têtes de page ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; font-size: 16px; }

/* ---------- Cartes & grilles ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .split > .card + .card, .stack > .card + .card, .row > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-head { padding: 16px 20px 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.mt { margin-top: 16px; } .mt-lg { margin-top: 28px; } .mb { margin-bottom: 16px; } .mb0 { margin-bottom: 0; }

/* ---------- Statistiques ---------- */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); color: var(--text); display: block; }
a.stat:hover { border-color: var(--border-strong); text-decoration: none; box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { color: var(--text-2); font-size: 13px; font-weight: 500; }
.stat-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent); }
.stat-value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; }
.stat-hint { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.stat-warn .stat-icon { background: var(--warn-bg); color: var(--warn); }
.stat-danger .stat-icon { background: var(--danger-bg); color: var(--danger); }
.stat-ok .stat-icon { background: var(--ok-bg); color: var(--ok); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 550; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; text-decoration: none !important; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(0, 0, 0, .04); color: var(--text); }
.btn-tonal { background: var(--accent-weak); color: var(--accent-strong); }
.btn-tonal:hover { background: var(--accent-soft); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #f1c3c3; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-success { background: #1f883d; color: #fff; }
.btn-success:hover { background: #1a7f37; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.icon-only { width: 38px; padding: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; }
.icon-btn:hover { background: rgba(0, 0, 0, .05); color: var(--text); text-decoration: none; }
.icon-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }
.inline-form { display: inline-flex; margin: 0; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap; line-height: 1.6; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-accent { background: var(--accent-weak); color: var(--accent-strong); }
.badge-muted { background: #eef0f3; color: var(--text-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 500; }
.chip:hover { background: var(--surface-2); text-decoration: none; }
.chip.active { background: var(--accent-weak); border-color: transparent; color: var(--accent-strong); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Tableaux & listes ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfbfc; }
.table .actions { text-align: right; white-space: nowrap; }
.table a.row-link { color: var(--text); font-weight: 550; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { text-decoration: none; background: var(--surface-2); margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 550; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .sub { font-size: 13px; color: var(--text-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item > .badge { min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.grid > *, .split > *, .stack > * { min-width: 0; }
.leading { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent); flex-shrink: 0; font-size: 20px; }
.leading.warn { background: var(--warn-bg); color: var(--warn); }
.leading.danger { background: var(--danger-bg); color: var(--danger); }
.leading.ok { background: var(--ok-bg); color: var(--ok); }
.leading.muted { background: #eef0f3; color: var(--text-2); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; margin: 0; }
.kv dt { color: var(--text-2); font-size: 13.5px; }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }

/* ---------- Formulaires ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 550; color: var(--text); }
.field-help { font-size: 12.5px; color: var(--text-3); font-weight: 400; display: block; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=tel], input[type=search], input[type=time], input[type=color], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; min-height: 40px; transition: border-color .12s, box-shadow .12s;
}
input[type=color] { padding: 4px; width: 56px; }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2357606a' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
input[type=file] { font: inherit; font-size: 13px; padding: 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); width: 100%; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 4px 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.check strong { font-weight: 550; display: block; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.input-group { display: flex; align-items: stretch; }
.input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters select, .filters input { width: auto; min-width: 150px; }
fieldset { border: 0; padding: 0; margin: 0; }
.form-section { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--border); }
.form-section > h3 { margin-bottom: 14px; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 14px; color: var(--text-2); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.segmented { display: inline-flex; background: #eceef1; border-radius: 999px; padding: 3px; gap: 2px; }
.segmented a, .segmented button { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 550; color: var(--text-2); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.segmented a:hover { text-decoration: none; color: var(--text); }
.segmented .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Messages ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash span { flex: 1; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--danger-bg); color: var(--danger); }
.flash-info { background: var(--info-bg); color: var(--info); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.flash-close { border: 0; background: none; color: inherit; cursor: pointer; opacity: .6; padding: 2px; display: grid; }
.flash-close:hover { opacity: 1; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; background: var(--info-bg); color: #0a3d75; font-size: 13.5px; margin-bottom: 16px; }
.callout.warn { background: var(--warn-bg); color: #6b3500; }
.callout .ic { margin-top: 1px; }
.empty { text-align: center; padding: 48px 20px; }
.empty-icon { width: 60px; height: 60px; border-radius: 18px; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; }
.empty h3, .empty h2 { margin-bottom: 6px; }
.empty .btn { margin-top: 10px; }

/* ---------- Divers ---------- */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600; flex-shrink: 0; line-height: 1; }
.progress { height: 8px; background: #eceef1; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.progress-ok span { background: #2da44e; } .progress-warn span { background: #e8890c; } .progress-danger span { background: #d93025; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 90px; gap: 10px; align-items: center; font-size: 13.5px; }
.bar-row .progress { height: 10px; }
.attachments { display: flex; flex-direction: column; gap: 8px; }
.att { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 10px; padding: 6px; background: var(--surface); }
.att-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); }
.att-main:hover { text-decoration: none; }
.att-main img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.att-icon { width: 48px; height: 48px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); }
.att-meta { display: flex; flex-direction: column; min-width: 0; }
.att-name { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; background: var(--surface-2); display: block; }
.photo-ph { width: 100%; aspect-ratio: 16/10; border-radius: 10px; background: var(--accent-weak); display: grid; place-items: center; font-size: 42px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: box-shadow .15s, transform .15s; }
a.tile:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-1px); }
.tile .photo, .tile .photo-ph { border-radius: 0; }
.tile-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tile-title { font-weight: 600; }
dialog { border: 0; border-radius: 16px; padding: 0; box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); color: var(--text); }
dialog::backdrop { background: rgba(15, 23, 42, .35); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dialog-head h3 { margin: 0; }
.dialog-body { padding: 20px; overflow-y: auto; }
.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field code { flex: 1; padding: 8px 10px; }
.pill-num { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; }
.log { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; white-space: pre-wrap; margin: 0; }

/* ---------- Histogramme en colonnes ---------- */
.colchart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; align-items: end; height: 170px; }
.colchart > * { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none !important; min-width: 0; }
.colchart .col-bar { width: 100%; max-width: 38px; border-radius: 6px 6px 3px 3px; background: var(--accent-soft); }
.colchart .col-bar.on { background: var(--accent); }
.colchart .col-val, .colchart .col-lbl { font-size: 11px; white-space: nowrap; }
@media (max-width: 860px) { .colchart { gap: 3px; } .colchart .col-val { font-size: 9px; } .colchart .col-lbl { font-size: 10px; } }

/* ---------- Écrans d'authentification / installation ---------- */
.auth-body { background: radial-gradient(1200px 600px at 50% -10%, var(--accent-weak), var(--bg)); }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 32px; width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 640px; }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand h1 { font-size: 22px; margin-bottom: 4px; }
.auth-foot { margin-top: 18px; font-size: 13px; color: var(--text-2); text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-ms { background: #fff; color: #1f2328; border: 1px solid var(--border-strong); }
.btn-ms:hover { background: var(--surface-2); }
.ms-logo { display: inline-grid; grid-template-columns: 8px 8px; gap: 1.5px; }
.ms-logo i { width: 8px; height: 8px; display: block; }
.steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 22px; }
.steps span { width: 34px; height: 4px; border-radius: 4px; background: var(--border); }
.steps span.on { background: var(--accent); }
.req { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.req:last-child { border-bottom: 0; }
.req .ok { color: var(--ok); } .req .ko { color: var(--danger); }
.kid-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.kid-picker button { border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 14px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; font: inherit; font-weight: 600; }
.kid-picker button:hover, .kid-picker button.on { border-color: var(--accent); background: var(--accent-weak); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .scrim { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .3); z-index: 35; }
  .content { margin-left: 0; }
  .only-mobile { display: inline-flex !important; }
  .topbar { padding: 0 12px; height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .topbar-search { display: none; }
  .main { padding: 6px 16px calc(84px + env(safe-area-inset-bottom)); overflow-x: clip; }
  .list-item { gap: 10px; }
  .list-item > .badge { max-width: 42%; }
  .grid-2, .grid-3, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .page-head { align-items: flex-start; margin-bottom: 16px; }
  .page-head h1 { font-size: 21px; }
  .card { padding: 16px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .bar-row { grid-template-columns: 100px 1fr 76px; }
  .stat-value { font-size: 22px; }
  .table th, .table td { padding: 10px 12px; }
  .table .hide-sm { display: none; }
  .btn.sm-icon > span, .hide-label { display: none; }
  .btn.sm-icon { width: 32px; padding: 0; }
  .table td.actions { padding-left: 4px; }
  .filters select, .filters input { flex: 1; min-width: 0; }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 550; color: var(--text-3); padding: 4px 0; }
  .bottomnav a:hover { text-decoration: none; }
  .bottomnav a.active { color: var(--accent); }
  .auth-card { padding: 24px 20px; }
  a.list-item:hover { margin: 0; padding-left: 0; padding-right: 0; background: none; }
}
@media print {
  .sidebar, .topbar, .bottomnav, .page-actions, .no-print, .flash { display: none !important; }
  .content { margin: 0; }
  .main { padding: 0; max-width: none; }
  body { background: #fff; }
  .card { border: 0; box-shadow: none; padding: 0; }
}
