/* Outil RSE Advyteam — système visuel. Vert olive Advyteam en accent, fond clair, beaucoup d'air. */
:root {
  --accent: #6b7521;
  --accent-dark: #4c5417;
  --accent-soft: #eef1dd;
  --accent-tint: #f7f8ef;
  --ink: #1c211e;
  --ink-2: #3d4440;
  --muted: #6b726e;
  --line: #e4e6df;
  --line-strong: #d3d6cc;
  --bg: #f5f6f2;
  --card: #ffffff;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --warn: #9a6200;
  --warn-soft: #fff8e6;
  --info: #1f5a8a;
  --info-soft: #eef5fb;
  --ok: #217a3c;
  --ok-soft: #ecf7ef;
  --violet: #6b3fa0;
  --violet-soft: #f4eefb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 30, 20, .05), 0 1px 3px rgba(20, 30, 20, .05);
  --shadow-lg: 0 12px 32px rgba(20, 30, 20, .12);
  font-family: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.5; }
a { color: var(--accent-dark); text-underline-offset: 2px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; letter-spacing: -.005em; }
h3 { font-size: .95rem; margin: 1rem 0 .4rem; }
p { margin: .35rem 0; }
small, .muted { color: var(--muted); }
code { background: var(--accent-tint); padding: .05rem .3rem; border-radius: 4px; font-size: .88em; }
[hidden] { display: none !important; }

/* ---------- Barre supérieure ---------- */
#topbar { display: flex; align-items: center; gap: 1.5rem; padding: .55rem 1.5rem; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; }
.brand-text { font-size: .98rem; }
.brand-text strong { color: var(--accent); }
#nav { display: flex; gap: .15rem; flex: 1; flex-wrap: wrap; }
#nav a { text-decoration: none; color: var(--ink-2); padding: .45rem .8rem; border-radius: 999px; font-size: .93rem; font-weight: 500; }
#nav a:hover { background: var(--accent-tint); }
#nav a.active { background: var(--accent-soft); color: var(--accent-dark); }
.who { display: flex; align-items: center; gap: .5rem; font-size: .88rem; }
.who-text { display: flex; flex-direction: column; line-height: 1.15; margin-right: .3rem; }
.who-text small { font-size: .75rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); display: grid; place-items: center; font-weight: 600; font-size: .8rem; }
.count { background: var(--danger); color: #fff; border-radius: 10px; padding: 0 .42rem; font-size: .72rem; margin-left: .25rem; font-weight: 600; }

main { max-width: 1180px; margin: 0 auto; padding: 1.75rem 1.5rem 4rem; }
.banner { padding: .45rem 1.5rem; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid #f2e2b6; font-size: .85rem; text-align: center; }

/* ---------- Structure ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.row { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head p { margin-top: .3rem; max-width: 46rem; }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 1.5rem 0 .6rem; }
@media (max-width: 860px) { .grid2, .grid3, .cols { grid-template-columns: 1fr; } }

/* ---------- Boutons et champs ---------- */
button, .btn { font: inherit; font-weight: 500; border: 1px solid var(--accent); background: var(--accent); color: #fff; padding: .5rem 1rem; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; line-height: 1.3; transition: background .15s, border-color .15s; }
button:hover, .btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button.secondary, .btn.secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
button.secondary:hover, .btn.secondary:hover { background: var(--accent-tint); border-color: var(--accent); }
button.ghost, .btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
button.ghost:hover, .btn.ghost:hover { background: var(--accent-tint); }
button.danger { background: #fff; color: var(--danger); border-color: #f1c4bf; }
button.danger:hover { background: var(--danger-soft); }
button.link { background: none; border: none; color: var(--accent-dark); padding: 0 .15rem; text-decoration: underline; font-weight: 400; }
button.link:hover { background: none; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.small, .btn.small { padding: .28rem .65rem; font-size: .85rem; }
button.big, .btn.big { padding: .65rem 1.2rem; font-size: 1rem; }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid #c7d07a; outline-offset: 2px; }

label { display: block; font-size: .82rem; font-weight: 500; color: var(--ink-2); margin-bottom: .3rem; }
input, select, textarea { font: inherit; width: 100%; padding: .55rem .7rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #e3e8c4; }
textarea { min-height: 4.5rem; resize: vertical; line-height: 1.5; }
textarea.editor { min-height: 34rem; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .88rem; line-height: 1.6; border-radius: var(--radius); padding: 1rem; }
textarea.note { min-height: 9rem; background: #fffdf6; }
input[type=search] { padding-left: 2.2rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b726e' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat .75rem center; }

/* ---------- Tableaux (écrans d'administration) ---------- */
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #fafbf8; font-weight: 600; }
tr.clickable:hover { background: var(--accent-tint); cursor: pointer; }
.card > table { border: 1px solid var(--line); }

/* ---------- Pastilles ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .12rem .6rem; font-size: .76rem; font-weight: 500; border: 1px solid transparent; background: #f0f1ed; color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.st-brouillon { background: #f0f1ed; color: #4a514c; }
.st-a_relire { background: var(--info-soft); color: var(--info); }
.st-a_approuver { background: var(--warn-soft); color: var(--warn); }
.st-approuve { background: var(--ok-soft); color: var(--ok); }
.fs-declare { background: var(--info-soft); color: var(--info); }
.fs-documente { background: var(--ok-soft); color: var(--ok); }
.fs-a_verifier { background: var(--warn-soft); color: var(--warn); }
.fs-propose { background: var(--violet-soft); color: var(--violet); }
.fs-inconnu { background: #f0f1ed; color: var(--muted); }
.chip { display: inline-block; font-weight: 700; font-size: .78rem; letter-spacing: .02em; color: var(--accent-dark); background: var(--accent-soft); border-radius: 6px; padding: .12rem .45rem; }

/* ---------- Indicateurs (liste des livrables) ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin-bottom: 1.25rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; text-align: left; color: var(--ink); cursor: pointer; display: block; box-shadow: var(--shadow); }
.kpi:hover { border-color: var(--accent); background: #fff; }
.kpi.active { border-color: var(--accent); box-shadow: 0 0 0 3px #e3e8c4; }
.kpi .n { font-size: 1.6rem; font-weight: 700; line-height: 1.1; display: block; }
.kpi .l { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; }
.kpi .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

.toolbar { display: flex; gap: .7rem; margin-bottom: 1rem; flex-wrap: wrap; }
.toolbar .grow { flex: 1; min-width: 14rem; }
.toolbar select { width: auto; min-width: 12rem; }

.dgroup { margin-bottom: 1.25rem; }
.dgroup h3 { margin: 0 0 .5rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
.dgroup h3 span { background: #ebede6; border-radius: 999px; padding: 0 .45rem; font-size: .72rem; }
.dlist { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ditem { display: grid; grid-template-columns: 4rem minmax(0, 1fr) 9rem 8.5rem 1rem; gap: 1rem; align-items: center; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.ditem:last-child { border-bottom: none; }
.ditem:hover { background: var(--accent-tint); }
.ditem .t { font-weight: 600; color: var(--ink); }
.ditem .m { font-size: .82rem; color: var(--muted); margin-top: .1rem; }
.ditem .chev { color: var(--line-strong); font-size: 1.2rem; }
.ditem:hover .chev { color: var(--accent); }
@media (max-width: 760px) {
  .ditem { grid-template-columns: 3.4rem minmax(0, 1fr); row-gap: .4rem; }
  .ditem .prog, .ditem .chev { display: none; }
  .ditem > :nth-child(4) { grid-column: 2; }
}
.progress { height: 6px; background: #e8eae3; border-radius: 3px; overflow: hidden; width: 100%; display: block; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.prog small { display: block; font-size: .75rem; margin-top: .25rem; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }

/* ---------- En-tête de livrable et étape suivante ---------- */
.crumb { font-size: .88rem; margin-bottom: .8rem; display: inline-block; text-decoration: none; color: var(--muted); }
.crumb:hover { color: var(--accent-dark); }
.hero { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1rem; }
.hero .meta { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .5rem; color: var(--muted); font-size: .86rem; }
.next { display: flex; align-items: center; gap: 1rem; justify-content: space-between; background: linear-gradient(135deg, #f4f6e6, #fbfcf6); border: 1px solid #dfe5bd; border-radius: var(--radius); padding: .9rem 1.2rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.next .lbl { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-dark); font-weight: 700; }
.next .txt { font-weight: 600; margin-top: .1rem; }
.next .sub { font-size: .85rem; color: var(--muted); }

/* Étapes du parcours */
.tabs { display: flex; gap: .4rem; margin: 0 0 1.25rem; padding: .35rem; background: #ebede6; border-radius: 12px; overflow-x: auto; }
.tabs button { flex: 1; background: none; color: var(--ink-2); border: none; border-radius: 9px; padding: .55rem .7rem; justify-content: center; white-space: nowrap; font-size: .9rem; }
.tabs button:hover { background: rgba(255,255,255,.6); }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.tabs button .step { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #d7dacf; color: #fff; font-size: .72rem; font-weight: 700; flex: none; }
.tabs button.active .step { background: var(--accent); }
.tabs button.done .step { background: var(--ok); }
.tabs button.done .step::after { content: "✓"; }
.tabs button.done .step span { display: none; }
.subtabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.subtabs button { background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; color: var(--muted); padding: .5rem .8rem; }
.subtabs button:hover { background: none; color: var(--ink); }
.subtabs button.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }

/* Pipeline de statut */
.pipeline { display: flex; gap: 0; margin: .4rem 0 1rem; }
.pipeline .s { flex: 1; text-align: center; font-size: .8rem; color: var(--muted); position: relative; padding-top: 1.6rem; }
.pipeline .s::before { content: ""; position: absolute; top: .45rem; left: 50%; width: .9rem; height: .9rem; margin-left: -.45rem; border-radius: 50%; background: #d7dacf; z-index: 1; }
.pipeline .s::after { content: ""; position: absolute; top: .83rem; left: -50%; width: 100%; height: 2px; background: #d7dacf; }
.pipeline .s:first-child::after { display: none; }
.pipeline .s.done::before, .pipeline .s.done::after, .pipeline .s.cur::after { background: var(--ok); }
.pipeline .s.cur::before { background: var(--accent); box-shadow: 0 0 0 4px #e3e8c4; }
.pipeline .s.cur { color: var(--ink); font-weight: 600; }

/* ---------- Messages ---------- */
.alert { border-radius: var(--radius-sm); padding: .7rem .95rem; margin: .6rem 0; border: 1px solid; font-size: .92rem; }
.alert.error { background: var(--danger-soft); color: var(--danger); border-color: #f6cfca; }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: #f2e2b6; }
.alert.info { background: var(--info-soft); color: #1d3f5e; border-color: #cfe0ef; }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: #c6e6cf; }

/* ---------- Faits, réponses, pièces ---------- */
.fact { border: 1px solid var(--line); border-left: 3px solid var(--line-strong); border-radius: var(--radius-sm); padding: .6rem .8rem; margin: .5rem 0; background: #fff; color: var(--ink); }
.fact.fs-a_verifier { border-left-color: #e2b84a; background: #fff; color: var(--ink); }
.fact.fs-documente { border-left-color: #5fae74; background: #fff; color: var(--ink); }
.fact.fs-declare { border-left-color: #7aa6cc; background: #fff; color: var(--ink); }
.fact.fs-propose { border-left-color: #9a76c4; background: #fff; color: var(--ink); }
.fact.fs-inconnu { border-left-color: #bbb; background: #fff; color: var(--ink); }
.fact .meta { font-size: .78rem; color: var(--muted); margin-top: .35rem; display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

details.fold { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin: .5rem 0; }
details.fold > summary { list-style: none; cursor: pointer; padding: .7rem .9rem; display: flex; align-items: center; gap: .6rem; font-weight: 600; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "›"; color: var(--muted); font-size: 1.2rem; line-height: 1; transition: transform .15s; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary .n { margin-left: auto; font-weight: 500; font-size: .8rem; color: var(--muted); }
details.fold > .body { padding: 0 .9rem .8rem; }

/* Questions */
.qa { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin: .75rem 0; background: #fff; box-shadow: var(--shadow); }
.qa.answered { border-left: 4px solid var(--ok); }
.qa.open { border-left: 4px solid #e2b84a; }
.qa .q { font-weight: 600; margin-bottom: .55rem; }
.qa .origin { font-size: .74rem; color: var(--muted); font-weight: 400; display: block; margin-top: .1rem; }
.qa .opts { display: grid; grid-template-columns: 13rem minmax(0, 1fr) auto; gap: .6rem; margin-top: .6rem; align-items: start; }
@media (max-width: 760px) { .qa .opts { grid-template-columns: 1fr; } }
details.qa-done { border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: var(--radius); background: #fff; margin: .5rem 0; }
details.qa-done > summary { list-style: none; cursor: pointer; padding: .75rem 1rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; }
details.qa-done > summary::-webkit-details-marker { display: none; }
details.qa-done > summary .qq { font-weight: 600; }
details.qa-done > summary .aa { grid-column: 1; color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.qa-done > summary .badge { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
details.qa-done[open] > summary { border-bottom: 1px solid var(--line); }
details.qa-done .qa { border: none; box-shadow: none; margin: 0; border-radius: 0 0 var(--radius) var(--radius); }
.progress-big { display: flex; align-items: center; gap: 1rem; }
.progress-big .progress { height: 8px; flex: 1; }

/* ---------- Brouillon ---------- */
.seg { display: inline-flex; background: #ebede6; border-radius: 9px; padding: .2rem; gap: .15rem; }
.seg button { background: none; border: none; color: var(--ink-2); padding: .35rem .8rem; border-radius: 7px; font-size: .85rem; }
.seg button:hover { background: rgba(255,255,255,.6); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.editor-wrap { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.editor-wrap.mode-split { grid-template-columns: 1fr 1fr; }
.editor-wrap.mode-preview .edit-col { display: none; }
.editor-wrap.mode-edit .prev-col { display: none; }
@media (max-width: 1000px) { .editor-wrap.mode-split { grid-template-columns: 1fr; } }
.paper-bg { background: #e9ebe4; border-radius: var(--radius); padding: 1.5rem; }
.preview { background: #fff; border-radius: 4px; padding: 2.5rem 3rem; min-height: 30rem; font-family: Arial, sans-serif; font-size: 10.5pt; color: #211f1f; line-height: 1.55; max-width: 820px; margin: 0 auto; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.editor-wrap.mode-split .preview { padding: 1.5rem 1.6rem; }
.preview .doc-kicker { color: #6b7521; font-weight: 700; font-size: 8.5pt; letter-spacing: .06em; }
.preview .doc-title { font-size: 17pt; font-weight: 700; margin: .2rem 0 .1rem; }
.preview .doc-sub { color: #525252; font-size: 9pt; margin-bottom: 1.2rem; }
.preview h2 { color: var(--ink); font-size: 12pt; margin: 1.2rem 0 .4rem; }
.preview h3 { font-size: 10.5pt; }
.preview mark { background: #fff36b; padding: 0 .1rem; }
@media (max-width: 760px) { .preview { padding: 1.2rem; } .paper-bg { padding: .6rem; } }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: .7rem; padding: .75rem 1rem; margin-top: 1rem; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); flex-wrap: wrap; }
.savebar .state { font-size: .85rem; color: var(--muted); margin-right: auto; }
.savebar .state.dirty { color: var(--warn); font-weight: 600; }
.stats { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .86rem; color: var(--muted); }
.stats b { color: var(--ink); }

/* ---------- Divers ---------- */
#toast { position: fixed; bottom: 1.2rem; right: 1.2rem; display: flex; flex-direction: column; gap: .5rem; z-index: 100; }
#toast .t { background: var(--ink); color: #fff; padding: .7rem 1rem; border-radius: 10px; max-width: 26rem; box-shadow: var(--shadow-lg); font-size: .9rem; animation: up .2s ease-out; }
#toast .t.error { background: var(--danger); }
@keyframes up { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

dialog { border: none; border-radius: 16px; padding: 0; max-width: 760px; width: 92vw; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(20, 25, 22, .4); backdrop-filter: blur(2px); }
#modal-form { padding: 1.5rem 1.6rem; max-height: 86vh; overflow: auto; }
#modal-form h2 { font-size: 1.2rem; }
#modal-form .actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.2rem; }
pre.raw { white-space: pre-wrap; background: #fafbf8; border: 1px solid var(--line); padding: .8rem; border-radius: var(--radius-sm); max-height: 50vh; overflow: auto; font-size: .82rem; }

.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-side { background: linear-gradient(160deg, #6b7521, #3f4613); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.login-side h1 { font-size: 2rem; margin-top: 1rem; }
.login-side p { opacity: .85; max-width: 26rem; }
.login-side ol { padding-left: 1.2rem; opacity: .9; line-height: 1.9; }
.login-main { display: grid; place-items: center; padding: 2rem; }
.login { width: 100%; max-width: 380px; }
.login h2 { font-size: 1.4rem; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-side { display: none; } }
body.is-login main { max-width: none; padding: 0; }

.kv { display: grid; grid-template-columns: 11rem 1fr; gap: .3rem .9rem; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.spinner { display: inline-block; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  #topbar { padding: .5rem 1rem; gap: .6rem; }
  #nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .who-text, #btn-password { display: none; }
  main { padding: 1.2rem 1rem 3rem; }
  h1 { font-size: 1.3rem; }
  table { display: block; overflow-x: auto; }
  .tabs button { flex: none; }
  .tabs button .lbl-long { display: none; }
}
@media (max-width: 760px) {
  #nav { flex: 1 1 100%; }
  .kpis { display: flex; overflow-x: auto; gap: .6rem; padding-bottom: .2rem; }
  .kpi { flex: 0 0 8.5rem; }
  .savebar { padding: .5rem .7rem; gap: .5rem; flex-wrap: nowrap; }
  .savebar .state { display: none; }
  .savebar button { flex: 1; justify-content: center; padding: .45rem .6rem; font-size: .88rem; }
  .next { padding: .8rem 1rem; }
}
@media (max-width: 760px) { .lbl-long { display: none; } }
