/* ============================================================================
   METIGA BM OS — styles.css
   Charte éditoriale "Studio Digital" : Times New Roman, greige chaud,
   bleu marine profond, accents ocre. Minimalisme éditorial.
   ========================================================================== */

:root {
  /* Texte / neutres */
  --ink: #1f2024;
  --muted: #6a6a6a;
  --soft: #8a8a8a;
  /* Lignes chaudes */
  --line: #e2ddd4;
  --line2: #efeae1;
  /* Charte */
  --accent: #16263f;      /* marine */
  --accent-2: #0f1c30;
  --accent-soft: #eaeef5;
  --ocre: #b08d57;        /* ocre / laiton */
  --ocre-2: #c4a877;
  --ocre-soft: #ecdfc8;
  /* Statuts */
  --green: #2e7d4f;   --green-bg: #e6f0e9;
  --orange: #c8941f;  --orange-bg: #f7ecd4;
  --red: #b23a3a;     --red-bg: #f6e2e0;
  --blue-bg: #eaeef5;
  /* Surfaces */
  --paper: #ffffff;
  --bg: #f1efea;
  --cream: #faf8f5;
  /* Divers */
  --shadow: 0 1px 2px rgba(22,38,63,.04), 0 6px 20px rgba(22,38,63,.05);
  --shadow-lg: 0 16px 50px rgba(22,38,63,.16);
  --radius: 6px;
  --radius-sm: 4px;
  --sidebar-w: 264px;
  --serif: "Times New Roman", "Times", Georgia, serif;
  --font: var(--serif);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--serif); cursor: pointer; }
.ic { width: 18px; height: 18px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d8d0c1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c9bfa9; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: var(--ocre-soft); color: var(--accent); }

/* ---------- Rythme de lecture global ---------- */
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
b, strong { font-weight: 700; }
/* Emphase riche dans les zones de lecture (pas dans les alertes/badges colorés) */
.card p strong, .card p b, .lead strong, .lead b,
li strong, li b, .kv .v strong, .acc-body p strong {
  color: var(--accent); font-weight: 700;
}
em { font-style: italic; color: var(--ink); }
mark, .hl { background: linear-gradient(180deg, transparent 58%, var(--ocre-soft) 58%); color: inherit; padding: 0 1px; }
.content a[href]:not(.btn):not(.nav-item) { color: var(--accent); text-decoration: underline; text-decoration-color: var(--ocre); text-underline-offset: 3px; text-decoration-thickness: 1.5px; transition: color .15s; }
.content a[href]:not(.btn):not(.nav-item):hover { color: var(--ocre); }

/* Listes puces ocre — plus scannables */
ul.clean { list-style: none; margin: 10px 0; padding-left: 2px; }
ul.clean li { position: relative; padding-left: 22px; margin: 8px 0; line-height: 1.55; }
ul.clean li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ocre); box-shadow: 0 0 0 3px var(--ocre-soft); }
ul.clean.small li { margin: 6px 0; }

/* Listes numérotées — pastilles ocre */
ol.clean { list-style: none; counter-reset: ocount; margin: 10px 0; padding-left: 2px; }
ol.clean li { counter-increment: ocount; position: relative; padding-left: 34px; margin: 10px 0; line-height: 1.55; }
ol.clean li::before {
  content: counter(ocount); position: absolute; left: 0; top: -1px;
  width: 23px; height: 23px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; background: var(--ocre);
  border-radius: 50%; box-shadow: 0 2px 5px rgba(176,141,87,.35); font-variant-numeric: normal;
}

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #cdd6e4;
  position: fixed; top: 0; bottom: 0; left: 0;
  display: flex; flex-direction: column;
  z-index: 40;
  border-right: 1px solid rgba(255,255,255,.05);
}
.brand {
  padding: 24px 22px 18px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.brand h1 { font-size: 17px; margin: 0; color: #fff; letter-spacing: 1.5px; font-weight: 700; text-transform: uppercase; }
.brand .sub { font-size: 9px; color: var(--ocre-2); letter-spacing: 3px; text-transform: uppercase; margin-top: 5px; }
.nav { flex: 1; overflow-y: auto; padding: 12px 12px 20px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 13px; border-radius: var(--radius-sm);
  color: #b7c1d2; font-size: 15px; margin: 1px 0;
  border: none; background: none; width: 100%; text-align: left;
  font-family: var(--serif);
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: rgba(176,141,87,.16); color: #fff; box-shadow: inset 3px 0 0 var(--ocre); }
.nav-item .ic { width: 17px; height: 17px; flex: 0 0 17px; opacity: .82; }
.nav-item.active .ic { opacity: 1; color: var(--ocre-2); }
.nav-foot { padding: 14px 18px; font-size: 11px; color: #7d8aa0; letter-spacing: .3px; border-top: 1px solid rgba(255,255,255,.09); line-height: 1.7; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
  position: relative; z-index: 30;
  background: rgba(241,239,234,.9);
  border-bottom: 1px solid var(--line);
  padding: 15px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar .title { font-size: 24px; font-weight: 700; color: var(--accent); letter-spacing: .2px; line-height: 1.1; }
.topbar .crumb { font-size: 10px; color: var(--ocre); letter-spacing: 2.6px; text-transform: uppercase; margin-bottom: 3px; }
.content { padding: 30px 32px 70px; max-width: 1180px; }

.mobile-only { display: none; }
.burger { display: none; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); width: 40px; height: 40px; font-size: 18px; }

/* ---------- Typo helpers ---------- */
.section-title {
  font-size: 14px; font-weight: 700; color: var(--accent);
  margin: 34px 0 16px; display: flex; align-items: center; gap: 11px;
  text-transform: uppercase; letter-spacing: 2px;
  padding-bottom: 11px; border-bottom: 2px solid var(--accent);
}
.section-title:first-child { margin-top: 0; }
.section-title .bar { width: 4px; height: 16px; background: var(--ocre); border-radius: 2px; box-shadow: 0 0 0 3px var(--ocre-soft); }
.section-title .count { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--ocre); background: var(--ocre-soft); padding: 1px 9px; border-radius: 30px; text-transform: none; }
/* Emplacement d'actions poussé à droite du titre (boutons, tabs, badges) */
.section-title .st-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: normal; }
.lead {
  color: #55524c; font-size: 17.5px; max-width: 780px; line-height: 1.62;
  border-left: 3px solid var(--ocre); padding: 2px 0 2px 16px; margin: 0 0 4px;
}
.lead strong { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.editable { outline: none; border-radius: var(--radius-sm); padding: 2px 4px; transition: background .15s; }
.editable:hover { background: var(--cream); }
.editable:focus { background: var(--cream); box-shadow: inset 0 0 0 1px var(--ocre); }

/* ---------- Cards ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
  transition: box-shadow .22s ease, border-color .22s ease;
}
.card:hover { box-shadow: 0 2px 4px rgba(22,38,63,.05), 0 14px 34px rgba(22,38,63,.09); border-color: #d8d0c1; }
.card.pad-lg { padding: 24px; }
/* Titres internes de carte */
.card > h3, .card > h4, .card-title {
  margin: 0 0 12px; color: var(--accent); font-size: 17px; font-weight: 700;
  letter-spacing: .2px; display: flex; align-items: center; gap: 8px;
}
.card > h4 { font-size: 15.5px; }
.card-title .ic { color: var(--ocre); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g6 { grid-template-columns: repeat(6, 1fr); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 6px; }

/* ---------- KPI stat card ---------- */
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; transition: box-shadow .22s ease, transform .22s ease; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--ocre-2), var(--ocre)); opacity: .35; transition: opacity .2s, width .2s; }
.stat:hover { box-shadow: 0 2px 4px rgba(22,38,63,.05), 0 16px 36px rgba(22,38,63,.1); transform: translateY(-2px); }
.stat:hover::before { opacity: 1; width: 4px; }
.stat .label { font-size: 10px; color: var(--soft); font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
.stat .value { font-size: 33px; font-weight: 700; color: var(--accent); margin-top: 7px; line-height: 1.02; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.3px; }
.stat .value small { font-size: 15px; color: var(--muted); font-weight: 400; }
.stat .foot { font-size: 12.5px; color: var(--muted); margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line2); }
.stat .corner { position: absolute; top: 14px; right: 14px; opacity: .4; color: var(--ocre); }
.stat .corner .ic { width: 22px; height: 22px; }

/* ---------- Progress ---------- */
.progress { height: 8px; background: var(--line2); border-radius: 20px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--ocre) 0%, var(--ocre-2) 100%); border-radius: 20px; transition: width .5s ease; }
.progress.navy > span { background: linear-gradient(90deg, var(--accent) 0%, #2a3d5c 100%); }
.progress.green > span { background: var(--green); }
.progress.tall { height: 12px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 40px; border: 1px solid transparent; white-space: nowrap; letter-spacing: .4px; text-transform: uppercase; }
.badge.green { color: var(--green); background: var(--green-bg); }
.badge.orange { color: #9a6f13; background: var(--orange-bg); }
.badge.red { color: var(--red); background: var(--red-bg); }
.badge.navy { color: var(--accent); background: var(--blue-bg); }
.badge.brass { color: #8a6a2c; background: var(--ocre-soft); }
.badge.ghost { color: var(--muted); background: var(--line2); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--green); } .dot.orange { background: var(--orange); } .dot.red { background: var(--red); } .dot.navy { background: var(--accent); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: 9px 18px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 400; font-family: var(--serif); letter-spacing: .3px; transition: .18s; }
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.brass { background: var(--ocre); color: #fff; border-color: var(--ocre); }
.btn.brass:hover { background: #9c7b48; border-color: #9c7b48; }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent); transform: translateY(-1px); }
.btn.sm { padding: 6px 12px; font-size: 13px; background: transparent; color: var(--accent); border-color: var(--line); }
.btn.sm:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-soft); }
.btn.danger { color: var(--red); background: transparent; border-color: var(--line); }
.btn.danger:hover { border-color: var(--red); background: var(--red-bg); color: var(--red); }
.btn.block { width: 100%; justify-content: center; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ocre-soft); }
.btn:active { transform: translateY(0); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.tbl th { text-align: left; background: var(--cream); color: var(--accent); font-weight: 700; padding: 12px 13px; border-bottom: 2px solid var(--line); white-space: nowrap; font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; }
table.tbl td { padding: 12px 13px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.tbl tbody tr:nth-child(even) td { background: #fcfbf8; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover td { background: var(--ocre-soft); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums lining-nums; }
table.tbl td b { color: var(--accent); }

/* ---------- Forms ---------- */
input, select, textarea { font-family: var(--serif); font-size: 15px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ocre); box-shadow: 0 0 0 3px rgba(176,141,87,.16); }
label.fld { display: block; font-size: 10.5px; font-weight: 700; color: var(--soft); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1.2px; }
.field { margin-bottom: 13px; }
textarea { resize: vertical; min-height: 74px; line-height: 1.5; }
.inline-num { width: 96px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Checkbox rows ---------- */
.check { display: flex; align-items: flex-start; gap: 11px; padding: 9px 4px; border-bottom: 1px solid var(--line2); }
.check:last-child { border-bottom: none; }
.check input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; accent-color: var(--ocre); cursor: pointer; }
.check.done label { color: var(--soft); text-decoration: line-through; }
.check label { cursor: pointer; font-size: 15px; }

/* ---------- Accordion ---------- */
.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.acc { transition: box-shadow .2s, border-color .2s; }
.acc:hover { border-color: #d8d0c1; }
.acc.open { box-shadow: 0 2px 4px rgba(22,38,63,.05), 0 14px 34px rgba(22,38,63,.09); }
.acc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; position: relative; transition: background .15s; }
.acc-head:hover { background: var(--cream); }
.acc.open .acc-head { background: var(--cream); box-shadow: inset 3px 0 0 var(--ocre); }
.acc-title { font-weight: 700; color: var(--accent); font-size: 16.5px; letter-spacing: .2px; }
.acc-body { padding: 4px 20px 18px; display: none; }
.acc.open .acc-body { display: block; }
.acc .chev { transition: transform .2s; color: var(--ocre); }
.acc.open .chev { transform: rotate(90deg); }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.kcol { flex: 0 0 256px; background: var(--cream); border: 1px solid var(--line2); border-radius: var(--radius); padding: 11px; }
.kcol h4 { margin: 4px 6px 11px; font-size: 10px; color: var(--accent); text-transform: uppercase; letter-spacing: 1.6px; font-weight: 700; display: flex; justify-content: space-between; }
.kcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: pointer; transition: border .15s, transform .15s; }
.kcard:hover { border-color: var(--ocre); transform: translateY(-1px); }
.kcard .kt { font-weight: 700; color: var(--accent); font-size: 15px; }
.kcard .km { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; margin-bottom: 16px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--ocre); border: 2px solid var(--bg); }
.tl-item.done::before { background: var(--green); }

/* ---------- Alert ---------- */
.alert { border-radius: var(--radius-sm); padding: 13px 15px; font-size: 14.5px; display: flex; gap: 11px; align-items: flex-start; line-height: 1.5; }
.alert .ic { flex: 0 0 auto; margin-top: 2px; }
.alert.red { background: var(--red-bg); color: #7f2626; border: 1px solid #eec4c1; }
.alert.orange { background: var(--orange-bg); color: #7d5a10; border: 1px solid #ead9b0; }
.alert.green { background: var(--green-bg); color: #1e5540; border: 1px solid #c3ddcc; }
.alert.navy { background: var(--accent-soft); color: var(--accent); border: 1px solid #d3ddec; }

/* ---------- Pills / tabs ---------- */
.tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { padding: 8px 16px; border-radius: 40px; border: 1px solid var(--line); background: var(--paper); font-size: 13.5px; font-weight: 400; color: var(--muted); font-family: var(--serif); letter-spacing: .3px; transition: .15s; }
.tab:hover { border-color: var(--ocre); color: var(--accent); }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Chart (bars) ---------- */
.chart { display: flex; align-items: flex-end; gap: 7px; height: 168px; padding: 8px 0 6px; border-bottom: 2px solid var(--line); background-image: repeating-linear-gradient(to top, transparent, transparent 41px, var(--line2) 41px, var(--line2) 42px); }
.chart .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; position: relative; }
.chart .bar { width: 62%; background: linear-gradient(180deg, var(--ocre-2), var(--ocre)); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .5s ease, filter .15s; position: relative; }
.chart .bar-wrap:hover .bar { filter: brightness(1.08) saturate(1.1); }
.chart .bar.navy { background: linear-gradient(180deg, #2a3d5c, var(--accent)); }
/* Valeur au sommet de la barre (via attribut data-v) */
.chart .bar[data-v]::after { content: attr(data-v); position: absolute; top: -19px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: var(--accent); opacity: 0; transition: opacity .15s; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart .bar-wrap:hover .bar[data-v]::after { opacity: 1; }
.chart .bl { font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.3; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(22,38,63,.42); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 44px 16px; overflow-y: auto; }
.modal { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 580px; padding: 26px; border-top: 3px solid var(--ocre); }
.modal h3 { margin: 0 0 18px; color: var(--accent); font-size: 21px; letter-spacing: .3px; }

/* ---------- Misc ---------- */
.copybtn.copied { color: var(--green); border-color: var(--green); background: var(--green-bg); }
.tag { font-size: 10px; font-weight: 700; letter-spacing: 2.6px; text-transform: uppercase; color: var(--ocre); display: inline-flex; align-items: center; gap: 7px; }
.tag::before { content: ""; width: 14px; height: 2px; background: var(--ocre); border-radius: 2px; }
.divider { height: 1px; background: linear-gradient(90deg, var(--line), transparent); margin: 18px 0; border: none; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
ul.clean { margin: 8px 0; padding-left: 20px; }
ul.clean li { margin: 6px 0; }
ol.clean { margin: 8px 0; padding-left: 22px; }
ol.clean li { margin: 7px 0; }
pre { font-family: var(--serif); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: 14.5px; }
.kv .k { color: var(--soft); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding-top: 2px; }

.hero { background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 62%, #1c3252 100%); color: #fff; border-radius: var(--radius); padding: 30px 30px 28px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -50px; top: -50px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(176,141,87,.3), transparent 70%); }
.hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--ocre-2), var(--ocre)); }
.hero h2 { margin: 0 0 12px; font-size: 28px; font-weight: 700; letter-spacing: .1px; line-height: 1.16; max-width: 34ch; position: relative; }
.hero h2::after { content: ""; display: block; width: 58px; height: 3px; background: var(--ocre); margin-top: 14px; border-radius: 2px; }
.hero .sub { color: #c3cede; font-size: 15.5px; line-height: 1.55; position: relative; }
.hero .sub b, .hero .sub strong { color: #fff; }

/* ---------- Écran de connexion (auth gate) ---------- */
.auth-wrap { flex: 1 1 100%; width: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background:
  radial-gradient(1200px 620px at 50% -12%, #21375a 0%, var(--accent) 44%, var(--accent-2) 100%); }
.auth-card { width: 100%; max-width: 468px; background: var(--paper); border-radius: 18px;
  border-top: 4px solid var(--ocre); box-shadow: 0 34px 90px rgba(8,16,34,.5); padding: 46px 46px 30px; text-align: center; }
.auth-kicker { font-size: 12px; letter-spacing: 5px; text-transform: uppercase; color: var(--ocre); font-weight: 700; }
.auth-brand { font-size: 36px; font-weight: 700; margin-top: 12px; letter-spacing: .5px; line-height: 1.05; }
.auth-brand .b-ink { color: var(--ink); }
.auth-brand .b-ocre { color: var(--ocre); }
.auth-sub { font-size: 16px; color: var(--muted); margin-top: 12px; }
.auth-card .auth-fld { text-align: left; margin: 22px 0 0; }
.auth-card .auth-fld > span { display: block; text-transform: none; letter-spacing: 0; font-size: 15px;
  font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.auth-card .auth-fld input { padding: 14px 16px; font-size: 16px; border-radius: 11px;
  border: 1px solid var(--line); background: #fdfcfa; }
.auth-card .auth-fld input:focus { border-color: var(--ocre); box-shadow: 0 0 0 3px var(--ocre-soft); outline: none; }
.auth-card .auth-submit { width: 100%; margin-top: 28px; padding: 16px; font-size: 17px; border-radius: 11px; letter-spacing: .3px; }
.auth-card .auth-submit[disabled] { opacity: .6; cursor: default; }
.auth-foot { margin-top: 24px; font-size: 12.5px; color: var(--soft); }
.auth-switch { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.auth-switch a { color: var(--accent); font-weight: 700; text-decoration: underline; }
@media (max-width: 520px) { .auth-card { padding: 36px 26px 26px; } .auth-brand { font-size: 30px; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g6 { grid-template-columns: repeat(3, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s; width: 264px; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .burger { display: inline-flex; align-items: center; justify-content: center; }
  .content { padding: 20px 16px 60px; }
  .topbar { padding: 13px 16px; }
  .topbar .title { font-size: 20px; }
  .g2, .g3, .g4, .g6 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv .k { margin-top: 8px; }
  .backdrop { position: fixed; inset: 0; background: rgba(22,38,63,.4); z-index: 39; }
}
