/* =====================================================================
   VATTEN CONTROL CENTER — identidade visual
   Azul-marinho profundo · azul elétrico · ciano
   ===================================================================== */

:root {
  --navy-1000: #02060F;
  --navy-950: #040A1C;
  --navy-900: #061027;
  --navy-850: #0A1733;
  --navy-800: #0F1F42;

  --electric: #4C86FF;
  --electric-strong: #2E64F5;
  --electric-soft: rgba(76, 134, 255, .16);
  --cyan: #36DDF5;
  --cyan-strong: #12B9D9;
  --cyan-soft: rgba(54, 221, 245, .14);

  --ok: #3DDC97;
  --warn: #F5B544;
  --danger: #FF6B7A;

  --text: #EAF1FF;
  --text-2: #B3C2E0;
  --text-3: #8696B8;
  --text-4: #5F6F93;

  --line: rgba(150, 182, 255, .12);
  --line-strong: rgba(150, 182, 255, .22);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  --glass-solid: rgba(9, 20, 46, .72);
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 20px 50px -24px rgba(0, 0, 0, .7);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 40px 90px -40px rgba(0, 0, 0, .85);

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --font: "Inter var", Inter, "Segoe UI Variable Text", "Segoe UI", "SF Pro Text", -apple-system, system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter var", Inter, "Segoe UI Variable Display", "Segoe UI", "SF Pro Display", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", "SF Mono", ui-monospace, Consolas, monospace;

  --header-h: 72px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scrollbar-gutter: stable; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--navy-950);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -.015em; }
p { margin: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-3); }
details summary { cursor: pointer; list-style: none; font-size: 13.5px; }
details summary::-webkit-details-marker { display: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
::selection { background: rgba(76, 134, 255, .45); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--electric); color: #fff; padding: 10px 16px; border-radius: 10px;
  text-decoration: none; font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

.noscript { padding: 40px; text-align: center; }

/* ---------------------------- fundo ---------------------------- */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(1200px 720px at 12% -12%, rgba(46, 100, 245, .26), transparent 62%),
    radial-gradient(900px 640px at 105% 6%, rgba(18, 185, 217, .14), transparent 60%),
    radial-gradient(1100px 800px at 50% 120%, rgba(46, 100, 245, .12), transparent 60%),
    linear-gradient(180deg, #050C22 0%, #040A1C 45%, #030817 100%);
}
.backdrop__grid {
  position: absolute; inset: -2px;
  background-image: url("/assets/img/pattern.svg");
  background-size: 112px 194px;
  opacity: .07;
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 85% 70% at 50% 30%, #000 20%, transparent 80%);
}
.backdrop__glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.backdrop__glow--a { width: 520px; height: 520px; left: -140px; top: 30%; background: rgba(46, 100, 245, .22); animation: drift-a 26s ease-in-out infinite alternate; }
.backdrop__glow--b { width: 460px; height: 460px; right: -120px; top: 55%; background: rgba(18, 185, 217, .14); animation: drift-b 30s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(120px, -60px, 0); } }
@keyframes drift-b { to { transform: translate3d(-100px, -90px, 0); } }

.root { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.boot-splash { flex: 1; display: grid; place-items: center; }
.boot-splash__ring { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--cyan); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------- marca ---------------------------- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
/* Logotipo oficial: o brilho suave destaca o azul-marinho do "V" no fundo escuro. */
.brand__mark { width: 44px; height: auto; flex: none; filter: drop-shadow(0 0 10px rgba(90, 150, 255, .28)); }
.brand__text { display: flex; flex-direction: column; justify-content: center; line-height: 1.05; }
.brand__word { height: 15px; width: auto; display: block; }
.brand__sub { font-size: 10px; letter-spacing: .32em; color: var(--text-3); margin-top: 6px; font-weight: 600; }
.brand { gap: 10px; }

.lockup { display: flex; align-items: center; }
.lockup__symbol { width: auto; flex: none; filter: drop-shadow(0 0 18px rgba(90, 150, 255, .3)) drop-shadow(0 18px 40px rgba(46, 100, 245, .35)); }
.lockup__word { width: auto; display: block; margin-left: -2%; margin-top: 4%; }
.hero__lockup { margin-top: 30px; }
.hero__lockup .lockup__symbol { height: clamp(110px, 10vw, 150px); }
.hero__lockup .lockup__word { height: clamp(60px, 5.4vw, 82px); }
.auth__lockup { justify-content: center; margin-bottom: 18px; }
.auth__lockup .lockup__symbol { height: 72px; }
.auth__lockup .lockup__word { height: 44px; }
@media (max-width: 380px) {
  .auth__lockup .lockup__symbol { height: 58px; }
  .auth__lockup .lockup__word { height: 36px; }
}

/* ---------------------------- glass ---------------------------- */
.glass {
  position: relative;
  background: var(--glass), var(--glass-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
}
.glass::before { /* filete de luz no topo */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(90deg, transparent 8%, rgba(160, 200, 255, .28) 50%, transparent 92%) top / 100% 1px no-repeat;
}

/* ---------------------------- botões ---------------------------- */
.btn {
  --btn-bg: rgba(255, 255, 255, .04);
  --btn-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--btn-bg); border: 1px solid var(--btn-bd);
  color: var(--text); font-weight: 600; font-size: 14px; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease), color .2s;
}
.btn:hover { --btn-bg: rgba(255, 255, 255, .08); --btn-bd: rgba(170, 200, 255, .32); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary {
  --btn-bg: linear-gradient(135deg, #3A74FF 0%, #2B5CF0 55%, #1E9FE0 120%);
  --btn-bd: rgba(140, 180, 255, .45);
  background: var(--btn-bg);
  box-shadow: 0 10px 30px -12px rgba(46, 100, 245, .75), 0 1px 0 rgba(255, 255, 255, .25) inset;
}
.btn--primary:hover { --btn-bg: linear-gradient(135deg, #4A80FF 0%, #3467F5 55%, #23ACE8 120%); box-shadow: 0 14px 36px -12px rgba(46, 100, 245, .9), 0 1px 0 rgba(255, 255, 255, .3) inset; }
.btn--block { width: 100%; min-height: 50px; font-size: 15px; }
.btn--ghost { --btn-bg: transparent; --btn-bd: transparent; color: var(--text-2); padding: 0 12px; }
.btn--ghost:hover { --btn-bg: rgba(255, 255, 255, .05); --btn-bd: var(--line); color: var(--text); }
.btn--danger { color: #FFC2C8; --btn-bd: rgba(255, 107, 122, .35); }
.btn--danger:hover { --btn-bg: rgba(255, 107, 122, .12); --btn-bd: rgba(255, 107, 122, .55); }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn--icon { width: 44px; padding: 0; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite;
}

.link { color: var(--cyan); text-decoration: none; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------- formulários ---------------------------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field + .field { margin-top: 18px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.field__hint { font-size: 12.5px; color: var(--text-3); }
.input-wrap { position: relative; }
.input {
  width: 100%; min-height: 50px; padding: 0 16px;
  background: rgba(3, 9, 26, .6); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 12px;
  font-size: 15px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--text-4); }
.input:hover { border-color: rgba(170, 200, 255, .32); }
.input:focus { outline: none; border-color: var(--electric); box-shadow: 0 0 0 4px rgba(76, 134, 255, .18); background: rgba(3, 9, 26, .8); }
.input-wrap .input { padding-right: 52px; }
.input-wrap__btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 10px; border: 0; background: transparent; color: var(--text-3);
  display: grid; place-items: center; cursor: pointer;
}
.input-wrap__btn:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.input-wrap__btn svg { width: 18px; height: 18px; }
.input--code {
  font-family: var(--font-mono); font-size: 28px; letter-spacing: .55em; text-align: center;
  padding-left: calc(16px + .55em); min-height: 64px; font-variant-numeric: tabular-nums;
}
.input--recovery { font-family: var(--font-mono); font-size: 20px; letter-spacing: .18em; text-align: center; text-transform: uppercase; }
select.input { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.check input { appearance: none; width: 20px; height: 20px; margin: 1px 0 0; flex: none; border-radius: 6px; border: 1px solid var(--line-strong); background: rgba(3, 9, 26, .6); display: grid; place-items: center; cursor: pointer; transition: .15s; }
.check input:checked { background: var(--electric); border-color: var(--electric); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; border: 1px solid; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert--error { background: rgba(255, 107, 122, .08); border-color: rgba(255, 107, 122, .3); color: #FFD0D5; }
.alert--info { background: rgba(76, 134, 255, .08); border-color: rgba(76, 134, 255, .28); color: #D4E2FF; }
.alert--warn { background: rgba(245, 181, 68, .08); border-color: rgba(245, 181, 68, .3); color: #FFE3B0; }
.alert--ok { background: rgba(61, 220, 151, .08); border-color: rgba(61, 220, 151, .3); color: #CFF7E5; }
.alert:empty { display: none; }

.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.strength span { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); transition: background .3s; }
.strength[data-level="1"] span:nth-child(-n+1) { background: var(--danger); }
.strength[data-level="2"] span:nth-child(-n+2) { background: var(--warn); }
.strength[data-level="3"] span:nth-child(-n+3) { background: var(--electric); }
.strength[data-level="4"] span { background: var(--ok); }

.rules { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.rules li { display: flex; gap: 8px; align-items: center; }
.rules li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-4); flex: none; transition: background .2s; }
.rules li.ok { color: var(--text-2); }
.rules li.ok::before { background: var(--ok); }

/* =====================================================================
   AUTENTICAÇÃO
   ===================================================================== */
.auth { flex: 1; display: grid; grid-template-columns: 1fr; padding: 32px 20px; gap: 36px; align-content: center; justify-items: center; }
.auth__hero { display: none; }
.auth__panel { width: 100%; max-width: 440px; padding: 40px 36px 34px; }
.auth__brand { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 32px; }
.auth__mark { width: 64px; height: 64px; margin-bottom: 20px; filter: drop-shadow(0 10px 30px rgba(76, 134, 255, .45)); }
.auth__word { font-family: var(--font-display); font-weight: 650; font-size: 30px; letter-spacing: .42em; margin-right: -.42em; }
.auth__tagline { margin-top: 10px; color: var(--text-2); font-size: 15px; letter-spacing: .01em; }
.auth__title { font-size: 20px; font-weight: 650; margin-bottom: 6px; }
.auth__lead { color: var(--text-2); font-size: 14px; margin-bottom: 26px; }
.auth__step { font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); font-weight: 700; margin-bottom: 10px; }
.auth__actions { margin-top: 26px; display: grid; gap: 14px; }
.auth__alt { text-align: center; font-size: 13.5px; color: var(--text-3); }
.auth__foot { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; color: var(--text-3); letter-spacing: .02em; }
.auth__foot svg { width: 14px; height: 14px; color: var(--ok); }
.auth .alert { margin-bottom: 18px; }

@media (min-width: 1000px) {
  .auth { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); padding: 48px clamp(40px, 6vw, 110px); gap: clamp(40px, 6vw, 110px); justify-items: stretch; }
  .auth__hero { display: flex; flex-direction: column; justify-content: center; position: relative; min-height: 560px; }
  .auth__panel { justify-self: center; }
  .auth--wide .auth__panel { max-width: 520px; }
  .auth__panel .auth__brand { display: none; }
}
.hero__over { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--cyan); font-weight: 700; display: flex; align-items: center; gap: 12px; }
.hero__over::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, var(--cyan), transparent); }
.hero__word { margin-top: 26px; display: flex; align-items: center; gap: 22px; }
.hero__word svg { width: 74px; height: 74px; filter: drop-shadow(0 16px 40px rgba(76, 134, 255, .5)); }
.hero__word span { font-family: var(--font-display); font-weight: 650; font-size: clamp(48px, 5.4vw, 76px); letter-spacing: .32em; line-height: 1; background: linear-gradient(180deg, #FFFFFF 10%, #A8C4FF 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__tagline { margin-top: 26px; font-size: clamp(20px, 1.9vw, 26px); color: var(--text); font-weight: 450; letter-spacing: -.01em; max-width: 520px; }
.hero__tagline em { font-style: normal; color: var(--text-3); }
.hero__orbit { position: absolute; right: -6%; top: 50%; width: min(460px, 42vw); aspect-ratio: 1; transform: translateY(-50%); opacity: .55; pointer-events: none; }
.hero__orbit circle { fill: none; stroke: rgba(140, 180, 255, .18); }
.hero__orbit .o-dot { fill: var(--cyan); stroke: none; }
.hero__orbit .o-ring { transform-origin: 50% 50%; animation: spin 60s linear infinite; }
.hero__orbit .o-ring--b { animation-duration: 90s; animation-direction: reverse; }
.hero__meta { margin-top: 44px; display: flex; gap: 28px; flex-wrap: wrap; }
.hero__meta div { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; }
.hero__meta svg { width: 16px; height: 16px; color: var(--electric); }

/* QR / cadastro do 2FA */
.enroll-grid { display: grid; gap: 22px; }
.qr-box { display: grid; place-items: center; padding: 16px; background: #fff; border-radius: 18px; width: 216px; height: 216px; margin: 0 auto; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2), 0 20px 50px -20px rgba(76, 134, 255, .65); }
.qr-box img { width: 184px; height: 184px; image-rendering: pixelated; }
.secret { font-family: var(--font-mono); font-size: 14.5px; letter-spacing: .08em; padding: 12px 14px; border-radius: 12px; background: rgba(3, 9, 26, .6); border: 1px dashed var(--line-strong); word-break: normal; overflow-wrap: anywhere; text-align: center; color: var(--text); user-select: all; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; font-size: 14px; color: var(--text-2); }
.steps li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--cyan); border: 1px solid rgba(54, 221, 245, .35); background: var(--cyan-soft); }
.steps b { color: var(--text); font-weight: 600; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 18px; background: rgba(3, 9, 26, .6); border: 1px solid var(--line-strong); border-radius: 16px; list-style: none; margin: 0; }
.codes li { font-family: var(--font-mono); font-size: 15.5px; letter-spacing: .08em; text-align: center; padding: 8px 4px; border-radius: 8px; background: rgba(255, 255, 255, .03); }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.row-actions .btn { flex: 1; }

/* =====================================================================
   CABEÇALHO DO PORTAL
   ===================================================================== */
.header { position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center;
  padding: 0 clamp(16px, 3.4vw, 44px); gap: 20px;
  background: linear-gradient(180deg, rgba(4, 10, 28, .9), rgba(4, 10, 28, .66));
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
}
.header__spacer { flex: 1; }
.header__greet { color: var(--text-3); font-size: 13.5px; white-space: nowrap; gap: .3em; }
.secure-pill > * { flex: none; }
.header__greet b { color: var(--text-2); font-weight: 600; }
.secure-pill { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 13px 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #CFF7E5; background: rgba(61, 220, 151, .07); border: 1px solid rgba(61, 220, 151, .24); white-space: nowrap; }
.secure-pill svg { width: 15px; height: 15px; color: var(--ok); }
.secure-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); } }
.header__nav { display: flex; align-items: center; gap: 4px; }
.header__nav .btn { min-height: 40px; }
.header__nav .btn[aria-current="page"] { color: var(--text); --btn-bg: rgba(76, 134, 255, .12); --btn-bd: rgba(76, 134, 255, .3); }
.only-wide { display: none; }
@media (min-width: 760px) { .only-wide { display: inline-flex; } .only-narrow { display: none !important; } }
@media (max-width: 759px) {
  .header { gap: 10px; }
  .brand__sub { display: none; }
  .brand__word { height: 13px; }
  .brand__mark { width: 38px; }
  .header__nav .btn span { display: none; }
  .header__nav .btn { width: 40px; padding: 0; }
  .secure-pill { padding: 0 10px; }
  .secure-pill__label { display: none; }
}

/* =====================================================================
   PAINEL PRINCIPAL
   ===================================================================== */
.main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) clamp(16px, 3.4vw, 44px) 40px; outline: none; }
.intro { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(28px, 4vw, 48px); }
.intro__over { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--cyan); font-weight: 700; }
.intro__over::before { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, var(--cyan), transparent); }
.intro__title { font-size: clamp(30px, 3.6vw, 46px); font-weight: 650; line-height: 1.1; letter-spacing: -.025em; }
.intro__title span { background: linear-gradient(90deg, #FFFFFF, #9DBDFF 60%, #6FE6F8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro__lead { color: var(--text-2); font-size: 16px; max-width: 620px; }
.intro__date { color: var(--text-3); font-size: 13.5px; }
.intro__date::first-letter { text-transform: uppercase; }

.dre-grid { display: grid; grid-template-columns: 1fr; gap: clamp(18px, 2.4vw, 28px); }
@media (min-width: 900px) { .dre-grid { grid-template-columns: 1fr 1fr; } }

.dre-card {
  --accent: var(--electric);
  --accent-2: #7AA6FF;
  --accent-soft: var(--electric-soft);
  --mx: 50%; --my: 0%;
  position: relative; display: flex; flex-direction: column; min-height: 380px;
  padding: clamp(26px, 3vw, 38px); text-decoration: none; color: var(--text);
  border-radius: var(--r-xl); overflow: hidden; isolation: isolate;
  transition: transform .45s var(--ease-out), border-color .35s var(--ease), box-shadow .45s var(--ease-out);
}
.dre-card--electric { --accent: var(--electric); --accent-2: #7AA6FF; --accent-soft: var(--electric-soft); }
.dre-card--cyan { --accent: var(--cyan); --accent-2: #8DEFFF; --accent-soft: var(--cyan-soft); }
.dre-card::after { /* brilho que acompanha o cursor */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(520px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%);
  opacity: 0; transition: opacity .4s var(--ease);
}
.dre-card__edge { /* borda luminosa sutil */
  position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: radial-gradient(380px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 70%, transparent), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s var(--ease);
}
.dre-card:hover, .dre-card:focus-visible { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: var(--shadow-2), 0 30px 80px -40px color-mix(in srgb, var(--accent) 60%, transparent); }
.dre-card:hover::after, .dre-card:focus-visible::after, .dre-card:hover .dre-card__edge, .dre-card:focus-visible .dre-card__edge { opacity: 1; }
.dre-card:focus-visible { outline-offset: 4px; border-radius: var(--r-xl); }

.dre-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dre-card__icon {
  width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; flex: none;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 26%, transparent), color-mix(in srgb, var(--accent) 6%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  box-shadow: 0 16px 40px -18px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .18);
  color: var(--accent-2);
}
.dre-card__icon svg { width: 36px; height: 36px; }
.dre-card__index { font-family: var(--font-mono); font-size: 12px; letter-spacing: .2em; color: var(--text-4); }
.dre-card__body { margin-top: 34px; }
.dre-card__kicker { font-size: 11.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.dre-card__title { margin-top: 10px; font-size: clamp(28px, 2.8vw, 36px); font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.dre-card__desc { margin-top: 12px; color: var(--text-2); font-size: 15.5px; max-width: 420px; }
.dre-card__foot { margin-top: auto; padding-top: 34px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dre-card__meta { display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.dre-card__cta {
  display: inline-flex; align-items: center; gap: 12px; height: 50px; padding: 0 20px 0 22px; border-radius: 14px;
  font-weight: 650; font-size: 14.5px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 90%, #fff 0%), color-mix(in srgb, var(--accent) 60%, #0A1A44));
  border: 1px solid color-mix(in srgb, var(--accent) 60%, #fff 10%);
  box-shadow: 0 14px 34px -14px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: gap .35s var(--ease-out), box-shadow .35s var(--ease);
}
.dre-card--cyan .dre-card__cta { color: #021622; }
.dre-card__cta svg { width: 18px; height: 18px; transition: transform .35s var(--ease-out); }
.dre-card:hover .dre-card__cta svg { transform: translateX(4px); }
.dre-card__art { position: absolute; right: -40px; bottom: -40px; width: 300px; height: 300px; z-index: -1; opacity: .5; pointer-events: none; color: var(--accent); }
.dre-card__art path, .dre-card__art circle { fill: none; stroke: currentColor; }

.chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid var(--line-strong); color: var(--text-2); background: rgba(255, 255, 255, .03); }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--ok { color: #9FF0CB; border-color: rgba(61, 220, 151, .3); background: rgba(61, 220, 151, .06); }
.chip--wait { color: #FFD995; border-color: rgba(245, 181, 68, .3); background: rgba(245, 181, 68, .06); }
.chip--info { color: #BCD2FF; border-color: rgba(76, 134, 255, .3); background: rgba(76, 134, 255, .07); }
.chip--plain::before { display: none; }

/* ---------------------------- rodapé ---------------------------- */
.footer { padding: 34px clamp(16px, 3.4vw, 44px) 40px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer__motto { font-family: var(--font-display); font-size: 15px; letter-spacing: .02em; color: var(--text-2); }
.footer__motto span { color: var(--text-3); }
.footer__line { width: 120px; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.footer__small { font-size: 11.5px; color: var(--text-4); letter-spacing: .14em; text-transform: uppercase; }

/* =====================================================================
   VISUALIZADOR DE DRE
   ===================================================================== */
.main--viewer { max-width: none; padding: 0; display: flex; flex-direction: column; }
.viewer { flex: 1; display: flex; flex-direction: column; padding: 18px clamp(12px, 2.4vw, 32px) 18px; gap: 14px; width: 100%; max-width: 1920px; margin: 0 auto; }
.viewer__bar { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; padding: 14px 16px 14px 14px; border-radius: var(--r-lg); }
.viewer__title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.viewer__title .dre-card__icon { width: 44px; height: 44px; border-radius: 13px; }
.viewer__title .dre-card__icon svg { width: 24px; height: 24px; }
.viewer__title h1 { font-size: 19px; font-weight: 650; }
.viewer__title p { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer__chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; justify-content: flex-end; min-width: 0; }
.viewer__chips .chip { max-width: 300px; }
.chip__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip svg { width: 14px; height: 14px; flex: none; }
.viewer__frame-wrap { position: relative; flex: 1; min-height: 70vh; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #08090b; box-shadow: var(--shadow-2); }
.viewer__frame-wrap:fullscreen { border-radius: 0; border: 0; }
.viewer__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #08090b; opacity: 0; transition: opacity .5s var(--ease); }
.viewer__frame.is-ready { opacity: 1; }
.viewer__loading { position: absolute; inset: 0; display: grid; place-items: center; gap: 14px; align-content: center; color: var(--text-3); font-size: 13px; background: var(--navy-950); transition: opacity .4s var(--ease); }
.viewer__loading.is-hidden { opacity: 0; pointer-events: none; }
.viewer .dre-card { min-height: 0; }
@media (max-width: 759px) {
  .viewer__chips { justify-content: flex-start; }
  .viewer__frame-wrap { min-height: calc(100dvh - var(--header-h) - 180px); }
}

.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); text-decoration: none; font-size: 13.5px; font-weight: 600; height: 40px; padding: 0 12px 0 8px; border-radius: 10px; border: 1px solid transparent; transition: .2s var(--ease); }
.back-link:hover { color: var(--text); background: rgba(255, 255, 255, .05); border-color: var(--line); }
.back-link svg { width: 18px; height: 18px; transition: transform .3s var(--ease-out); }
.back-link:hover svg { transform: translateX(-3px); }

/* estado vazio */
.empty { flex: 1; display: grid; place-items: center; text-align: center; padding: clamp(40px, 8vw, 96px) 24px; border-radius: var(--r-xl); }
.empty__art { width: 160px; height: 160px; margin: 0 auto 30px; position: relative; }
.empty__art svg { width: 100%; height: 100%; }
.empty__art circle { fill: none; stroke: rgba(140, 180, 255, .2); }
.empty__art .e-ring { transform-origin: 80px 80px; animation: spin 18s linear infinite; }
.empty__art .e-ring--b { animation-duration: 26s; animation-direction: reverse; }
.empty__art .e-dot { fill: var(--cyan); stroke: none; }
.empty__art .e-core { fill: url(#ecore); stroke: none; }
.empty__title { font-size: clamp(22px, 2.4vw, 28px); font-weight: 650; }
.empty__text { margin: 12px auto 0; max-width: 460px; color: var(--text-2); }
.empty__actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =====================================================================
   CONTA / ADMINISTRAÇÃO
   ===================================================================== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 650; }
.page-head p { color: var(--text-2); margin-top: 6px; }
.panel-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .panel-grid { grid-template-columns: 1fr 1fr; } }
.panel { padding: clamp(22px, 2.6vw, 30px); border-radius: var(--r-lg); }
.panel h2 { font-size: 17px; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.panel h2 svg { width: 20px; height: 20px; color: var(--electric); }
.panel__lead { color: var(--text-3); font-size: 13.5px; margin-top: 6px; margin-bottom: 20px; }
.panel form .btn { margin-top: 20px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text); font-weight: 500; }
.stack { display: grid; gap: 12px; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; border: 1px solid var(--line); background: rgba(3, 9, 26, .5); margin-bottom: 22px; max-width: 100%; overflow-x: auto; }
.tabs button { height: 38px; padding: 0 16px; border-radius: 10px; border: 0; background: transparent; color: var(--text-3); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected="true"] { background: rgba(76, 134, 255, .16); color: var(--text); box-shadow: inset 0 0 0 1px rgba(76, 134, 255, .35); }
.tabs button:hover { color: var(--text); }

.table-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 760px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 700; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table .muted { color: var(--text-3); font-size: 12.5px; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.user-cell { display: flex; align-items: center; gap: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: linear-gradient(135deg, rgba(76, 134, 255, .35), rgba(54, 221, 245, .25)); border: 1px solid var(--line-strong); flex: none; }
.is-inactive { opacity: .55; }

.dre-admin { display: grid; gap: 16px; }
.dre-admin__row { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 22px; border-radius: var(--r-lg); }
.dre-admin__info h3 { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dre-admin__info p { color: var(--text-3); font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.dre-admin__actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dre-admin__actions .input { min-height: 40px; flex: 1 1 240px; font-size: 13.5px; }
@media (min-width: 900px) { .dre-admin__row { grid-template-columns: auto 1fr auto; } .dre-admin__actions { grid-column: auto; justify-content: flex-end; } }

.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-list li { display: grid; grid-template-columns: 150px 1fr; gap: 6px 18px; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.audit-list li:last-child { border-bottom: 0; }
.audit-list time { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.audit-list .ev { font-weight: 600; }
.audit-list .ev--bad { color: #FFB3BC; }
.audit-list .sub { color: var(--text-3); font-size: 12.5px; }
@media (max-width: 640px) { .audit-list li { grid-template-columns: 1fr; } }

/* ---------------------------- diálogo ---------------------------- */
dialog.dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--line-strong); border-radius: 24px; color: var(--text); background: linear-gradient(180deg, #0D1A3A, #081230); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .9); overflow: auto; }
dialog.dialog::backdrop { background: rgba(2, 6, 18, .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.dialog[open] { animation: dlg-in .35s var(--ease-out); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.dialog__body { padding: 28px; }
.dialog__body h2 { font-size: 19px; font-weight: 650; margin-bottom: 6px; }
.dialog__body > p { color: var(--text-2); font-size: 14px; margin-bottom: 20px; }
.dialog__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 26px; flex-wrap: wrap; }
.check-group { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.copy-box { display: flex; gap: 8px; align-items: center; }
.copy-box .secret { flex: 1; text-align: left; }

/* ---------------------------- toasts ---------------------------- */
.toasts { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 40px)); }
.toast { padding: 13px 16px; border-radius: 14px; font-size: 13.5px; background: #0E1C3F; border: 1px solid var(--line-strong); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8); animation: toast-in .35s var(--ease-out); display: flex; gap: 10px; align-items: flex-start; }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast--ok svg { color: var(--ok); }
.toast--error svg { color: var(--danger); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: .3s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* =====================================================================
   ANIMAÇÕES DE ENTRADA
   ===================================================================== */
.reveal { animation: reveal .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 60ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.view-enter { animation: view-in .45s var(--ease-out) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

/* abertura do painel */
.opening { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; background: radial-gradient(800px 500px at 50% 50%, rgba(46, 100, 245, .2), transparent 70%), var(--navy-950); animation: opening-out .6s var(--ease) 1.05s forwards; }
.opening__inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.opening__mark { width: 110px; height: auto; animation: opening-mark .9s var(--ease-out) both; filter: drop-shadow(0 0 22px rgba(90, 150, 255, .4)) drop-shadow(0 14px 40px rgba(76, 134, 255, .5)); }
.opening__line { width: 220px; height: 1px; background: rgba(140, 180, 255, .15); position: relative; overflow: hidden; }
.opening__line::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--cyan), transparent); transform: translateX(-100%); animation: sweep 1s var(--ease) .15s forwards; }
.opening__label { font-size: 11.5px; letter-spacing: .36em; text-transform: uppercase; color: var(--text-3); animation: reveal .6s var(--ease-out) .2s both; }
@keyframes opening-mark { from { opacity: 0; transform: scale(.82) rotate(-8deg); } }
@keyframes sweep { to { transform: translateX(100%); } }
@keyframes opening-out { to { opacity: 0; visibility: hidden; } }

/* =====================================================================
   MOVIMENTO REDUZIDO
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .backdrop__glow, .hero__orbit, .empty__art .e-ring { animation: none !important; }
  .opening { display: none; }
  .dre-card:hover, .dre-card:focus-visible { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --text-2: #D5E0F5; --text-3: #B0BED8; --line: rgba(190, 210, 255, .3); --line-strong: rgba(190, 210, 255, .45); }
}

@media (forced-colors: active) {
  .glass, .dre-card, .btn { border: 1px solid CanvasText; }
}
