/* ==========================================================================
   Charte graphique Brocéliande Digital
   Bleu nuit #080739 · Bleu principal #3c5599 · Bleu rappel #5AC1DA · Rose #E622A5
   Thème clair uniquement.
   Typographie : Nexa (si installée sur le poste) sinon Montserrat, embarquée (licence OFL).
   Pour utiliser les fichiers Nexa sous licence : les déposer dans assets/fonts/ et décommenter
   le bloc @font-face « Nexa » ci-dessous.
   ========================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/montserrat.woff2") format("woff2-variations"), url("/assets/fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/*
@font-face { font-family: "Nexa"; src: url("/assets/fonts/Nexa-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nexa"; src: url("/assets/fonts/Nexa-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
*/

:root {
  /* Couleurs de marque */
  --navy: #080739;
  --blue: #3c5599;
  --cyan: #5AC1DA;
  --pink: #E622A5;
  --brand-gradient: linear-gradient(120deg, #080739 0%, #1f2c6e 45%, #3c5599 80%, #5AC1DA 140%);

  --bg: #f5f6fd;
  --surface: #ffffff;
  --text: #080739;
  --muted: #4f5579;
  --border: #dde1f1;
  --accent: #3c5599;
  --accent-hover: #080739;
  --accent-soft: #eaeef8;
  --on-accent: #ffffff;
  --rail-2: #080739;
  --ok: #17784a;
  --ok-soft: #e3f4eb;
  --warn: #8f5300;
  --warn-soft: #fdf0dc;
  --err: #b42318;
  --err-soft: #fdecea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(8, 7, 57, .05), 0 2px 8px rgba(8, 7, 57, .06);
  --font: "Nexa", "Montserrat", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 700; letter-spacing: -.005em; }
a { color: var(--accent); }
.pink { color: var(--pink); }

/* ---------- En-tête du formulaire client : dégradé + liseré ---------- */
header.top {
  position: relative;
  background: var(--brand-gradient);
  color: #fff;
  padding: 26px 0 34px;
  overflow: hidden;
}
header.top .inner { padding: 0 16px; }
header.top::after {
  /* Liseré : ligne fine à coin arrondi, comme sur les supports de la marque */
  content: "";
  position: absolute;
  inset: -1px 22px 14px -1px;
  border-right: 1px solid rgba(255, 255, 255, .55);
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  border-bottom-right-radius: 18px;
  pointer-events: none;
}
header.top .inner, main { max-width: 860px; margin: 0 auto; }
header.top .wordmark { font-size: 14px; font-weight: 500; letter-spacing: .02em; opacity: .9; }
header.top h1 { margin: 6px 0 0; font-size: 26px; font-weight: 700; color: #fff; }
header.top h1 .pink { color: var(--pink); }
header.top p { margin: 4px 0 0; color: rgba(255, 255, 255, .82); font-size: 14px; }
main { padding: 28px 16px 64px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.card h2 { margin: 0 0 14px; font-size: 17px; display: flex; gap: 10px; align-items: center; }
.card h2 + .hint { margin-top: -8px; }
.card h2 .num {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--cyan); color: var(--navy); font-size: 13px; font-weight: 700;
}
.card .hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

/* Rubriques du formulaire : bordure gauche aux couleurs de la charte */
#form > .card { border-left: 4px solid var(--cyan); }
#form > .card:nth-of-type(2) { border-left-color: var(--rail-2); }
#form > .card:nth-of-type(3) { border-left-color: var(--pink); }

.intro { color: var(--muted); margin: 0 0 20px; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .sub { font-weight: 400; color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; gap: 0; } }

input[type=text], input[type=email], input[type=search], input[type=password], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
textarea { resize: vertical; min-height: 70px; }
textarea.big { min-height: 160px; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.prefilled { background: var(--accent-soft); }

.with-na { display: flex; gap: 8px; align-items: flex-start; }
.with-na > input, .with-na > textarea { flex: 1; }
.na {
  flex: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit; font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.na:hover { color: var(--accent); border-color: var(--accent); }

.counter { font-size: 12px; color: var(--muted); margin-top: 4px; }
.counter.ok { color: var(--ok); }

.btn {
  border: 0; border-radius: 8px;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 20px; font: inherit; font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.secondary:hover { background: var(--accent-soft); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.actions { display: flex; justify-content: flex-end; gap: 12px; }

.drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
}
.drop.over { border-color: var(--cyan); background: var(--accent-soft); }
.drop strong { color: var(--accent); }
.files { list-style: none; padding: 0; margin: 10px 0 0; }
.files li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; font-size: 14px;
}
.files li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files button { border: 0; background: none; color: var(--err); cursor: pointer; font: inherit; }

.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.alert.err { background: var(--err-soft); color: var(--err); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.hidden { display: none !important; }

.done { text-align: center; padding: 40px 20px; }
.done .big-num { font-size: 32px; font-weight: 700; color: var(--pink); margin: 8px 0 16px; }

/* Admin */
.search { position: relative; }
.search input { padding-left: 38px; font-size: 16px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.results { margin-top: 16px; }
.client {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--border);
}
.client:first-child { border-top: 0; }
.client .name { font-weight: 700; }
.client .meta { color: var(--muted); font-size: 13px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 1px; }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.badge.off { background: var(--warn-soft); color: var(--warn); }
.empty { color: var(--muted); padding: 12px 0; }
.link-box { display: flex; gap: 8px; margin: 12px 0 8px; }
.link-box input { font-family: Consolas, monospace; font-size: 13px; }
@media (max-width: 640px) {
  .client { flex-direction: column; align-items: flex-start; }
  .link-box { flex-direction: column; }
}

/* ---------- Espace support : navigation, pages ---------- */
main.wide { max-width: 1200px; }
main.narrow { max-width: 540px; }
.page-head { margin-bottom: 22px; }
.page-head h1 {
  /* Crochet rose devant les titres, comme sur les supports de la marque */
  position: relative; margin: 0 0 4px; padding-left: 18px; font-size: 24px;
}
.page-head h1::before {
  content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 7px;
  border: 1px solid var(--pink); border-right: 0;
}
.page-head p { margin: 0; padding-left: 18px; color: var(--muted); }
.row-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.sub { color: var(--muted); font-size: 12px; font-weight: 400; }
.muted td { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* Barre de navigation : bleu nuit dans les deux thèmes */
.nav { background: var(--navy); color: #fff; border-bottom: 3px solid transparent; border-image: linear-gradient(90deg, var(--blue), var(--cyan)) 1; }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 28px; min-height: 60px; flex-wrap: wrap;
}
.nav a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.nav a:hover, .nav a.active { color: #fff; }
.nav .brand { display: flex; align-items: center; gap: 10px; color: #fff; white-space: nowrap; }
.nav .brand-symbol { width: 34px; height: 34px; flex: none; }
.nav .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav .brand strong { font-weight: 700; font-size: 16px; }
.nav .brand .brand-sub { font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .78); }
.nav .brand .pink { color: var(--pink); font-weight: 700; }
.nav-links { display: flex; gap: 22px; flex: 1; }
.nav-links a { padding: 19px 0 17px; border-bottom: 2px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap; }
.nav-links a.active { border-bottom-color: var(--pink); }
.nav-user { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.nav-user .who { font-weight: 700; color: #fff; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav .linklike { color: rgba(255, 255, 255, .78); }
.nav .linklike:hover { color: #fff; }
.nav .badge.on { background: var(--pink); color: #fff; }
.nav .badge.neutral { background: transparent; color: var(--cyan); border-color: var(--cyan); }
@media (max-width: 760px) {
  .nav-inner { gap: 8px 16px; padding: 10px 16px; }
  .nav-links { order: 3; flex-basis: 100%; }
  .nav-links a { padding: 6px 0; }
}

.linklike {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--accent); font: inherit; font-size: 14px;
}
.linklike:hover { text-decoration: underline; }

.badge.neutral { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.badge.bad { background: var(--err-soft); color: var(--err); }
.badge { margin-left: 0; white-space: nowrap; }
.client .badge { margin-left: 6px; }
.alert.warn { background: var(--warn-soft); color: var(--warn); }

select, input[type=date] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit;
}
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; font-weight: 600; font-size: 14px; }
.btn.block { width: 100%; padding: 12px; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.btn:disabled { cursor: default; }

/* Tableaux */
.card.flush { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
  background: var(--accent-soft);
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .empty { text-align: center; padding: 28px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; }
.table tr.clickable { cursor: pointer; }
.logs td:nth-child(3) { white-space: nowrap; }
.table tr.clickable:hover td, .table tr.open td { background: var(--accent-soft); }
.detail-row td { background: var(--bg); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 4px 0; }
.details dt { color: var(--muted); font-size: 13px; }
.details dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.pager div { display: flex; align-items: center; gap: 10px; }

/* Journal */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--cyan);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px;
}
.stat:hover { border-color: var(--accent); border-top-color: var(--pink); }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { font-size: 30px; font-weight: 700; line-height: 1.2; margin: 4px 0 2px; }
.stat-sub { color: var(--muted); font-size: 12px; }
.stat.bad .stat-value { color: var(--err); }
.stat.warn .stat-value { color: var(--warn); }
.filters { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end; }
.filters .field { margin: 0; flex: 0 1 160px; }
.filters .field.grow { flex: 1 1 240px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Boîtes de dialogue */
dialog {
  border: 1px solid var(--border); border-top: 4px solid var(--pink); border-radius: var(--radius); padding: 24px;
  width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--text);
}
dialog::backdrop { background: rgba(8, 7, 57, .55); }
dialog h2 { margin: 0 0 16px; font-size: 18px; }
dialog .actions { margin-top: 20px; }

/* Mot de passe */
.meter { height: 4px; background: var(--border); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; transition: width .2s; }
.meter .weak { background: var(--err); }
.meter .medium { background: var(--warn); }
.meter .strong { background: var(--ok); }

/* ---------- Page de connexion : fond bleu nuit, dégradé, liseré ---------- */
.auth-page {
  min-height: 100vh; display: grid; place-items: center;
  background: radial-gradient(1200px 700px at 85% 15%, rgba(60, 85, 153, .55), transparent 60%),
              radial-gradient(900px 600px at 0% 100%, rgba(90, 193, 218, .18), transparent 60%),
              var(--navy);
}
.auth-page::after {
  /* Liseré blanc à coin arrondi (droite + bas), comme la page de titre de la charte */
  content: ""; position: fixed; top: -1px; left: -1px; right: 36px; bottom: 42px;
  border-right: 1px solid rgba(255, 255, 255, .55); border-bottom: 1px solid rgba(255, 255, 255, .55);
  border-bottom-right-radius: 22px; pointer-events: none;
}
.brand-foot {
  position: fixed; right: 64px; bottom: 30px; padding: 0 14px;
  background: var(--navy); color: #fff; font-size: 15px; font-weight: 500; z-index: 1;
}
.auth-wrap { width: 100%; max-width: 430px; padding: 24px 16px 80px; position: relative; z-index: 2; }
.auth-brand { color: #fff; text-align: center; margin-bottom: 22px; }
.auth-brand .wordmark { font-size: 30px; font-weight: 500; letter-spacing: .01em; line-height: 1.15; }
.auth-brand .tagline { color: var(--pink); font-size: 15px; font-weight: 600; margin-top: 4px; }
.auth-card {
  background: var(--surface); color: var(--text); border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35); padding: 32px 28px;
}
.auth-logo {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.auth-card h1 { margin: 0 0 6px; font-size: 22px; }
.auth-sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.auth-foot { margin: 20px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.pwd { position: relative; }
.pwd input { padding-right: 84px; }
.pwd-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; padding: 6px 8px;
}
.caps { color: var(--warn); font-size: 12px; margin-top: 4px; }
@media (max-width: 640px) {
  .filters .field, .filters .field.grow { flex: 1 1 100%; }
  .stat-value { font-size: 24px; }
  .auth-page::after { right: 14px; bottom: 36px; }
  .brand-foot { right: 34px; bottom: 25px; font-size: 13px; }
  .auth-brand .wordmark { font-size: 25px; }
}

/* ---------- Page d'une demande ---------- */
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.answers { display: grid; grid-template-columns: 220px 1fr; gap: 10px 20px; margin: 12px 0 0; }
.answers dt { color: var(--muted); font-size: 14px; }
.answers dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.answers dd.na-value { color: var(--muted); font-style: italic; }
@media (max-width: 640px) {
  .answers { grid-template-columns: 1fr; gap: 2px; }
  .answers dd { margin-bottom: 10px; }
}
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.gallery:empty { display: none; }
.thumb { margin: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: zoom-in; background: var(--bg); }
.thumb:hover, .thumb:focus { border-color: var(--cyan); outline: none; }
.thumb img { display: block; width: 100%; height: 130px; object-fit: cover; background: var(--surface); }
.thumb figcaption { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; font-size: 13px; }
.thumb figcaption span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist { list-style: none; padding: 0; margin: 12px 0 0; }
.filelist:empty { display: none; }
.filelist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.filelist a { color: var(--accent); font-size: 14px; }
dialog.viewer { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: hidden; }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.viewer-bar div { display: flex; gap: 8px; }
.viewer-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.viewer img { display: block; max-width: 100%; max-height: calc(100vh - 100px); margin: 0 auto; object-fit: contain; }

@media print {
  .nav, .no-print, dialog { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
  .thumb img { height: auto; max-height: 300px; object-fit: contain; }
}
.nav-user a, .nav-user button { white-space: nowrap; }
.card h2.center { justify-content: center; }

/* ---------- Double authentification ---------- */
.code-input { font-family: Consolas, "Courier New", monospace; font-size: 20px; letter-spacing: .25em; text-align: center; }
#step2 .code-input { margin-bottom: 4px; }
.steps { padding-left: 20px; margin: 16px 0 0; }
.steps li { margin-bottom: 20px; padding-left: 4px; }
.steps li::marker { color: var(--pink); font-weight: 700; }
.steps li:last-child { margin-bottom: 0; }
.qr { margin: 12px 0; }
.qr img { display: block; background: #fff; padding: 8px; border-radius: 8px; border: 1px solid var(--border); }
details summary { cursor: pointer; color: var(--accent); font-size: 14px; }
details .hint { margin: 8px 0 4px; }
.secret { display: inline-block; font-family: Consolas, "Courier New", monospace; font-size: 15px; padding: 6px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; word-break: break-all; user-select: all; }
.inline-form { display: flex; gap: 8px; margin-top: 10px; max-width: 320px; }
.inline-form input { flex: 1; min-width: 0; }
.card h3 { font-size: 15px; margin: 20px 0 4px; }
.recovery-list { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.recovery-list li { font-family: Consolas, "Courier New", monospace; font-size: 16px; text-align: center; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; }
.actions { flex-wrap: wrap; }

/* ---------- Onglet Incidents ---------- */
.stats.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .stats.three { grid-template-columns: 1fr 1fr 1fr; gap: 8px; } }
button.stat { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.stat.selected { border-color: var(--pink); border-top-color: var(--pink); background: var(--accent-soft); }
.incidents td:nth-child(6) { min-width: 220px; }
#filters .field:has(> #user) { flex-basis: 240px; }

/* ---------- Menu utilisateur (sous le nom) ---------- */
.nav-user { position: relative; }
.user-toggle {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 1px solid transparent; border-radius: 8px; padding: 6px 10px;
  color: #fff; font: inherit; font-size: 14px; cursor: pointer;
}
.user-toggle:hover, .user-toggle[aria-expanded="true"] { border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); }
.user-toggle .chevron {
  width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform .15s; opacity: .8;
}
.user-toggle[aria-expanded="true"] .chevron { transform: rotate(-135deg) translateY(-1px); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 230px;
  background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--pink);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(8, 7, 57, .22); padding: 6px;
  display: flex; flex-direction: column;
}
.nav .user-menu a, .nav .user-menu button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px;
  color: var(--text); font: inherit; font-size: 14px; text-decoration: none; background: none; border: 0; cursor: pointer;
}
.nav .user-menu a:hover, .nav .user-menu button:hover, .nav .user-menu a:focus-visible, .nav .user-menu button:focus-visible { background: var(--accent-soft); color: var(--text); outline: none; }
.nav .user-menu a.active { color: var(--accent); font-weight: 700; }
.nav .user-menu .menu-logout { margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; color: var(--err); }
.nav .user-menu .menu-logout:hover { color: var(--err); }
.user-menu.align-left { right: auto; left: 0; }
@media (max-width: 760px) { .nav-links { flex-wrap: wrap; gap: 4px 18px; } }

/* ---------- Logo ---------- */
.brandbar { background: #fff; border-bottom: 1px solid var(--border); padding: 14px 0; }
.brandbar .inner { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.brandbar img { display: block; height: 48px; width: auto; }
.auth-logo-img { display: block; height: 56px; width: auto; margin: 0 0 24px; }
@media (max-width: 640px) {
  .brandbar img { height: 38px; }
  .auth-logo-img { height: 46px; }
}
