/* Stile «LMS» — gli stessi valori delle card del sito (lenainformatica.it, card di Stas: lms-*-card.html):
   finestra #13151b, pannelli #1b1e26, linee bianche al 7%, testo #e9ecf2, grigio #8b91a0, lime #c8f26b,
   Inter, pannelli 10–16 px, pillole, schede a segmenti con la scheda attiva in lime, stati come pillole contornate,
   targhe con la banda blu e le stelle, avatar con la sfumatura blu → viola.
   Si attiva con <html data-style="lms"> (Impostazioni → Aspetto → Stile grafico); «Classico» = solo app.css.
   Le animazioni stanno sotto [data-motion="on"] e non partono mai con «riduci movimento» del sistema.
   Colori: stessa specificità di app.css ma dopo; i colori scelti a mano in Aspetto (blocco nell'head) vincono. */

@font-face { font-family: "Inter"; src: url("/static/fonts/inter.woff") format("woff"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/static/fonts/jetbrains-mono.woff") format("woff"); font-weight: 100 800; font-display: swap; }

:root:where([data-style="lms"]) {
  --bg: #13151b; --panel: #1b1e26; --panel2: #20232c; --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.12);
  --fg: #e9ecf2; --muted: #8b91a0; --dim: #6b7080;
  --accent: #c8f26b; --accent-fg: #11131a; --accent-soft: rgba(200,242,107,.08); --accent2: #8b5cf6;
  --hl: #c8f26b; --hl-fg: #11131a; --strong: #fff;
  --ok: #4ade80; --warn: #fbbf24; --err: #f87171; --info: #60a5fa;
  --radius: 16px; --radius-sm: 10px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --shadow: 0 16px 32px -20px rgba(17,19,26,.45);
  --avatar: linear-gradient(135deg, #2f6bea, #8b5cf6);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):where([data-style="lms"]) {
    --bg: #f4f5f7; --panel: #ffffff; --panel2: #f2f4f8; --line: #e6e8ee; --line2: #d9dce4;
    --fg: #11131a; --muted: #5b6070; --dim: #8b91a0; --strong: #11131a;
    --accent: #11131a; --accent-fg: #fff; --accent-soft: rgba(200,242,107,.28); --accent2: #8b5cf6;
    --ok: #16a34a; --warn: #b45309; --err: #dc2626; --info: #2563eb;
    --shadow: 0 1px 2px rgba(17,19,26,.04), 0 12px 28px -20px rgba(17,19,26,.25);
  }
}
:root[data-theme="light"]:where([data-style="lms"]) {
  --bg: #f4f5f7; --panel: #ffffff; --panel2: #f2f4f8; --line: #e6e8ee; --line2: #d9dce4;
  --fg: #11131a; --muted: #5b6070; --dim: #8b91a0; --strong: #11131a;
  --accent: #11131a; --accent-fg: #fff; --accent-soft: rgba(200,242,107,.28); --accent2: #8b5cf6;
  --ok: #16a34a; --warn: #b45309; --err: #dc2626; --info: #2563eb;
  --shadow: 0 1px 2px rgba(17,19,26,.04), 0 12px 28px -20px rgba(17,19,26,.25);
}

[data-style="lms"] body { -webkit-font-smoothing: antialiased; }
[data-style="lms"] h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
[data-style="lms"] h2, [data-style="lms"] h3 { letter-spacing: -.01em; }
[data-style="lms"] code, [data-style="lms"] .mono { font-family: var(--mono); }
[data-style="lms"] mark { background: var(--hl); color: var(--hl-fg); padding: 0 6px; border-radius: 8px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
[data-style="lms"] * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--fg) 18%, transparent) transparent; }

/* struttura: barra in alto come nelle card («Commesse / Attive», nome e avatar) */
[data-style="lms"] .side { background: var(--panel); border-right-color: var(--line); }
[data-style="lms"] .brand::before { background: var(--hl); border-radius: 8px; }
[data-style="lms"] .brand-mark { width: 32px; height: 32px; border-radius: 8px; flex: none; display: grid; place-items: center;
  background: var(--hl); color: var(--hl-fg); font-weight: 800; font-size: 16px; }
[data-style="lms"] .brand:has(.brand-mark)::before { display: none; }
[data-style="lms"] .side-label { font-size: 11px; letter-spacing: .06em; color: var(--muted); }
[data-style="lms"] .nav-item { border-radius: 9px; font-weight: 600; }
[data-style="lms"] .nav-item.active { background: rgba(200,242,107,.13); color: var(--strong); }
:root[data-theme="light"][data-style="lms"] .nav-item.active { background: rgba(200,242,107,.45); }
[data-style="lms"] { --nav-group-line: rgba(200,242,107,.35); }
[data-style="lms"] .nav-item.active::before { background: var(--hl); width: 3px; }
[data-style="lms"] .nav-item.active .ico { color: var(--strong); }
:root[data-theme="dark"][data-style="lms"] .nav-item.active .ico { color: var(--hl); }
[data-style="lms"] .top { background: color-mix(in srgb, var(--bg) 85%, transparent); border-bottom-color: var(--line); }
[data-style="lms"] .crumbs > :first-child { color: var(--strong); font-weight: 600; }
[data-style="lms"] .crumbs .sep { color: var(--muted); }
[data-style="lms"] .clock-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--panel); }
/* 0.116: sul telefono l'orologio toglieva quasi tutto lo spazio al titolo della pagina («Planni…») */
@media (max-width: 600px) { [data-style="lms"] .clock-pill { display: none; } }
[data-style="lms"] .clock-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex: none; }
[data-style="lms"] .iconbtn { border-radius: 8px; background: transparent; border-color: var(--line); }
[data-style="lms"] .iconbtn:hover { border-color: var(--line2); background: var(--panel); }
[data-style="lms"] .avatar { background: var(--avatar); }
[data-style="lms"] .dotn { background: #ef4444; }

/* superfici */
[data-style="lms"] .card { border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow); padding: 18px 20px; }
[data-style="lms"] .card > h2, [data-style="lms"] .card-head h2, [data-style="lms"] .card.f > h2 {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
[data-style="lms"] .stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
[data-style="lms"] .stat b { font-size: 22px; font-weight: 700; color: var(--strong); letter-spacing: -.01em; }
[data-style="lms"] .stat span { font-size: 11.5px; }
[data-style="lms"] .tbl-wrap { border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow); }
[data-style="lms"] .tbl th { background: transparent; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); border-bottom-color: var(--line); }
[data-style="lms"] .tbl td { border-bottom-color: var(--line); }
[data-style="lms"] .tbl tbody tr:hover td { background: color-mix(in srgb, var(--fg) 3%, transparent); }
[data-style="lms"] .tbl a.rowlink { color: var(--strong); }
[data-style="lms"] .tbl a.rowlink:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--hl); text-underline-offset: 3px; }
/* righe: separate da una linea, come negli elenchi delle card */
[data-style="lms"] .list { gap: 0; }
[data-style="lms"] .li { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 11px 6px; }
[data-style="lms"] .list > .li:first-child { border-top: 0; }
[data-style="lms"] a.li:hover { background: color-mix(in srgb, var(--fg) 3%, transparent); border-radius: var(--radius-sm); border-top-color: transparent; }
[data-style="lms"] a.li:hover + .li { border-top-color: transparent; }
[data-style="lms"] .li .li-title { color: var(--strong); font-weight: 600; }
[data-style="lms"] details.box, [data-style="lms"] .att, [data-style="lms"] .notif, [data-style="lms"] .perm-mod {
  border-radius: var(--radius-sm); background: var(--panel2); border-color: var(--line); }
[data-style="lms"] fieldset { border-radius: 12px; border-color: var(--line); }
[data-style="lms"] hr { border-top-color: var(--line); }
/* avvisi: «regola» in lime come nella card timbrature */
[data-style="lms"] .flash { border-radius: var(--radius-sm); }
[data-style="lms"] .flash.info { background: rgba(200,242,107,.06); border-color: rgba(200,242,107,.24); }
:root[data-theme="light"][data-style="lms"] .flash.info { background: rgba(200,242,107,.18); border-color: rgba(120,160,30,.35); }

/* comandi */
[data-style="lms"] .btn { border-radius: 10px; font-weight: 700; font-size: 14px; }
[data-style="lms"] .btn.sm { border-radius: 999px; padding: 4px 12px; font-size: 12.5px; }
[data-style="lms"] .btn.ghost { background: transparent; border-color: var(--line2); color: var(--fg); font-weight: 600; }
[data-style="lms"] .btn.ghost:hover { border-color: color-mix(in srgb, var(--fg) 25%, transparent); background: var(--panel); }
[data-style="lms"] .btn.ok { background: var(--hl); border-color: var(--hl); color: var(--hl-fg); }
[data-style="lms"] .btn:disabled { background: var(--panel2); border-color: var(--line); color: var(--muted); opacity: 1; }
[data-style="lms"] input:focus, [data-style="lms"] select:focus, [data-style="lms"] textarea:focus,
[data-style="lms"] button:focus-visible, [data-style="lms"] a:focus-visible { outline: 2px solid var(--hl); outline-offset: 2px; }
[data-style="lms"] input[type=checkbox], [data-style="lms"] input[type=range] { accent-color: var(--hl); }
[data-style="lms"] input[type=text], [data-style="lms"] input[type=email], [data-style="lms"] input[type=password],
[data-style="lms"] input[type=date], [data-style="lms"] input[type=time], [data-style="lms"] input[type=number],
[data-style="lms"] input[type=month], [data-style="lms"] input[type=url], [data-style="lms"] input[type=search],
[data-style="lms"] input[type=datetime-local], [data-style="lms"] input[type=tel], [data-style="lms"] select,
[data-style="lms"] textarea { border-radius: 10px; background: var(--panel); border-color: var(--line2); }

/* schede a segmenti: contenitore, scheda attiva in lime */
[data-style="lms"] .tabs { gap: 4px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: fit-content; max-width: 100%; }
[data-style="lms"] .tabs a { border: 0; background: transparent; border-radius: 9px; padding: 7px 12px; color: var(--muted); font-weight: 600; font-size: 13px; }
[data-style="lms"] .tabs a:hover:not(.on) { color: var(--fg); background: transparent; }
[data-style="lms"] .tabs a.on { background: var(--hl); color: var(--hl-fg); }
[data-style="lms"] .tabs .tcount { background: color-mix(in srgb, var(--fg) 10%, transparent); color: inherit; opacity: .8; }
[data-style="lms"] .tabs a.on .tcount { background: rgba(17,19,26,.14); color: var(--hl-fg); }

/* stati: pillola contornata col colore dello stato */
[data-style="lms"] .badge { background: transparent; border: 1px solid currentColor; color: var(--b); font-size: 11.5px; font-weight: 600; padding: 2px 9px; }
[data-style="lms"] .badge:not(.ok):not(.err):not(.warn):not(.info):not(.acc) { --b: var(--muted); }
[data-style="lms"] .badge.acc { --b: var(--strong); }
[data-style="lms"] .tag { border-radius: 999px; padding: 0 6px; }

/* targa: banda blu europea con le stelle e la sigla del paese */
[data-style="lms"] .plate { height: 24px; border: 0; border-radius: 5px; background: #f4f5f7; color: #11131a; box-shadow: none;
  font: 700 12px/24px var(--mono); letter-spacing: .04em; }
[data-style="lms"] .plate-eu { position: relative; width: 17px; background: #003399; }
[data-style="lms"] .plate-eu::before { content: ""; position: absolute; top: 3px; left: 50%; transform: translateX(-50%);
  width: 9px; height: 9px; border-radius: 50%; border: 1.5px dotted #ffcc00; }
[data-style="lms"] .plate-eu::after { content: "IT"; position: absolute; bottom: 3px; left: 0; right: 0; text-align: center;
  font: 700 7.5px/1 var(--font); color: #fff; letter-spacing: 0; }
[data-style="lms"] .plate-n { padding: 0 7px 0 6px; }
[data-style="lms"] .plate.sm { height: 21px; font-size: 11px; line-height: 21px; }
[data-style="lms"] .plate.sm .plate-eu { width: 15px; }
[data-style="lms"] .plate.sm .plate-eu::before { width: 8px; height: 8px; top: 2px; }
[data-style="lms"] .plate.sm .plate-eu::after { bottom: 2px; font-size: 6.5px; }
[data-style="lms"] .aico { border-radius: 8px; }

/* accesso: la card bianca del sito con la finestra scura dentro */
[data-style="lms"] .auth { background: var(--bg); }
[data-style="lms"] .auth .card { border-radius: 24px; }

/* ---------------------------------------------------------------- animazioni (come nelle card) */
@keyframes lms-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes lms-pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes lms-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes lms-nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateX(3px); } }

@media (prefers-reduced-motion: no-preference) {
  [data-style="lms"][data-motion="on"] .content > .page-head, [data-style="lms"][data-motion="on"] .content > .card, [data-style="lms"][data-motion="on"] .content > .grid > *,
  [data-style="lms"][data-motion="on"] .content > .tabs, [data-style="lms"][data-motion="on"] .content > .tbl-wrap, [data-style="lms"][data-motion="on"] .content > form,
  [data-style="lms"][data-motion="on"] .content > section, [data-style="lms"][data-motion="on"] .content .list > *, [data-style="lms"][data-motion="on"] .content .stat {
    animation: lms-in .35s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
  [data-style="lms"][data-motion="on"] .tbl tbody tr { animation: lms-in .35s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(var(--i, 0) * 25ms); }
  [data-style="lms"][data-motion="on"] .flash { animation: lms-in .35s cubic-bezier(.2,.7,.2,1) backwards; }
  [data-style="lms"][data-motion="on"] [data-pane]:not([hidden]) { animation: lms-in .4s cubic-bezier(.2,.7,.2,1) backwards; }
  [data-style="lms"][data-motion="on"] .clock-pill::before { animation: lms-pulse 2s infinite; }
  [data-style="lms"][data-motion="on"] .dotn { animation: lms-pop .5s .3s cubic-bezier(.3,1.4,.5,1) backwards; }
  [data-style="lms"][data-motion="on"] .btn, [data-style="lms"][data-motion="on"] .iconbtn, [data-style="lms"][data-motion="on"] .tabs a, [data-style="lms"][data-motion="on"] .badge, [data-style="lms"][data-motion="on"] a.li {
    transition: transform .15s ease, filter .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
  [data-style="lms"][data-motion="on"] .btn:hover:not(:disabled) { filter: brightness(1.08); }
  [data-style="lms"][data-motion="on"] .btn:active:not(:disabled), [data-style="lms"][data-motion="on"] .iconbtn:active { transform: scale(.96); }
  [data-style="lms"][data-motion="on"] .stat { transition: border-color .2s, transform .2s; }
  [data-style="lms"][data-motion="on"] .stat:hover { border-color: color-mix(in srgb, var(--fg) 16%, transparent); transform: translateY(-1px); }
  [data-style="lms"][data-motion="on"] .btn:not(.ghost):not(.danger) .ico:last-child:not(:first-child) { animation: lms-nudge 1.8s ease-in-out infinite; }
  [data-style="lms"][data-motion="on"] .stat b.is-bump { color: var(--hl); transition: color .3s; }
}
