/* ELISE : design system (v6). Partagé par l'espace famille, l'admin, l'inscription et les pages annexes.
   Principes : mobile d'abord, tokens, mouvement doux, lisible d'un coup d'oeil. */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --g-900: #0b3320; --g-800: #114a2c; --g-700: #17673b; --g-600: #1f8a4f; --g-500: #33a874; --g-400: #5cc494;
  --g-200: #bfe9d0; --g-100: #e3f5ea; --g-50: #f2faf4;
  --amber-700: #b45309; --amber-500: #f59e0b; --amber-100: #fff1d6; --amber-50: #fff8ea;
  --blue-700: #1d4ed8; --blue-500: #2563eb; --blue-100: #dbe7fb; --blue-50: #eef4fb;
  --red-700: #b91c1c; --red-500: #dc2626; --red-100: #fee2e2; --red-50: #fef2f2;
  --orange-700: #c2410c; --orange-500: #ea580c; --orange-100: #ffedd5; --orange-50: #fff7ed;
  --violet-600: #7c3aed; --violet-100: #ede9fe; --cyan-600: #0891b2; --cyan-100: #cffafe; --pink-600: #be185d; --pink-100: #fce7f3;

  --ink: #14201a; --ink2: #3f4b45; --muted: #5f6a64; --line: #e3e8e4; --line2: #eef2ef;
  --bg: #f4f7f5; --surface: #ffffff; --surface2: #f8faf8; --overlay: rgba(12, 24, 18, .55);
  --green: var(--g-700); --green2: var(--g-500); --green3: var(--g-800); --greenbg: var(--g-50); --greenbd: var(--g-200);
  --blue: var(--blue-500); --bluebg: var(--blue-50); --bluebd: var(--blue-100);
  --amber: var(--amber-700); --amberbg: var(--amber-50); --amberbd: var(--amber-100);

  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; --radius: var(--r-md);
  --sh-1: 0 1px 2px rgba(20, 40, 30, .06), 0 2px 8px rgba(20, 40, 30, .05);
  --sh-2: 0 6px 18px rgba(20, 40, 30, .10), 0 2px 6px rgba(20, 40, 30, .06);
  --sh-3: 0 18px 48px rgba(20, 40, 30, .16), 0 6px 16px rgba(20, 40, 30, .08);
  --shadow: var(--sh-1); --shadow2: var(--sh-3);
  --glow: 0 8px 24px rgba(23, 103, 59, .28);
  --ease: cubic-bezier(.2, .8, .2, 1); --ease-in: cubic-bezier(.4, 0, 1, 1);
  --t-fast: 160ms; --t-med: 280ms; --t-slow: 460ms;
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --nav-h: 62px; --bottom-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8efea; --ink2: #b6c2ba; --muted: #8b968f; --line: #263229; --line2: #1f2a24;
    --bg: #0e1512; --surface: #151f19; --surface2: #1a251f; --overlay: rgba(0, 0, 0, .65);
    --green: #7fd6a9; --green2: #5cc494; --green3: #33a874;
    --greenbg: #12281c; --greenbd: #1f4a31; --bluebg: #14213a; --bluebd: #22355c;
    --blue: #7fa8ff; --amber: #f5b95c; --amberbg: #2d2110; --amberbd: #4a3712;
    --red-700: #f87171; --orange-700: #fb923c; --violet-600: #b39bff; --cyan-600: #67d3ea; --pink-600: #f472b6;
    --g-50: #12281c; --g-100: #173722; --g-200: #1f4a31;
    --amber-50: #2d2110; --amber-100: #4a3712; --blue-50: #14213a; --blue-100: #22355c;
    --red-50: #33171a; --red-100: #4d1f24; --orange-50: #331d10; --orange-100: #4d2a14;
    --violet-100: #2c2148; --cyan-100: #10333a; --pink-100: #3b1a2b;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
    --sh-2: 0 6px 18px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3);
    --sh-3: 0 18px 48px rgba(0, 0, 0, .6), 0 6px 16px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
body { font-family: var(--font); background: var(--bg); color: var(--ink); margin: 0; line-height: 1.5; font-size: 16px; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
a { color: var(--green); }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 12px; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 3px solid rgba(51, 168, 116, .5); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--g-200); color: var(--g-900); }

/* ---------- Navigation haute ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.nav-in { max-width: 1080px; margin: 0 auto; padding: 0 20px; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); cursor: pointer; }
.brand img, .brand svg { width: 38px; height: 38px; border-radius: 11px; }
/* Accessoire de saison sur la tete d'ELISE (bonnet, regle, echarpe...) : calque au-dessus du logo. */
.brand { position: relative; }
.brand img.hat { position: absolute; left: 0; top: 50%; width: 38px; height: 38px; transform: translateY(-50%) scale(1.18); transform-origin: 50% 40%; border-radius: 0; pointer-events: none; }
.brand b { font-size: 21px; letter-spacing: .06em; font-weight: 900; }
.brand small { display: block; font-size: 11px; letter-spacing: 0; color: var(--muted); font-weight: 700; margin-top: -3px; }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--ink2); font-size: 14.5px; text-decoration: none; font-weight: 800; cursor: pointer; transition: color var(--t-fast); }
.nav-links a:hover { color: var(--green); }
.nav-links a.btn, .nav-links a.btn:hover { color: #fff; }
@media (max-width: 760px) { .nav-links .nl, .nav-links .long { display: none; } .nav-links { gap: 10px; min-width: 0; } .nav-links a { white-space: nowrap; font-size: 13.5px; } .nav-links .btn { padding: 9px 12px; font-size: 13.5px; border-radius: 10px; } .brand { flex: none; } .brand small { display: none; } .brand b { font-size: 19px; } }
.in-space .nav-links .js-register { display: none; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; font-size: 15px; font-weight: 800; padding: 12px 20px; cursor: pointer; text-decoration: none; font-family: inherit; line-height: 1.1; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med) var(--ease), background var(--t-fast), filter var(--t-fast); -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: linear-gradient(135deg, var(--g-500), var(--g-700) 70%); color: #fff; box-shadow: var(--glow); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 12px 30px rgba(23, 103, 59, .34); transform: translateY(-1px); }
.btn-white { background: #fff; color: #17673b; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.btn-white:hover { transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border: 1.5px solid rgba(255, 255, 255, .6); }
.btn-ghost:hover { background: rgba(255, 255, 255, .2); }
.btn-soft { background: var(--greenbg); color: var(--green); border: 1px solid var(--greenbd); }
.btn-soft:hover { background: var(--g-100); }
.btn-sec { background: var(--surface2); color: var(--ink2); border: 1px solid var(--line); }
.btn-sec:hover { border-color: var(--muted); }
.btn-danger { background: var(--red-500); color: #fff; }
.btn-lg { font-size: 17px; padding: 15px 28px; border-radius: 14px; }
.btn-sm { font-size: 13px; padding: 7px 12px; border-radius: 9px; }
.btn[disabled] { opacity: .55; cursor: default; transform: none !important; box-shadow: none; }
.btn-full { width: 100%; }
.btn .ico { width: 18px; height: 18px; }
button.plain { background: none; border: 0; padding: 0; color: var(--green); cursor: pointer; font-family: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; font-size: 13.5px; }

/* ---------- Coquille applicative ---------- */
.app-shell { max-width: 680px; width: calc(100% - 28px); margin: 22px auto 40px; }
.app-shell.wide { max-width: 980px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin: 0 0 16px; box-shadow: var(--sh-1); }
.card h2, .app-shell h2 { font-size: 18px; color: var(--green); margin: 0 0 12px; font-weight: 900; text-align: left; }
.card h3 { font-size: 15px; color: var(--ink); margin: 16px 0 8px; }
label { display: block; font-size: 13px; font-weight: 800; margin: 12px 0 5px; color: var(--ink2); }
input, select, textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 11px; font-size: 15px; font-family: inherit; background: var(--surface); color: var(--ink); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--g-500); box-shadow: 0 0 0 4px rgba(51, 168, 116, .18); }
input::placeholder { color: var(--muted); opacity: .8; }
.row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.row input { flex: 1; }
.muted { color: var(--muted); font-size: 13.5px; }
.small { font-size: 12.5px; }
.err { color: var(--red-500); font-size: 13.5px; margin: 8px 0; min-height: 0; }
.ok { color: var(--green); font-size: 13.5px; margin: 8px 0; }
.wait { display: flex; align-items: center; gap: 10px; background: var(--greenbg); border: 1px solid var(--greenbd); border-radius: 12px; padding: 11px 13px; margin: 8px 0; color: var(--green); font-size: 14px; }
.spinner { flex: none; width: 18px; height: 18px; border: 3px solid var(--greenbd); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rbar { display: flex; gap: 6px; margin: 2px 0 18px; }
.rbar .dot { flex: 1; height: 6px; border-radius: 3px; background: var(--line); transition: background var(--t-med); }
.rbar .dot.on { background: linear-gradient(90deg, var(--g-500), var(--g-600)); }
.kid, .prefrow { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; background: var(--surface); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.kid:hover, .prefrow:hover { border-color: var(--greenbd); }
.kid input, .prefrow input { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--g-600); }
.prefrow.locked { opacity: .6; background: var(--surface2); }
.kid .lbl, .prefrow .lbl { font-size: 14px; color: var(--ink); flex: 1; font-weight: 500; }
.prefrow .lbl b { display: block; }
.prefrow .lbl span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.prefrow select { width: auto; padding: 6px 8px; font-size: 13px; border-radius: 9px; }
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 800; line-height: 1.5; white-space: nowrap; }
.badge.ok { background: var(--greenbg); color: var(--green); }
.badge.warn { background: var(--amberbg); color: var(--amber); }
.badge.info { background: var(--bluebg); color: var(--blue); }
.badge.prem { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #4a2e05; }
.badge.grey { background: var(--surface2); color: var(--muted); border: 1px solid var(--line); }
.badge.red { background: var(--red-100); color: var(--red-700); }
.tag { display: inline-block; border-radius: 20px; padding: 1px 9px; font-size: 11px; font-weight: 800; vertical-align: middle; margin-left: 6px; }
.tag.evo { background: var(--bluebg); color: var(--blue); }
.tag.prem { background: var(--amberbg); color: var(--amber); }
.tag.free { background: var(--greenbg); color: var(--green); }
.backlink { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px; color: var(--green); font-size: 13.5px; cursor: pointer; text-decoration: none; background: none; border: 0; padding: 0; font-weight: 800; font-family: inherit; }
.backlink:hover { text-decoration: underline; }
.chosen { background: var(--amberbg); border: 1px solid var(--amberbd); border-radius: 12px; padding: 10px 13px; font-size: 13.5px; margin: 0 0 12px; color: var(--amber); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.announce { background: var(--amberbg); border-bottom: 1px solid var(--amberbd); color: var(--amber); text-align: center; font-size: 13.5px; padding: 8px 14px; font-weight: 700; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th, table.tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.copybox { display: flex; gap: 6px; }
.copybox input { font-size: 12.5px; }

/* ---------- Squelettes de chargement ---------- */
.skel { position: relative; overflow: hidden; background: var(--line2); border-radius: 10px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shimmer 1.4s var(--ease) infinite; }
@media (prefers-color-scheme: dark) { .skel::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent); } }
@keyframes shimmer { to { transform: translateX(100%); } }
.skel-line { height: 12px; margin: 8px 0; }
.skel-hero { height: 128px; border-radius: var(--r-xl); margin: 0 0 14px; }
.skel-item { height: 74px; border-radius: var(--r-md); margin: 0 0 10px; }
.skel-title { height: 18px; width: 40%; margin: 18px 0 10px; }

/* ---------- Espace famille : entête ---------- */
.fs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.fs-head h2 { font-size: 24px; color: var(--ink); margin: 0; font-weight: 900; }
.fs-head .muted { margin: 2px 0 0; }
.fs-head .acts { display: flex; gap: 8px; align-items: center; }

/* ---------- Onglets (desktop) et barre basse (mobile) ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 0 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink2); border-radius: 22px; padding: 8px 14px; font-weight: 800; font-size: 13.5px; cursor: pointer; font-family: inherit; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast); }
.tabs button svg { width: 16px; height: 16px; }
.tabs button:hover { border-color: var(--greenbd); }
.tabs button.on { background: var(--g-700); color: #fff; border-color: var(--g-700); }
.tabs button .cnt { background: var(--amber-500); color: #3a2300; border-radius: 10px; padding: 0 6px; font-size: 11px; margin-left: 2px; }
.bottomnav { display: none; }
@media (max-width: 720px) {
  .tabs { display: none; }
  body.in-space { padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); }
  .bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bottomnav button { background: none; border: 0; font-family: inherit; color: var(--muted); font-size: 10.5px; font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent; }
  .bottomnav button svg { width: 22px; height: 22px; transition: transform var(--t-fast) var(--ease); }
  .bottomnav button.on { color: var(--green); }
  .bottomnav button.on svg { transform: translateY(-2px) scale(1.08); }
  .bottomnav button .cnt { position: absolute; top: 8px; right: calc(50% - 20px); background: var(--red-500); color: #fff; border-radius: 10px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; text-align: center; }
  .bottomnav .more { display: flex; }
}

/* ---------- Back-office parent (espace famille) ---------- */
.par-head { margin: 0 0 14px; }
.par-head h1 { font-size: 22px; font-weight: 900; color: var(--ink); margin: 0; letter-spacing: -.01em; }
.par-head p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.reserved { display: inline-flex; align-items: center; gap: 5px; background: var(--surface2); border: 1px dashed var(--line); color: var(--muted); border-radius: 20px; padding: 2px 9px; font-size: 11.5px; font-weight: 800; white-space: nowrap; vertical-align: middle; }
.reserved.evolution { color: var(--blue); background: var(--bluebg); border-color: var(--bluebd); }
.reserved.premium { color: #7a4d00; background: var(--amberbg); border-color: var(--amberbd); }
.greyed { opacity: .55; pointer-events: none; filter: grayscale(.4); }
/* Mode Tribu : enfants par destinataire */
.rec { margin: 8px 0; }
.rec .row { margin: 0; }
.rec .tribu { display: none; }
.rec.tribu-on .tribu { display: flex; flex-wrap: wrap; gap: 6px 10px; padding: 6px 4px 2px 8px; }
.tribu label { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink2); background: var(--surface2); border: 1px solid var(--line); border-radius: 20px; padding: 3px 10px 3px 6px; cursor: pointer; }
.tribu input { width: 16px; height: 16px; margin: 0; accent-color: var(--g-600); }
.tribubox { margin: 6px 0 4px; }
.tribubox.off .prefrow { opacity: .8; }
.kid.locked { opacity: .6; }
.kid.locked input { accent-color: var(--muted); }
.greyed input, .greyed select, .greyed button, .greyed textarea { background: var(--surface2) !important; color: var(--muted) !important; }
.prefrow.locked { background: var(--surface2); }
.prefrow.locked .lbl, .prefrow.locked select { opacity: .6; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } .planbox.hero { order: -1; } }
.planbox.hero { border: 2px solid var(--green); box-shadow: var(--sh-2); position: relative; }
.promo-box { background: var(--greenbg); border: 1px solid var(--greenbd); border-radius: 14px; padding: 14px 16px; margin: 0 0 14px; }
.promo-box .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .06em; }
.promo-box .row input { text-transform: uppercase; }
.season-bar { text-align: center; padding: 9px 14px; font-size: 13.5px; font-weight: 700; color: #fff; }
.season-bar a { color: #fff; text-decoration: underline; }
.season-badge { display: inline-block; color: #fff; border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 800; margin: 0 0 8px; }
.strike { text-decoration: line-through; color: var(--muted); font-weight: 600; font-size: 15px; margin-right: 6px; }
@media (min-width: 900px) {
  .par { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; max-width: 1180px; }
  .par-side { position: sticky; top: calc(var(--nav-h) + 14px); }
  .par-side .fs-head { flex-direction: column; align-items: stretch; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 14px 12px; margin: 0 0 10px; }
  .par-side .fs-head h2 { font-size: 18px; }
  .par-side .fs-head .acts { justify-content: space-between; }
  .par-side .fs-head .acts .nl { display: none; }
  .par-side .fs-head .acts .btn { padding: 8px 10px; }
  .par-side .tabs { flex-direction: column; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
  .par-side .tabs button { width: 100%; justify-content: flex-start; border: 0; border-radius: 10px; background: transparent; padding: 10px 12px; font-size: 14px; }
  .par-side .tabs button:hover { background: var(--surface2); }
  .par-side .tabs button.on { background: var(--greenbg); color: var(--green); }
  .par-side .tabs button .cnt { margin-left: auto; }
}

/* ---------- Panneaux : transition ---------- */
#fsPanels > div { animation: panel var(--t-med) var(--ease) both; }
@keyframes panel { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Carte d'état (« Ce soir ») ---------- */
.status { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 20px 22px; color: #fff; margin: 0 0 16px; box-shadow: var(--sh-2); isolation: isolate; }
.status::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .28), transparent); z-index: -1; animation: drift 12s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-40px, 30px) scale(1.15); } }
.status.green { background: linear-gradient(135deg, #1f8a4f, #114a2c 80%); }
.status.orange { background: linear-gradient(135deg, #f59e0b, #c2410c 85%); }
.status.red { background: linear-gradient(135deg, #ef4444, #991b1b 85%); }
.status .eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .85; margin: 0 0 6px; }
.status h3 { font-size: clamp(21px, 5vw, 27px); font-weight: 900; margin: 0 0 6px; line-height: 1.15; }
.status p { margin: 0; opacity: .95; font-size: 14.5px; }
.status .row2 { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.status .btn-white { color: #14201a; }
.status .ring { --p: 0; flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, .28) 0); position: absolute; right: 22px; top: 20px; }
.status .ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: inherit; background: rgba(0, 0, 0, .18); }
.status .ring span { position: relative; font-weight: 900; font-size: 15px; }
.status .kids { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.status .kids span { background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); border-radius: 20px; padding: 2px 10px; font-size: 12.5px; font-weight: 800; }
@media (max-width: 480px) { .status .ring { display: none; } }

/* ---------- Résumé IA ---------- */
.summary { display: flex; gap: 12px; align-items: flex-start; background: linear-gradient(135deg, var(--amber-50), var(--surface)); border: 1px solid var(--amberbd); border-radius: var(--r-lg); padding: 14px 16px; margin: 0 0 16px; }
.summary .spark { flex: none; width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(135deg, #fde68a, #f59e0b); display: grid; place-items: center; color: #4a2e05; }
.summary .spark svg { width: 20px; height: 20px; }
.summary h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--amber); margin: 0 0 4px; }
.summary p { margin: 0; font-size: 14.5px; color: var(--ink); }
.summary .meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* ---------- Timeline ---------- */
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--line), var(--line) 60%, transparent); border-radius: 2px; }
.tl-day { position: relative; margin: 0 0 18px; }
.tl-day > h4 { position: relative; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.tl-day > h4::before { content: ""; position: absolute; left: -23px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--muted); box-sizing: border-box; }
.tl-day.today > h4 { color: var(--green); }
.tl-day.today > h4::before { border-color: var(--g-500); box-shadow: 0 0 0 4px rgba(51, 168, 116, .18); }
.tl-day.urgent > h4 { color: var(--red-700); }
.tl-day.urgent > h4::before { border-color: var(--red-500); box-shadow: 0 0 0 4px rgba(220, 38, 38, .16); }
.tl-day > h4 .dl::first-letter { text-transform: uppercase; }
.tl-day > h4 .when { margin-left: auto; font-weight: 700; letter-spacing: 0; text-transform: none; font-size: 12px; }
.tl-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--r-md); padding: 11px 12px 11px 10px; margin: 0 0 8px; box-shadow: var(--sh-1); transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast), opacity var(--t-med), border-color var(--t-fast); animation: rise var(--t-slow) var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tl-item:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.tl-item.u-red { border-left-color: var(--red-500); }
.tl-item.u-orange { border-left-color: var(--amber-500); }
.tl-item.u-green { border-left-color: var(--g-500); }
.tl-item.u-blue { border-left-color: var(--blue-500); }
.tl-item.u-violet { border-left-color: var(--violet-600); }
.tl-item.done { opacity: .62; border-left-color: var(--g-400); }
.tl-item.done .ttl { text-decoration: line-through; }
.tl-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface2); color: var(--ink2); }
.tl-ico svg { width: 20px; height: 20px; }
.tl-ico.hw { background: var(--greenbg); color: var(--green); }
.tl-ico.rem { background: var(--amberbg); color: var(--amber); }
.tl-ico.msg { background: var(--bluebg); color: var(--blue); }
.tl-ico.actu { background: var(--pink-100); color: var(--pink-600); }
.tl-ico.doc { background: var(--cyan-100); color: var(--cyan-600); }
.tl-ico.abs { background: var(--red-100); color: var(--red-700); }
.tl-ico.agenda { background: var(--violet-100); color: var(--violet-600); }
.tl-ico.menu { background: var(--orange-100); color: var(--orange-700); }
.tl-ico.act { background: var(--blue-50); color: var(--blue-700); }
.tl-ico.eval { background: var(--orange-50); color: var(--orange-700); }
.tl-body { min-width: 0; }
.tl-body .top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 2px; }
.tl-body .ttl { font-weight: 800; font-size: 15px; color: var(--ink); }
.tl-body .stamp { display: inline-block; margin-left: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.tl-body .txt { font-size: 14px; color: var(--ink2); white-space: pre-line; overflow-wrap: anywhere; }
.tl-body .txt.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tl-body .more { font-size: 12.5px; }
.tl-body .docs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tl-body .doc { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; background: var(--greenbg); color: var(--green); border-radius: 8px; padding: 3px 9px; text-decoration: none; font-weight: 700; max-width: 100%; }
.tl-body .doc svg { width: 13px; height: 13px; flex: none; }
.prefrow svg.ico { width: 20px; height: 20px; flex: none; color: var(--green); }
.tl-body .doc.off { background: var(--surface2); color: var(--muted); }
.tl-body .photos { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.tl-body .photos img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; flex: none; background: var(--line2); }
.tl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.kind { font-size: 11px; font-weight: 800; border-radius: 8px; padding: 1px 7px; vertical-align: middle; white-space: nowrap; }
.kind.rappel { background: var(--amberbg); color: var(--amber); }
.kind.activite { background: var(--bluebg); color: var(--blue); }
.kind.new { background: var(--red-100); color: var(--red-700); }
.kind.sondage { background: var(--violet-100); color: var(--violet-600); }
.kidname { display: inline-flex; align-items: center; color: #fff !important; border-radius: 11px; padding: 1px 9px; font-size: 12px; font-weight: 800; line-height: 1.6; }
.kidname::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .8); margin-right: 6px; }

/* Case à cocher animée */
.chk { position: relative; width: 26px; height: 26px; flex: none; cursor: pointer; display: inline-block; }
.chk input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.chk .box { position: absolute; inset: 0; border-radius: 9px; border: 2px solid var(--line); background: var(--surface); transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease); }
.chk svg { position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; stroke: #fff; stroke-width: 3; fill: none; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset var(--t-med) var(--ease); }
.chk input:checked + .box { background: var(--g-600); border-color: var(--g-600); transform: scale(1.06); }
.chk input:checked ~ svg { stroke-dashoffset: 0; }
.chk:hover .box { border-color: var(--g-500); }
.tl-item .chk { margin-top: 4px; }

/* ---------- Check-list « ce soir » (feuille) ---------- */
.sheet-bg { position: fixed; inset: 0; background: var(--overlay); z-index: 60; display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fade var(--t-med) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 560px; max-height: 88dvh; overflow: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 14px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow: var(--sh-3); animation: up var(--t-slow) var(--ease) both; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 640px) { .sheet-bg { align-items: center; padding: 20px; } .sheet { border-radius: 24px; padding-bottom: 22px; } }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
@media (min-width: 640px) { .sheet .grab { display: none; } }
.sheet h3 { font-size: 22px; font-weight: 900; margin: 0 0 4px; }
.sheet .sub { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.todo { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; padding: 12px; border-radius: 14px; background: var(--surface2); border: 1px solid var(--line); margin: 0 0 8px; transition: background var(--t-fast), opacity var(--t-med); }
.todo .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; background: var(--red-500); }
.todo.two .n { background: var(--amber-500); }
.todo.three .n { background: var(--blue-500); }
.todo.done { opacity: .5; }
.todo.done b { text-decoration: line-through; }
.todo b { display: block; font-size: 15px; }
.todo span { font-size: 13.5px; color: var(--ink2); }
.todo .act { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.sheet .zen { text-align: center; padding: 22px 10px; }
.sheet .zen .big { font-size: 46px; line-height: 1; margin-bottom: 8px; }
.sheet .sfoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ---------- Verrous (offre supérieure) ---------- */
.lock { position: relative; overflow: hidden; text-align: center; background: linear-gradient(135deg, var(--amber-50), var(--surface)); border: 1px solid var(--amberbd); border-radius: var(--r-lg); padding: 22px 18px; color: var(--ink); }
.lock b { display: block; font-size: 16px; margin-bottom: 4px; }
.lock p { color: var(--ink2); font-size: 14px; margin: 0 0 12px; }
.lock .preview { filter: blur(3px); opacity: .5; pointer-events: none; user-select: none; margin: 0 0 12px; text-align: left; }
.lock .btn { margin-top: 4px; }

/* ---------- Anciennes vues (semaine, carnet, messages, docs, cantine) ---------- */
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin: 0 0 10px; }
.day.today { border-color: var(--g-400); box-shadow: 0 0 0 3px rgba(51, 168, 116, .12); }
.day h4 { font-size: 15px; margin: 0 0 6px; display: flex; justify-content: space-between; align-items: center; }
.day h4 .dl::first-letter { text-transform: uppercase; }
.hw { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line2); }
.hw:first-of-type { border-top: 0; }
.hw .t { flex: 1; font-size: 14.5px; }
.hw .t b { color: var(--ink); }
.hw .t .doc { display: inline-block; margin: 4px 6px 0 0; font-size: 12.5px; background: var(--greenbg); color: var(--green); border-radius: 8px; padding: 2px 8px; text-decoration: none; }
.hw.done .t { text-decoration: line-through; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-md); }
.empty .big { font-size: 34px; line-height: 1; margin-bottom: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.gallery a img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; display: block; background: var(--line2); transition: transform var(--t-fast) var(--ease); }
.gallery a:hover img { transform: scale(1.03); }
.thread { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin: 0 0 10px; }
.thread .who { font-size: 12.5px; color: var(--muted); }
.msg { background: var(--bluebg); border-radius: 12px; padding: 9px 11px; margin: 6px 0; font-size: 14px; white-space: pre-line; }
.msg .who { display: block; color: var(--ink2); font-weight: 800; font-size: 12.5px; white-space: normal; }
.doclist a { display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin: 0 0 8px; text-decoration: none; color: var(--ink); transition: border-color var(--t-fast); }
.doclist a:hover { border-color: var(--greenbd); }
.doclist a small { color: var(--muted); }
.planbox { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; background: var(--surface); }
.planbox.now { border-color: var(--g-400); background: var(--greenbg); }
.planbox h4 { margin: 0 0 4px; }
.toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; padding: 4px; margin: 0 auto 26px; }
.toggle button { border: 0; background: transparent; padding: 8px 16px; border-radius: 26px; font-weight: 800; color: var(--ink2); cursor: pointer; font-family: inherit; font-size: 14px; transition: background var(--t-fast), color var(--t-fast); }
.toggle button.on { background: var(--g-700); color: #fff; }
.toggle .save { font-size: 11px; background: var(--amberbg); color: var(--amber); border-radius: 10px; padding: 1px 7px; margin-left: 6px; }
.fineprint { text-align: center; color: var(--muted); font-size: 13px; margin: 22px auto 0; max-width: 680px; }

/* ---------- Admin ---------- */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.stat b { font-size: 22px; display: block; color: var(--green); }
.stat span { font-size: 12.5px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; }
.fam { border: 1px solid var(--greenbd); background: var(--greenbg); border-radius: var(--r-sm); padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.fam b { color: var(--green); }
.fam .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.compte { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: min(92vw, 420px); }
@media (max-width: 720px) { body.in-space .toasts { bottom: calc(var(--bottom-h) + 14px + env(safe-area-inset-bottom)); } }
.toast { pointer-events: auto; background: var(--ink); color: #fff; border-radius: 14px; padding: 11px 16px; font-size: 14px; font-weight: 700; box-shadow: var(--sh-3); display: flex; align-items: center; gap: 10px; animation: toast var(--t-slow) var(--ease) both; }
.toast.ok::before { content: "✓"; color: var(--g-400); font-weight: 900; }
.toast.err { background: var(--red-700); }
.toast.err::before { content: "!"; font-weight: 900; }
@keyframes toast { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-color-scheme: dark) { .toast { background: #e8efea; color: #14201a; } .toast.err { background: #fca5a5; color: #450a0a; } }

/* ---------- Pages annexes (légal, guide) ---------- */
.legal-wrap { max-width: 760px; margin: 30px auto 60px; padding: 0 20px; }
.legal-wrap h1 { font-size: 30px; font-weight: 900; margin: 0 0 8px; }
.legal-wrap h2 { font-size: 19px; margin: 26px 0 8px; color: var(--green); }
.legal-wrap p, .legal-wrap li { color: var(--ink2); font-size: 15px; line-height: 1.6; }
.legal-wrap .maj { color: var(--muted); font-size: 13px; }
.kicker { text-align: center; color: var(--green); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 12.5px; margin: 0 0 8px; }
.foot { background: var(--g-900); color: #cfe0d6; padding: 32px 20px; font-size: 13px; }
.foot-in { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.foot .fbrand { color: #fff; font-weight: 900; font-size: 18px; letter-spacing: .06em; }
.foot a { color: #eaf5ee; cursor: pointer; text-decoration: none; display: block; margin: 2px 0; padding: 4px 0; }
.foot a:hover { text-decoration: underline; }
.foot h3, .foot h5 { color: #fff; margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.foot .legal { max-width: 1080px; margin: 22px auto 0; opacity: .65; font-size: 12px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 14px; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }

/* ---------- Back-office (admin.html) ---------- */
.adm-body { background: var(--bg); }
.adm { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100dvh - var(--nav-h)); }
.adm-side { position: sticky; top: var(--nav-h); align-self: start; height: calc(100dvh - var(--nav-h)); background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; }
.adm-side nav { display: flex; flex-direction: column; gap: 2px; }
.adm-side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink2); font-weight: 700; font-size: 14px; text-decoration: none; transition: background var(--t-fast), color var(--t-fast); }
.adm-side a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.adm-side a:hover { background: var(--surface2); color: var(--ink); }
.adm-side a.on { background: var(--greenbg); color: var(--green); }
.adm-side a .cnt { margin-left: auto; background: var(--amber-500); color: #3a2300; border-radius: 10px; padding: 0 7px; font-size: 11px; font-style: normal; font-weight: 800; }
.adm-side-foot { margin-top: auto; padding: 12px; line-height: 1.5; }
.adm-main { padding: 22px 28px 70px; max-width: 1240px; width: 100%; }
.adm-view { animation: panel var(--t-med) var(--ease) both; }
.adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.adm-head h1 { font-size: 24px; font-weight: 900; color: var(--ink); margin: 0; }
.adm-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.adm-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.adm h2.sec { font-size: 15px; font-weight: 900; color: var(--ink); margin: 26px 0 10px; letter-spacing: -.01em; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.kpi b { display: block; font-size: 24px; font-weight: 900; color: var(--ink); line-height: 1.1; }
.kpi span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.kpi small { display: block; font-size: 12px; color: var(--green); font-weight: 700; margin-top: 4px; }
.kpi.warn b { color: var(--amber); }
.kpi.bad b { color: var(--red-700); }
.kpi.good b { color: var(--green); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 980px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; }
.panel h3 { font-size: 14px; font-weight: 900; color: var(--ink); margin: 0 0 10px; }
.todo-list { display: flex; flex-direction: column; gap: 6px; }
.todo-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; background: var(--surface2); font-size: 13.5px; }
.todo-item i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.todo-item.error i, .todo-item.engine i, .todo-item.deliver i, .todo-item.echu i { background: var(--red-500); }
.todo-item.pending i { background: var(--amber-500); }
.todo-item.trial i, .todo-item.intent i { background: var(--blue-500); }
.todo-item b { color: var(--ink); }
.todo-item .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 96px; margin: 6px 0 4px; }
.bars div { flex: 1; background: var(--g-200); border-radius: 4px 4px 2px 2px; min-height: 3px; position: relative; transition: background var(--t-fast); }
.bars div:hover { background: var(--g-500); }
.bars div span { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: var(--ink2); display: none; }
.bars div:hover span { display: block; }
.bars-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.toolbar .search input { padding-left: 34px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button, .seg a { border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; font-family: inherit; font-weight: 800; font-size: 12.5px; color: var(--ink2); cursor: pointer; text-decoration: none; white-space: nowrap; flex: none; }
.seg button.on, .seg a.on { background: var(--green); color: #fff; }
.tbl-wrap { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
table.dt { width: 100%; border-collapse: collapse; font-size: 14px; }
table.dt th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; white-space: nowrap; }
table.dt td { padding: 11px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.dt tr:last-child td { border-bottom: 0; }
table.dt tr.clk { cursor: pointer; transition: background var(--t-fast); }
table.dt tr.clk:hover { background: var(--surface2); }
table.dt td .sub { display: block; font-size: 12px; color: var(--muted); }
table.dt td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dt .empty-row td { text-align: center; color: var(--muted); padding: 30px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--greenbg); color: var(--green); }
.pill.warn { background: var(--amberbg); color: var(--amber); }
.pill.bad { background: var(--red-100); color: var(--red-700); }
.pill.info { background: var(--bluebg); color: var(--blue); }
.pill.grey { background: var(--surface2); color: var(--muted); border: 1px solid var(--line); }
.pill.prem { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #4a2e05; }
.drawer-bg { position: fixed; inset: 0; background: var(--overlay); z-index: 60; animation: fade var(--t-med) both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 100%); background: var(--surface); box-shadow: var(--sh-3); z-index: 61; overflow: auto; animation: slide var(--t-slow) var(--ease) both; display: flex; flex-direction: column; }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; z-index: 1; }
.drawer-head h2 { font-size: 20px; color: var(--ink); margin: 0; font-weight: 900; }
.drawer-head .muted { margin: 2px 0 0; }
.drawer-head .x { background: var(--surface2); border: 0; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; color: var(--ink2); display: grid; place-items: center; }
.drawer-head .x svg { width: 16px; height: 16px; }
.drawer-body { padding: 16px 22px 40px; }
.drawer .tabs { margin: 0 0 12px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.mail-preview { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface2); }
.mail-preview iframe { width: 100%; height: 620px; border: 0; background: #f4f6f5; }
.mail-preview .bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--surface); }
.audience { display: grid; gap: 6px; }
.audience label.prefrow { margin: 0; padding: 9px 12px; }
.audience .n { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 800; }
.tpl { display: flex; gap: 6px; flex-wrap: wrap; }
.tpl button { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 6px 12px; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink2); cursor: pointer; }
.tpl button:hover { border-color: var(--greenbd); color: var(--green); }
.log { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface2); border-radius: 10px; padding: 10px 12px; white-space: pre-wrap; max-height: 260px; overflow: auto; color: var(--ink2); }
.actions-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.modal { width: min(560px, 100%); }
#sheetHost .sheet-bg { z-index: 70; }
.keynotice { background: var(--amberbg); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; line-height: 1.5; margin: 0 0 12px; }
.keynotice button.plain { font-size: 13.5px; }
.ph-lock { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 10px; background: var(--surface2); color: var(--muted); font-size: 18px; }
img.ph-err { opacity: .35; }
.doc.off small { color: var(--muted); font-weight: 500; }
.verbs .verb { display: flex; align-items: center; gap: 8px; }
.verbs .verb span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.verbs .verb input { margin: 0; }
.adm code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--surface2); border-radius: 6px; padding: 1px 6px; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .adm { grid-template-columns: minmax(0, 1fr); }
  .adm-side { position: sticky; top: var(--nav-h); height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; z-index: 30; }
  .adm-side nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .adm-side a { white-space: nowrap; padding: 8px 12px; font-size: 13px; }
  .adm-side a span { display: none; }
  .adm-side a.on span { display: inline; }
  .adm-side-foot { display: none; }
  .adm-main { padding: 16px 14px 60px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { font-size: 12px; margin-top: 8px; }
}
