/* ==========================================================================
   LUMINOVA — design system "Aero Tech"
   Frutiger Aero + interfaces Vista/2000s: vidro controlado, reflexo especular só no topo das janelas,
   geometria reta (0–2 px), bordas finas, azul tecnológico, ciano, branco e verde.
   O tema escuro mantém a identidade cósmica original (céu estrelado).
   Carregado por ÚLTIMO em todas as páginas; reaproveita os tokens --a-* de luminova-aero.css.
   ========================================================================== */
@import url("https://fonts.googleapis.com/css2?family=Exo+2:wght@500;600;700&family=Nunito+Sans:opsz,wght@6..12,400;6..12,600;6..12,700;6..12,800&family=Share+Tech+Mono&display=swap");

html[data-theme] {
  --l3-font: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  --l3-display: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --l3-mono: "Share Tech Mono", ui-monospace, "Consolas", monospace;
  --a-font: var(--l3-font);
  --a-display: var(--l3-display);
  --font-heading: var(--l3-display);
  --l3-r: 2px;
  --l3-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --l3-gap: clamp(12px, 2vw, 20px);
}
html[data-theme="light"] {
  --l3-ink: #0c2a45;
  --l3-ink-2: #36587a;
  --l3-ink-3: #5d7b98;
  --l3-cyan: #0a8fb8;
  --l3-blue: #1662c4;
  --l3-green: #2f8f1f;
  --l3-danger: #c2264d;
  --l3-line: rgba(22, 98, 196, 0.28);
  --l3-line-2: rgba(22, 98, 196, 0.14);
  --l3-glass: rgba(246, 251, 255, 0.82);
  --l3-glass-solid: #f6fbff;
  --l3-spec: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0.25) 38%, rgba(255, 255, 255, 0) 39%);
  --l3-btn: linear-gradient(180deg, #5fb4f2 0%, #2a83dc 48%, #156bc6 50%, #2f8fe0 100%);
  --l3-btn-edge: #0f4f9a;
  --l3-btn-ink: #fff;
  --l3-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 10px 24px -14px rgba(8, 48, 98, 0.55);
  --l3-focus: 0 0 0 2px #fff, 0 0 0 4px #13a8d8;
}
html[data-theme="dark"] {
  --l3-ink: #e3f1ff;
  --l3-ink-2: #a8c3df;
  --l3-ink-3: #7895b3;
  --l3-cyan: #48d4f5;
  --l3-blue: #5aa8f5;
  --l3-green: #7ede5e;
  --l3-danger: #ff7a98;
  --l3-line: rgba(110, 190, 255, 0.32);
  --l3-line-2: rgba(110, 190, 255, 0.14);
  --l3-glass: rgba(8, 26, 52, 0.8);
  --l3-glass-solid: #0a2040;
  --l3-spec: linear-gradient(180deg, rgba(160, 215, 255, 0.16) 0, rgba(160, 215, 255, 0.04) 38%, transparent 39%);
  --l3-btn: linear-gradient(180deg, #3d9be6 0%, #1c6cc2 48%, #0f56a6 50%, #1d73c8 100%);
  --l3-btn-edge: #6ab8ff;
  --l3-btn-ink: #fff;
  --l3-shadow: 0 1px 0 rgba(160, 215, 255, 0.12) inset, 0 14px 30px -16px rgba(0, 0, 0, 0.9);
  --l3-focus: 0 0 0 2px #04152b, 0 0 0 4px #48d4f5;
}

/* ---------- base e tipografia ---------- */
html[data-theme] body { font-family: var(--l3-font); color: var(--l3-ink); }
html[data-theme] h1, html[data-theme] h2, html[data-theme] h3,
html[data-theme] .ln-title, html[data-theme] .l3-h { font-family: var(--l3-display); letter-spacing: -0.01em; }
.l3-kicker, html[data-theme] .ln-kicker {
  font: 400 12px/1 var(--l3-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--l3-kick, var(--l3-cyan));
}
html[data-theme="light"] { --l3-kick: #07567a; }
.l3-muted { color: var(--l3-ink-2); }
.l3-small { font-size: 13px; color: var(--l3-ink-3); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: none; box-shadow: var(--l3-focus); }
.l3-skip { position: absolute; left: -9999px; top: 8px; z-index: 5000; padding: 10px 14px; background: var(--l3-glass-solid); color: var(--l3-ink); border: 1px solid var(--l3-line); }
.l3-skip:focus { left: 8px; }

/* tema escuro: céu cósmico (identidade original) por trás do vidro */
html[data-theme="dark"] body.l3 {
  background:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 72% 12%, #cfe8ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 62%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 86% 54%, #9fd8ff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 84%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 58% 32%, #fff 50%, transparent 51%),
    radial-gradient(ellipse 70% 40% at 80% 0%, rgba(40, 140, 255, 0.25), transparent 70%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(40, 200, 160, 0.14), transparent 70%),
    linear-gradient(180deg, #030b1c, #071a38 60%, #0a2448);
  background-attachment: fixed; background-size: 420px 420px, 380px 380px, 520px 520px, 460px 460px, 400px 400px, 340px 340px, 100% 100%, 100% 100%, 100% 100%;
}
html[data-theme="light"] body.l3 { background: var(--a-scene); background-attachment: fixed; }
body.l3 > main, body.l3 > header, body.l3 > footer, body.l3 > .ln-layout { position: relative; z-index: 1; }

/* ---------- janela de vidro ---------- */
.l3-win {
  position: relative; background: var(--l3-glass); border: 1px solid var(--l3-line); border-radius: var(--l3-r);
  -webkit-backdrop-filter: blur(14px) saturate(1.25); backdrop-filter: blur(14px) saturate(1.25); box-shadow: var(--l3-shadow);
}
.l3-win::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--l3-spec); opacity: 0.55; }
.l3-win > * { position: relative; }
.l3-win-h {
  display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 12px; border-bottom: 1px solid var(--l3-line-2);
  font: 400 12px/1 var(--l3-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--l3-ink-2);
}
.l3-win-h::before { content: ""; width: 8px; height: 8px; background: var(--l3-cyan); box-shadow: 0 0 8px var(--l3-cyan); }
.l3-win-b { padding: clamp(16px, 2.4vw, 26px); }

/* ---------- botões ---------- */
.l3-btn, html[data-theme] .ln-btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border: 1px solid var(--l3-btn-edge); border-radius: var(--l3-r);
  background: var(--l3-btn); color: var(--l3-btn-ink); font: 700 15px/1 var(--l3-font); text-decoration: none; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 6px -3px rgba(5, 40, 90, 0.6);
  transition: transform 0.12s var(--l3-ease), filter 0.12s;
}
.l3-btn::after, html[data-theme] .ln-btn::after { /* brilho que atravessa no hover */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent); transform: skewX(-18deg);
}
.l3-btn:hover::after, html[data-theme] .ln-btn:hover::after { left: 130%; transition: left 0.6s var(--l3-ease); }
.l3-btn:hover { filter: brightness(1.06); }
.l3-btn:active, html[data-theme] .ln-btn:active { transform: translateY(1px); }
.l3-btn:disabled, html[data-theme] .ln-btn:disabled { opacity: 0.55; cursor: not-allowed; filter: grayscale(0.4); }
.l3-btn.ghost, html[data-theme] .ln-btn.ghost {
  background: var(--l3-glass-solid); color: var(--l3-ink); border-color: var(--l3-line); box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.l3-btn.go { background: linear-gradient(180deg, #8be06a 0%, #45ad2a 48%, #2f921b 50%, #4fb32f 100%); border-color: #23701a; }
.l3-btn.danger { background: linear-gradient(180deg, #ff8aa5 0%, #d63a5f 48%, #bb2449 50%, #d8456a 100%); border-color: #8c1636; }
.l3-btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.l3-btn.full { width: 100%; }
.l3-link { color: var(--l3-blue); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }

/* ---------- campos ---------- */
.l3-field { display: grid; gap: 6px; margin: 0 0 14px; }
.l3-field > label, .l3-label { font: 700 13px var(--l3-font); color: var(--l3-ink-2); }
.l3-input, .l3-field input, .l3-field select, .l3-field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--l3-line); border-radius: var(--l3-r);
  background: var(--a-input, #fff); color: var(--l3-ink); font: 400 16px var(--l3-font);
  box-shadow: inset 0 1px 2px rgba(5, 40, 90, 0.12); transition: border-color 0.15s, box-shadow 0.15s;
}
.l3-field input:focus, .l3-field select:focus, .l3-field textarea:focus, .l3-input:focus { outline: none; border-color: var(--l3-cyan); box-shadow: inset 0 1px 2px rgba(5,40,90,.12), 0 0 0 3px color-mix(in srgb, var(--l3-cyan) 25%, transparent); }
.l3-field [aria-invalid="true"] { border-color: var(--l3-danger); }
.l3-hint { font-size: 13px; color: var(--l3-ink-3); min-height: 1em; }
.l3-hint.err { color: var(--l3-danger); font-weight: 700; }
.l3-hint.ok { color: var(--l3-green); font-weight: 700; }
.l3-pw { position: relative; }
.l3-pw input { padding-right: 84px; }
.l3-pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 0 10px; border: 1px solid var(--l3-line); background: var(--l3-glass-solid); color: var(--l3-ink-2); font: 700 12px var(--l3-font); cursor: pointer; border-radius: var(--l3-r); }
.l3-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--l3-ink-2); margin: 0 0 10px; }
.l3-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--l3-blue); flex: 0 0 18px; }
.l3-meter { height: 4px; background: var(--l3-line-2); margin-top: 6px; }
.l3-meter i { display: block; height: 100%; width: 0; transition: width 0.2s, background 0.2s; }
.l3-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.l3-suggest button { min-height: 32px; padding: 0 10px; border: 1px solid var(--l3-line); background: var(--l3-glass-solid); color: var(--l3-blue); font: 700 13px var(--l3-font); cursor: pointer; border-radius: var(--l3-r); }
.l3-suggest button:hover { border-color: var(--l3-cyan); }

/* interruptor */
.l3-switch { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--l3-line-2); }
.l3-switch:last-child { border-bottom: 0; }
.l3-switch strong { display: block; font-size: 15px; }
.l3-switch small { display: block; color: var(--l3-ink-3); font-size: 13px; margin-top: 2px; line-height: 1.45; }
.l3-switch input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: 0 0 46px; width: 46px; height: 24px; border: 1px solid var(--l3-line); background: var(--l3-line-2); position: relative; cursor: pointer; border-radius: var(--l3-r); transition: background 0.15s; }
.l3-switch input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border: 1px solid var(--l3-line); transition: left 0.15s var(--l3-ease); }
.l3-switch input[type="checkbox"]:checked { background: var(--l3-btn); border-color: var(--l3-btn-edge); }
.l3-switch input[type="checkbox"]:checked::after { left: 24px; }

/* ---------- chips, etiquetas, alertas ---------- */
.l3-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 1px solid var(--l3-line); background: var(--l3-glass-solid); color: var(--l3-ink-2); font: 700 13px var(--l3-font); border-radius: var(--l3-r); cursor: pointer; transition: border-color .12s, background .12s, color .12s; }
.l3-chip:hover { border-color: var(--l3-cyan); color: var(--l3-ink); }
.l3-chip[aria-pressed="true"], .l3-chip.on { background: color-mix(in srgb, var(--l3-cyan) 16%, var(--l3-glass-solid)); border-color: var(--l3-cyan); color: var(--l3-ink); }
.l3-chip[aria-pressed="true"]::before, .l3-chip.on::before { content: "✓"; color: var(--l3-cyan); }
.l3-alert { padding: 12px 14px; border: 1px solid var(--l3-line); border-left: 3px solid var(--l3-cyan); background: var(--l3-glass-solid); font-size: 14px; line-height: 1.5; margin: 0 0 14px; }
.l3-alert.err { border-left-color: var(--l3-danger); }
.l3-alert.ok { border-left-color: var(--l3-green); }
.l3-alert[hidden] { display: none; }

/* ---------- layout de páginas internas ---------- */
.l3-page { max-width: 1120px; margin: 0 auto; padding: clamp(14px, 3vw, 32px) clamp(14px, 3vw, 28px) 64px; }
.l3-head { display: grid; gap: 8px; margin: 6px 0 22px; }
.l3-head h1 { margin: 0; font-size: clamp(28px, 4.4vw, 44px); line-height: 1.05; font-weight: 700; color: var(--l3-ink); }
.l3-head p { margin: 0; max-width: 64ch; color: var(--l3-ink-2); font-size: 16px; line-height: 1.55; }
.l3-split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--l3-gap); align-items: start; }
.l3-tabs { position: sticky; top: 12px; display: grid; gap: 2px; padding: 6px; }
.l3-tabs a, .l3-tabs button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 1px solid transparent; background: none; color: var(--l3-ink-2); font: 700 14px var(--l3-font); text-decoration: none; text-align: left; cursor: pointer; border-radius: var(--l3-r); }
.l3-tabs a:hover, .l3-tabs button:hover { border-color: var(--l3-line); color: var(--l3-ink); }
.l3-tabs [aria-current="true"], .l3-tabs [aria-selected="true"] { background: var(--l3-btn); color: #fff; border-color: var(--l3-btn-edge); }
.l3-section { scroll-margin-top: 70px; }
.l3-section + .l3-section { margin-top: var(--l3-gap); }
.l3-section h2 { margin: 0 0 4px; font-size: 21px; }
.l3-section > .l3-win-b > p.l3-muted { margin: 0 0 14px; line-height: 1.55; }
.l3-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.l3-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.l3-list li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--l3-line-2); background: var(--l3-glass-solid); }
.l3-empty { display: grid; place-items: center; gap: 8px; text-align: center; padding: 34px 16px; border: 1px dashed var(--l3-line); color: var(--l3-ink-2); }
.l3-empty svg { width: 40px; height: 40px; color: var(--l3-cyan); }
.l3-empty strong { font-family: var(--l3-display); font-size: 18px; color: var(--l3-ink); }
@media (max-width: 860px) {
  .l3-split { grid-template-columns: 1fr; }
  .l3-tabs { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .l3-tabs a, .l3-tabs button { white-space: nowrap; }
}

/* ---------- modal ---------- */
.l3-modal { position: fixed; inset: 0; z-index: 4000; display: none; place-items: center; padding: 16px; background: color-mix(in srgb, #03142b 58%, transparent); }
.l3-modal.open { display: grid; animation: l3-fade 0.16s var(--l3-ease); }
.l3-modal .l3-win { width: min(520px, 100%); max-height: 92dvh; overflow: auto; }
.l3-modal-x { margin-left: auto; width: 30px; height: 26px; border: 1px solid var(--l3-line); background: var(--l3-glass-solid); color: var(--l3-ink-2); cursor: pointer; font-size: 16px; line-height: 1; }
@keyframes l3-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- cartões de pessoa ---------- */
.l3-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.l3-card { display: flex; flex-direction: column; border: 1px solid var(--l3-line); background: var(--l3-glass-solid); overflow: hidden; transition: transform 0.15s var(--l3-ease), border-color 0.15s; }
.l3-card:hover { transform: translateY(-2px); border-color: var(--l3-cyan); }
.l3-card-cover { height: 74px; background-size: cover; background-position: center; border-bottom: 1px solid var(--l3-line-2); }
.l3-card-b { padding: 0 14px 14px; display: grid; gap: 8px; }
.l3-card h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.l3-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--l3-ink-2); }

/* ---------- documentos legais ---------- */
.l3-doc { max-width: 820px; margin: 0 auto; line-height: 1.7; font-size: 16px; }
.l3-doc h2 { font-size: 22px; margin: 34px 0 8px; padding-top: 10px; border-top: 1px solid var(--l3-line-2); }
.l3-doc h3 { font-size: 17px; margin: 20px 0 6px; }
.l3-doc p, .l3-doc li { color: var(--l3-ink); }
.l3-doc ul { padding-left: 20px; }
.l3-doc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 10px 0; }
.l3-doc th, .l3-doc td { text-align: left; vertical-align: top; padding: 8px; border: 1px solid var(--l3-line-2); }
.l3-doc th { background: color-mix(in srgb, var(--l3-cyan) 10%, transparent); }
.l3-doc .l3-toc { columns: 2 240px; padding: 14px 14px 14px 30px; border: 1px solid var(--l3-line-2); background: var(--l3-glass-solid); }
.l3-note { padding: 12px 14px; border: 1px dashed var(--l3-line); font-size: 14px; color: var(--l3-ink-2); }

/* ---------- rodapé público ---------- */
.l3-foot { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: center; padding: 22px 16px 28px; font-size: 13px; color: var(--l3-ink-2); }
.l3-foot a { color: inherit; }

/* ---------- badges de navegação ---------- */
.l3-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; background: #e2335f; color: #fff; font: 800 11px/1 var(--l3-font); border-radius: 10px; }
.l3-badge[hidden] { display: none; }

/* ---------- feed: menus de ação ---------- */
.l3-menu { position: relative; margin-left: auto; }
.l3-menu > button { min-width: 36px; min-height: 36px; border: 1px solid transparent; background: none; color: var(--l3-ink-3); cursor: pointer; font-size: 18px; line-height: 1; border-radius: var(--l3-r); }
.l3-menu > button:hover { border-color: var(--l3-line); color: var(--l3-ink); }
.l3-menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 190px; display: grid; padding: 4px; background: var(--l3-glass-solid); border: 1px solid var(--l3-line); box-shadow: var(--l3-shadow); }
.l3-menu-list[hidden] { display: none; }
.l3-menu-list button { min-height: 38px; padding: 0 10px; text-align: left; border: 0; background: none; color: var(--l3-ink); font: 600 14px var(--l3-font); cursor: pointer; }
.l3-menu-list button:hover { background: color-mix(in srgb, var(--l3-cyan) 14%, transparent); }
.l3-menu-list button.danger { color: var(--l3-danger); }
.l3-edited { font-size: 12px; color: var(--l3-ink-3); }

/* ---------- animações e acessibilidade ---------- */
.l3-rise { animation: l3-rise 0.45s var(--l3-ease) both; }
@keyframes l3-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) { .l3-btn, .ln-btn { border: 1px solid ButtonText; } }

/* ---------- notificações ---------- */
.n-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.n-item { display: grid; grid-template-columns: 26px auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--l3-line-2); background: var(--l3-glass-solid); }
.n-item.is-unread { border-left: 3px solid var(--l3-cyan); background: color-mix(in srgb, var(--l3-cyan) 7%, var(--l3-glass-solid)); }
.n-ico { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--l3-line); color: var(--l3-cyan); font-size: 13px; }
.n-txt p { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.n-txt time { font-size: 12px; color: var(--l3-ink-3); }
.n-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 620px) { .n-item { grid-template-columns: 26px auto 1fr; } .n-act { grid-column: 1 / -1; justify-content: flex-start; } }
.ob-groups { display: grid; gap: 14px; }
.ob-group h3 { margin: 0 0 8px; font: 400 12px var(--l3-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--l3-ink-3); }
.ob-step[hidden] { display: none; }

/* ---------- recomendações no feed ---------- */
.g-reco { display: flex; gap: 10px; align-items: center; padding: 6px 0; color: inherit; text-decoration: none; }
.g-reco small { display: block; color: var(--l3-ink-3); font-size: 12px; }
.g-reco-c { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--l3-line); color: var(--l3-cyan); }
