/* NFE — visual do portal do cliente (identidade NFE: preto, branco e verde-limão, com o "n" da marca).
 * Só aparência: carregado depois do nfe-polish.css, não muda telas, dados nem comportamento. */
html[data-nfe-page="portal"] { --pl-ink: #050505; --pl-lime: #C7FF00; --pl-ease: cubic-bezier(.2, .8, .2, 1); }
html[data-nfe-page="portal"] body { background:
  radial-gradient(900px 420px at 110% -10%, rgb(199 255 0 / .07), transparent 60%),
  rgb(var(--nfe-50)); background-attachment: fixed; }

/* ---------------- Layout: menu lateral de cima a baixo (vidro) com o nome de cada função, e barra flutuante no topo */
.pl-frame { min-height: 100vh; padding: 14px 18px 32px 290px; }
.pl-logo, .pl-sections, .pl-round, .pl-user, .pl-side { background: rgb(var(--nfe-white) / .74); backdrop-filter: saturate(1.8) blur(16px); -webkit-backdrop-filter: saturate(1.8) blur(16px); border: 1px solid rgb(var(--nfe-200) / .9); box-shadow: 0 10px 30px -18px rgba(0,0,0,.35); }

.pl-side { position: fixed; z-index: 40; left: 14px; top: 14px; bottom: 14px; width: 258px; display: flex; flex-direction: column; border-radius: 26px; overflow: hidden; isolation: isolate; }
.pl-side::before { content: ""; position: absolute; z-index: -1; left: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgb(199 255 0 / .22), transparent 70%); pointer-events: none; }
.pl-side .pl-logo { display: flex; align-items: center; gap: 10px; margin: 12px 12px 6px; padding: 8px 10px; border-radius: 18px; background: var(--pl-ink); border: 0; box-shadow: 0 12px 26px -16px rgba(0,0,0,.7); backdrop-filter: none; }
.pl-logo > svg { flex: none; width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 0 0 1px rgb(199 255 0 / .35); }
.pl-logo b { display: block; font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-logo small { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: rgba(255,255,255,.55); }
.pl-logo small i { width: 6px; height: 6px; border-radius: 50%; background: var(--pl-lime); box-shadow: 0 0 0 3px rgb(199 255 0 / .25); }
#pl-pick select { display: block; width: calc(100% - 24px); margin: 4px 12px 0; height: 34px; padding: 0 10px; border-radius: 12px; border: 1px solid rgb(var(--nfe-200)); font-size: 12.5px; background: rgb(var(--nfe-white)); }
.pl-menu { flex: 1; overflow-y: auto; padding: 8px 10px 12px; scrollbar-width: thin; scrollbar-color: rgb(var(--nfe-200)) transparent; }
.pl-menu-sec { display: flex; align-items: center; gap: 8px; padding: 16px 10px 6px; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: rgb(var(--nfe-400)); }
.pl-menu-sec::before { content: ""; width: 12px; height: 3px; border-radius: 3px; background: var(--pl-lime); }
.pl-side-foot { padding: 8px 10px 12px; border-top: 1px solid rgb(var(--nfe-200) / .8); }
.pl-side .pl-link { position: relative; width: 100%; gap: 11px; height: 42px; padding: 0 10px 0 6px; margin: 2px 0; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: rgb(var(--nfe-700)); transition: background-color .25s var(--pl-ease), color .25s var(--pl-ease), transform .25s var(--pl-ease), box-shadow .25s var(--pl-ease); }
.pl-side .pl-link:hover { background: rgb(var(--nfe-100) / .9); color: rgb(var(--nfe-900)); transform: translateX(2px); }
.pl-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgb(var(--nfe-100)); transition: background-color .25s var(--pl-ease), transform .3s var(--pl-ease); }
.pl-side .pl-ic i { width: auto; color: rgb(var(--nfe-600)); font-size: 12.5px; }
.pl-side .pl-ic svg { color: rgb(var(--nfe-600)) !important; }
.pl-side .pl-link:hover .pl-ic { background: rgb(var(--nfe-white)); box-shadow: 0 0 0 1px rgb(var(--nfe-200)); }
.pl-txt { flex: 1; min-width: 0; text-align: left; }
.pl-txt b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-badge { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; background: var(--pl-ink); color: var(--pl-lime); }
.pl-side .pl-link.active { background: var(--pl-ink); color: #fff; box-shadow: 0 10px 22px -12px rgba(0,0,0,.65); transform: none; }
.pl-side .pl-link.active::before { display: none; }
.pl-side .pl-link.active .pl-ic { background: var(--pl-lime); box-shadow: 0 0 16px -2px rgb(199 255 0 / .7); }
.pl-side .pl-link.active .pl-ic i, .pl-side .pl-link.active .pl-ic svg { color: var(--pl-ink) !important; }
.pl-side .pl-link.active .pl-badge { background: var(--pl-lime); color: var(--pl-ink); }
.pl-side .pl-link:focus-visible { outline: none; box-shadow: 0 0 0 3px rgb(199 255 0 / .6); }
.pl-moon { display: none !important; } html[data-theme="dark"] .pl-sun { display: none !important; } html[data-theme="dark"] .pl-moon { display: inline-flex !important; }
html[data-theme="dark"] b.pl-moon { display: block !important; }

.pl-top { position: sticky; top: 14px; z-index: 30; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.pl-burger { display: none !important; }
.pl-sections { position: relative; justify-self: center; display: flex; gap: 2px; padding: 5px; border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.pl-sections::-webkit-scrollbar { display: none; }
.pl-pill { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: var(--pl-ink); box-shadow: 0 8px 18px -8px rgba(0,0,0,.55), inset 0 0 0 1px rgb(199 255 0 / .18); will-change: transform, width; }
.pl-sec-btn { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: rgb(var(--nfe-600)); white-space: nowrap; transition: color .3s var(--pl-ease); }
.pl-sec-btn i { font-size: 12px; opacity: .75; transition: color .3s var(--pl-ease), opacity .3s var(--pl-ease); }
.pl-sec-btn:hover { color: rgb(var(--nfe-900)); }
.pl-sec-btn.active { color: #fff; }
.pl-sec-btn.active i { color: var(--pl-lime); opacity: 1; }
.pl-sec-btn em { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; background: var(--pl-lime); color: var(--pl-ink); }
.pl-sec-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgb(199 255 0 / .6); }
.pl-top-right { display: flex; align-items: center; gap: 8px; }
.pl-round { position: relative; width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: rgb(var(--nfe-700)); }
.pl-round:hover { color: rgb(var(--nfe-900)); transform: translateY(-1px); }
#pl-badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; background: var(--pl-lime); color: var(--pl-ink); box-shadow: 0 0 0 2px rgb(var(--nfe-white)); }
#pl-badge.hidden { display: none; }
.pl-user { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 16px 0 6px; border-radius: 999px; text-align: left; }
.pl-user > i { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12.5px; font-weight: 800; background: var(--pl-ink); color: var(--pl-lime); }
.pl-user span { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; line-height: 1.15; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-user small { font-size: 10.5px; font-weight: 500; color: rgb(var(--nfe-500)); overflow: hidden; text-overflow: ellipsis; }
.pl-user:hover { transform: translateY(-1px); }
.pl-body { padding-top: 20px; max-width: 1320px; }
.pl-main { padding: 0; }
.pl-shade { position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.35); backdrop-filter: blur(2px); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

@media (max-width: 1023px) {
  .pl-frame { padding: 10px 12px 96px; }
  .pl-side { top: 10px; bottom: 10px; left: 10px; width: min(280px, calc(100vw - 40px)); transition: transform .35s var(--pl-ease) !important; }
  #pl-side:not(.open) { transform: translateX(calc(-100% - 20px)); }
  .pl-burger { display: inline-flex !important; }
  .pl-top { top: 8px; grid-template-columns: auto minmax(0, 1fr) auto; }
  .pl-sections { justify-self: stretch; }
  .pl-user span { display: none; } .pl-user { padding: 0 6px; }
}
@media (max-width: 640px) {
  .pl-top { grid-template-columns: auto 1fr auto; }
  .pl-sections { grid-column: 1 / -1; grid-row: 2; }
  .pl-top-left { grid-column: 1; grid-row: 1; } .pl-top-right { grid-column: 3; grid-row: 1; justify-self: end; }
}

/* ---------------- Títulos das telas */
#main-content h1.text-2xl { font-size: 28px; font-weight: 800; letter-spacing: -.035em; }
#main-content h1.text-2xl::before { content: ""; display: block; width: 34px; height: 4px; margin-bottom: 10px; border-radius: 4px; background: var(--pl-lime); box-shadow: 0 0 14px rgb(199 255 0 / .6); }
html[data-nfe-page="portal"] .tab-active { border-bottom: 3px solid var(--pl-lime); font-weight: 700; color: rgb(var(--nfe-900)); }
html[data-nfe-page="portal"] .tab-inactive { border-bottom-width: 3px; }

/* ---------------- Início: faixa de boas-vindas */
.pl-hero { position: relative; isolation: isolate; overflow: hidden; margin-bottom: 20px; padding: 30px 30px 32px; border-radius: 22px; color: #fff; background:
  radial-gradient(560px 300px at 100% 130%, rgb(199 255 0 / .28), transparent 70%),
  radial-gradient(420px 200px at -10% -40%, rgba(255,255,255,.08), transparent 70%),
  linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 32px 32px,
  linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 32px 32px,
  var(--pl-ink); box-shadow: 0 24px 48px -28px rgba(0,0,0,.55); }
.pl-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgb(199 255 0 / .08) 45%, transparent 60%); background-size: 250% 100%; animation: plSheen 7s ease-in-out infinite; }
@keyframes plSheen { 0% { background-position: 120% 0; } 60%, 100% { background-position: -120% 0; } }
.pl-hero-mark { position: absolute; z-index: -1; right: -40px; top: -36px; width: 340px; overflow: visible; pointer-events: none; animation: plFloat 12s cubic-bezier(.45, 0, .55, 1) infinite; will-change: transform; }
@keyframes plFloat { 0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); } 33% { transform: translate3d(-6px, 9px, 0) rotate(-1.2deg); } 66% { transform: translate3d(5px, 4px, 0) rotate(.8deg); } }
.pl-n-base { fill: rgb(199 255 0 / .035); stroke: var(--pl-lime); stroke-width: 1.1; stroke-opacity: .42; stroke-dasharray: 1; stroke-dashoffset: 1; animation: plDraw 2.6s cubic-bezier(.65, 0, .35, 1) .15s forwards, plBreath 6s ease-in-out 2.8s infinite; filter: drop-shadow(0 0 14px rgb(199 255 0 / .25)); }
.pl-n-run { fill: none; stroke: var(--pl-lime); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: .07 .93; stroke-dashoffset: 1; opacity: 0; filter: drop-shadow(0 0 6px var(--pl-lime)) drop-shadow(0 0 16px rgb(199 255 0 / .7)); animation: plRun 7s linear 2.4s infinite, plShow .8s ease 2.4s forwards; }
@keyframes plDraw { to { stroke-dashoffset: 0; } }
@keyframes plBreath { 0%, 100% { stroke-opacity: .42; } 50% { stroke-opacity: .7; } }
@keyframes plRun { to { stroke-dashoffset: 0; } }
@keyframes plShow { to { opacity: .95; } }
.pl-hero-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid rgb(199 255 0 / .4); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--pl-lime); }
.pl-hero-kicker svg rect { fill: var(--pl-lime); } .pl-hero-kicker svg path { fill: var(--pl-ink); }
.pl-hero h1 { margin-top: 16px; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.02; font-weight: 800; letter-spacing: -.045em; color: #fff; }
.pl-hero h1 span { color: var(--pl-lime); }
.pl-hero-sub { margin-top: 10px; max-width: 52ch; font-size: 14.5px; color: rgba(255,255,255,.66); }
.pl-hero-sub b { color: #fff; font-weight: 600; }

/* Atalhos e números */
#main-content .pl-quick { position: relative; overflow: hidden; gap: 12px; padding: 16px; border-radius: 16px; font-size: 13.5px; }
#main-content .pl-quick i { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--pl-ink); color: var(--pl-lime); font-size: 15px; transition: transform .25s var(--pl-ease), background-color .2s var(--pl-ease), color .2s var(--pl-ease); }
#main-content .pl-quick i.text-red-600 { color: #ff6b6b; }
#main-content .pl-quick:hover i { background: var(--pl-lime); color: var(--pl-ink); transform: rotate(-6deg) scale(1.06); }
#main-content .pl-quick::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgb(199 255 0 / .28), transparent 70%); opacity: 0; transition: opacity .3s var(--pl-ease); }
#main-content .pl-quick:hover::after { opacity: 1; }
#main-content .pl-kpi { position: relative; overflow: hidden; border-radius: 16px; padding: 18px; }
#main-content .pl-kpi::before { content: ""; position: absolute; left: 18px; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--pl-lime); transition: width .35s var(--pl-ease); }
#main-content .pl-kpi:hover::before { width: 64px; }
#main-content .pl-kpi .text-2xl { font-size: 28px; font-weight: 800; letter-spacing: -.03em; }

/* Cartões e botões do portal */
#main-content .bg-white.border.rounded-xl { border-radius: 16px; }
#main-content button.bg-nfe-900, #main-content a.bg-nfe-900 { border-radius: 11px; }
#main-content .nfe-lime { border-radius: 11px; }

/* Entrada em cascata dos blocos da tela */
#main-content > .fade-in > * { animation: plRise .55s var(--pl-ease) both; }
#main-content > .fade-in > *:nth-child(2) { animation-delay: .06s; }
#main-content > .fade-in > *:nth-child(3) { animation-delay: .12s; }
#main-content > .fade-in > *:nth-child(4) { animation-delay: .18s; }
#main-content > .fade-in > *:nth-child(5) { animation-delay: .24s; }
#main-content > .fade-in > *:nth-child(n+6) { animation-delay: .3s; }
@keyframes plRise { from { opacity: 0; transform: translateY(14px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }

/* ---------------- Entrada (login) */
.pl-brand-side { position: relative; isolation: isolate; overflow: hidden; background:
  radial-gradient(640px 420px at 100% 110%, rgb(199 255 0 / .22), transparent 70%),
  linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 36px 36px,
  linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 36px 36px,
  #050505 !important; }
.pl-login-mark { position: absolute; z-index: -1; right: -90px; bottom: -110px; width: 520px; overflow: visible; pointer-events: none; animation: plFloat 14s cubic-bezier(.45, 0, .55, 1) infinite; will-change: transform; }
.pl-brand-side h2 { letter-spacing: -.035em; }
.pl-login-card { border-radius: 22px !important; box-shadow: 0 30px 60px -30px rgba(0,0,0,.35), 0 0 0 1px rgb(var(--nfe-200)) !important; animation: plRise .6s var(--pl-ease) both; }

@media (max-width: 1023px) { .pl-hero { padding: 24px 20px 26px; border-radius: 18px; } .pl-hero-mark { width: 240px; right: -70px; top: -20px; opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .pl-n-base { animation: none !important; stroke-dashoffset: 0; }
  .pl-hero::after, .pl-hero-mark, .pl-login-mark, .pl-n-run, #main-content > .fade-in > *, .pl-login-card { animation: none !important; }
}
.pl-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pl-hero-chips span { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #fff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pl-hero-chips i { color: #C7FF00; font-size: 11px; }
.pl-hero-chips span.is-warn { border-color: rgba(255,107,107,.5); } .pl-hero-chips span.is-warn i { color: #ff6b6b; }
/* Tema escuro: a pílula e o item ativos viram brancos, como na referência */
html[data-theme="dark"] .pl-pill { background: #f4f4f0; box-shadow: 0 8px 22px -8px rgba(0,0,0,.8), 0 0 0 1px rgb(199 255 0 / .25); }
html[data-theme="dark"] .pl-sec-btn.active, html[data-theme="dark"] .pl-sec-btn.active i { color: #050505; }
html[data-theme="dark"] .pl-side .pl-link.active { background: #f4f4f0; color: #050505; }
html[data-theme="dark"] .pl-side .pl-logo { background: #000; box-shadow: 0 0 0 1px rgb(199 255 0 / .2); }
