/* Emissor Plus — componentes adaptados do uiverse.io (MIT) aos tokens --nd-* do Nightdesk. Um elemento por tipo; créditos em docs/ui-creditos.md.
   Botão: adamgiebl/rude-bear-14 · Checkbox: adamgiebl/curly-lizard-40 · Switch: alexruix/splendid-liger-23 · Loader: barisdogansutcu/light-rat-32
   Hambúrguer: Creatlydev/pretty-gecko-71 · Busca: alexruix/plastic-shrimp-54 · Nav lateral: Javierrocadev/fast-panther-65
   Abas segmentadas: Yaya12085/rude-mouse-79 · Cartão c/ ícone redondo: Yaya12085/terrible-otter-19 · Alertas: kennyotsu/short-ape-5 · Linha do tempo: PriyanshuGupta28/orange-newt-23 */

:root {
  --ep-accent: #4f6bed; --ep-accent-deep: #3b52c4; --ep-accent-soft: rgba(79, 107, 237, 0.12); --ep-accent-ring: rgba(79, 107, 237, 0.28);
  --ep-grad: linear-gradient(135deg, #5b7cfa 0%, #4f6bed 55%, #3b52c4 100%);
  --ep-ok: #16a34a; --ep-ok-soft: rgba(34, 197, 94, 0.13); --ep-warn: #d97706; --ep-warn-soft: rgba(245, 158, 11, 0.14); --ep-bad: #dc2626; --ep-bad-soft: rgba(239, 68, 68, 0.12);
  --ep-rail-w: 76px;
}
:root[data-theme="dark"] { --ep-accent: #7c8cff; --ep-accent-deep: #5b6cf0; --ep-accent-soft: rgba(124, 140, 255, 0.16); --ep-accent-ring: rgba(124, 140, 255, 0.35); --ep-grad: linear-gradient(135deg, #8a98ff 0%, #6b7dff 55%, #4f5fe0 100%); --ep-ok: #4ade80; --ep-warn: #fbbf24; --ep-bad: #f87171; }

/* ---------- Espaçamento das páginas (filhos de #conteudo empilham com respiro) ---------- */
.nd-main > #conteudo { display: flex; flex-direction: column; gap: var(--nd-space-5); min-width: 0; }
.nd-main > #conteudo > .nd-page-title { margin: 0; }

/* ---------- Botões (rude-bear: preenchimento deslizante no hover) ---------- */
.nd-btn { position: relative; overflow: hidden; isolation: isolate; box-shadow: inset 0 0 0 0 var(--ep-accent-soft); transition: color var(--nd-dur) var(--nd-ease), border-color var(--nd-dur) var(--nd-ease), box-shadow .35s ease-out, transform .15s ease, background var(--nd-dur) var(--nd-ease); }
.nd-btn:hover { box-shadow: inset 0 -60px 0 0 var(--ep-accent-soft); border-color: var(--ep-accent-ring); }
.nd-btn:active { transform: scale(0.97); }
.nd-btn--primary { background: var(--ep-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -8px var(--ep-accent-ring), inset 0 1px 0 rgba(255,255,255,.18); }
.nd-btn--primary:hover { background: var(--ep-grad); border-color: transparent; color: #fff; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 22px -10px var(--ep-accent-ring), inset 0 1px 0 rgba(255,255,255,.18); }
.nd-btn--primary:active { transform: scale(0.97); filter: brightness(.98); }
.nd-btn--primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%); transform: translateX(-120%); transition: transform .6s ease; pointer-events: none; }
.nd-btn--primary:hover::after { transform: translateX(120%); }
:root[data-theme="light"] .nd-btn--primary:hover { background: var(--ep-grad); border-color: transparent; }
.nd-btn--ghost:hover { box-shadow: none; background: var(--nd-raised); }
.nd-btn:focus-visible, .nd-input:focus-visible, .nd-select:focus-visible, .nd-check:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ep-accent-ring); }

/* ---------- Inputs (plastic-shrimp: brilho suave ao focar) ---------- */
.nd-input, .nd-select, .nd-search { transition: border-color var(--nd-dur) var(--nd-ease), box-shadow .25s ease, background var(--nd-dur) var(--nd-ease); }
.nd-input:focus, .nd-select:focus, .nd-search:focus-within { border-color: var(--ep-accent) !important; box-shadow: 0 0 0 3px var(--ep-accent-ring), 0 0 14px -4px var(--ep-accent-ring) !important; }
.nd-search > svg { transition: color var(--nd-dur) var(--nd-ease); }
.nd-search:focus-within > svg { color: var(--ep-accent); }

/* ---------- Checkbox (curly-lizard: quadrado interno que cresce) ---------- */
.nd-check { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 2px solid var(--nd-hairline-strong); border-radius: 5px; background: transparent; position: relative; cursor: pointer; flex: none; display: inline-block; vertical-align: middle; transition: border-color .2s ease, background .2s ease; }
.nd-check::before { content: ""; position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; border-radius: 2px; background: var(--ep-accent); transform: translate(-50%, -50%) scale(0); transition: transform .25s cubic-bezier(.2, .8, .2, 1.2); }
.nd-check:hover { border-color: var(--ep-accent); }
.nd-check:checked { border-color: var(--ep-accent); background: var(--ep-accent-soft); }
.nd-check:checked::before { transform: translate(-50%, -50%) scale(1); }
.nd-check::after { display: none !important; }
.nd-check:indeterminate { background: var(--ep-accent-soft); border-color: var(--ep-accent); }
.nd-check:indeterminate::before { transform: translate(-50%, -50%) scale(1); height: 3px; }
.nd-table .nd-cell-check .nd-check { width: 16px; height: 16px; }

/* ---------- Switch (splendid-liger: bolinha vira lua) ---------- */
.ep-switch { font-size: 12px; position: relative; display: inline-block; width: 3.5em; height: 2em; flex: none; }
.ep-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.ep-switch .ep-slider { --bg: #cbd3e1; position: absolute; cursor: pointer; inset: 0; background: var(--bg); transition: .4s; border-radius: 30px; }
.ep-switch .ep-slider::before { content: ""; position: absolute; height: 1.4em; width: 1.4em; border-radius: 50%; left: 10%; bottom: 15%; box-shadow: inset 8px -4px 0 0 #f6c343; background: var(--bg); transition: .4s; }
.ep-switch input:checked + .ep-slider { --bg: #28096b; }
.ep-switch input:checked + .ep-slider::before { transform: translateX(100%); box-shadow: inset 15px -4px 0 15px #fff000; }
.ep-switch input:focus-visible + .ep-slider { box-shadow: 0 0 0 3px var(--ep-accent-ring); }

/* ---------- Loader (light-rat: anel SVG) ---------- */
.ep-loader { width: 1.4em; height: 1.4em; transform-origin: center; animation: ep-rot 2s linear infinite; flex: none; }
.ep-loader circle { fill: none; stroke: var(--ep-accent); stroke-width: 4; stroke-dasharray: 1, 200; stroke-dashoffset: 0; stroke-linecap: round; animation: ep-dash 1.5s ease-in-out infinite; }
.nd-btn .ep-loader circle { stroke: currentColor; }
@keyframes ep-rot { 100% { transform: rotate(360deg); } }
@keyframes ep-dash { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 200; stroke-dashoffset: -35px; } 100% { stroke-dashoffset: -125px; } }

/* ---------- Hambúrguer animado (pretty-gecko) ---------- */
.ep-burger { --gap: 5px; --h: 2.5px; --py1: 0; --py3: 0; --sx: 1; --r1: 0; --r3: 0; width: 22px; display: flex; flex-direction: column; gap: var(--gap); cursor: pointer; position: relative; padding: 11px 0; }
.ep-burger .bar { position: relative; height: var(--h); width: 100%; border-radius: .5rem; background: var(--nd-ink); }
.ep-burger .bar--1 { top: var(--py1); transform: rotate(var(--r1)); transition: top 200ms 100ms, transform 100ms; }
.ep-burger .bar--2 { transform: scaleX(var(--sx)); transition: transform 150ms 100ms; }
.ep-burger .bar--3 { bottom: var(--py3); transform: rotate(var(--r3)); transition: bottom 200ms 100ms, transform 100ms; }
.ep-burger.is-open .bar--1 { transition: top 200ms, transform 200ms 100ms; }
.ep-burger.is-open .bar--3 { transition: bottom 200ms, transform 200ms 100ms; }
.ep-burger.is-open { --py1: calc(var(--gap) + var(--h)); --py3: calc(var(--gap) + var(--h)); --sx: 0; --r1: 45deg; --r3: -45deg; }

/* ---------- Menu lateral: cabeçalho fixo, navegação rolável, rodapé sempre visível ---------- */
.ep-stage .nd-sidebar { display: flex; flex-direction: column; gap: var(--nd-space-3); padding: var(--nd-space-4); height: 100vh; height: 100dvh; overflow: hidden; background: linear-gradient(180deg, var(--nd-panel) 0%, var(--nd-shell) 100%); transition: width .25s var(--nd-ease), padding .25s var(--nd-ease); }
.ep-sidebar-nav { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: var(--nd-space-3); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--nd-hairline-strong) transparent; margin: 0 -6px; padding: 2px 6px; }
.ep-sidebar-foot { flex: none; }
.nd-brand { display: flex; align-items: center; gap: 10px; min-height: 36px; padding-bottom: 10px; }
.nd-brand .nd-tile { background: var(--ep-grad); color: #fff; border: 0; font-weight: 700; letter-spacing: -.02em; box-shadow: 0 6px 14px -8px var(--ep-accent-ring); }
.ep-brand-txt { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.ep-rail-btn { margin-left: auto; }
.nd-switcher { border: 1px solid var(--nd-hairline); background: var(--nd-raised); border-radius: var(--nd-radius-lg); padding: 6px 8px; transition: border-color .2s, box-shadow .2s, transform .15s; }
.nd-switcher:hover { border-color: var(--ep-accent-ring); box-shadow: 0 8px 18px -12px var(--ep-accent-ring); transform: translateY(-1px); }
.nd-switcher .nd-tile { background: var(--ep-accent-soft); color: var(--ep-accent); border: 0; font-weight: 700; }
.nd-sidebar .nd-nav-group { gap: 1px; }
.nd-sidebar .nd-nav-heading { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px 4px; margin: 0; border: 0; color: var(--nd-ink-faint); }
.nd-sidebar .nd-nav-item { position: relative; height: 34px; border-radius: var(--nd-radius-md); padding-left: 12px; transition: color .15s, background .2s, transform .15s; }
.nd-nav-item::before { content: ""; position: absolute; left: 0; top: 20%; height: 60%; width: 3px; border-radius: 3px; background: var(--ep-accent); transform: scaleY(0); transition: transform .2s var(--nd-ease); }
.nd-nav-item:hover { transform: translateX(2px); background: var(--nd-raised); }
.nd-nav-item:hover::before { transform: scaleY(.6); }
.nd-nav-item.is-active { background: var(--ep-accent-soft); color: var(--nd-ink); font-weight: 500; border: 0; }
.nd-nav-item.is-active::before { transform: scaleY(1); }
.nd-nav-item.is-active svg { color: var(--ep-accent); }
.nd-count { background: var(--ep-accent-soft); color: var(--ep-accent); font-weight: 600; }
.ep-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--nd-radius-lg); border: 1px solid var(--nd-hairline); background: var(--nd-raised); transition: border-color .2s, box-shadow .2s; }
.ep-user:hover { border-color: var(--ep-accent-ring); box-shadow: 0 8px 18px -12px var(--ep-accent-ring); }
.ep-user .nd-tile { width: 28px; height: 28px; border-radius: 50%; background: var(--ep-grad); color: #fff; border: 0; font-weight: 700; font-size: 12px; }
.ep-user-meta { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.ep-user-meta strong { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-user-meta small { color: var(--nd-ink-muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-theme-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 8px; font-size: 12.5px; color: var(--nd-ink-muted); cursor: pointer; }
.ep-theme-row > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.ep-theme-row svg { width: 14px; height: 14px; }
.ep-sidebar-foot .nd-btn--block { height: 34px; }

/* Dica flutuante (criada pelo app.js no modo trilho) */
.ep-tip { position: fixed; z-index: 100; transform: translateY(-50%); background: var(--nd-ink); color: var(--nd-ink-inverse); padding: 5px 9px; border-radius: 6px; font-size: 12px; white-space: nowrap; pointer-events: none; box-shadow: 0 8px 20px -10px rgba(0,0,0,.5); animation: ep-tip .15s ease-out; }
@keyframes ep-tip { from { opacity: 0; transform: translate(-4px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }

/* Modo trilho (desktop): só ícones */
@media (min-width: 861px) {
  .nd-shell.is-rail { grid-template-columns: var(--ep-rail-w) 1fr; }
  .is-rail .nd-sidebar { padding: var(--nd-space-4) 12px; align-items: center; }
  .is-rail .ep-brand-txt, .is-rail .nd-nav-heading, .is-rail .ep-user-meta, .is-rail .ep-theme-row > span:first-child, .is-rail .nd-switcher__meta, .is-rail .nd-switcher > svg, .is-rail .nd-nav-item__end, .is-rail .ep-txt { display: none !important; }
  .is-rail .nd-brand { justify-content: center; flex-direction: column; gap: 8px; }
  .is-rail .ep-rail-btn { margin-left: 0; }
  .is-rail .nd-switcher { width: 48px; justify-content: center; padding: 6px; }
  .is-rail .ep-sidebar-nav { width: 100%; margin: 0; padding: 2px 0; align-items: center; }
  .is-rail .nd-nav-group { width: 100%; gap: 4px; align-items: center; }
  .is-rail .nd-sidebar .nd-nav-item { justify-content: center; padding: 0; width: 48px; height: 40px; margin: 0; }
  .is-rail .nd-nav-item::before { left: -12px; }
  .is-rail .ep-sidebar-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
  .is-rail .ep-user { justify-content: center; padding: 6px; border: 0; background: transparent; }
  .is-rail .ep-theme-row { justify-content: center; padding: 0; }
  .is-rail .ep-sidebar-foot form { width: 48px; }
  .is-rail .ep-sidebar-foot .nd-btn { width: 48px; padding: 0; }
}
@media (max-width: 860px) { .ep-rail-btn { display: none; } }

/* ---------- Cartões de indicador (terrible-otter: ícone em círculo) ---------- */
.ep-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--nd-space-4); }
.ep-stat { --ep-stat-accent: var(--ep-accent); --ep-stat-soft: var(--ep-accent-soft); --ep-stat-line: var(--ep-grad); position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 148px; padding: 18px 18px 14px; border-radius: var(--nd-radius-lg); background: var(--nd-panel); border: 1px solid var(--nd-hairline); overflow: hidden; transition: transform .25s var(--nd-ease), box-shadow .25s var(--nd-ease), border-color .25s; }
.ep-stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--ep-stat-line); }
.ep-stat:hover { transform: translateY(-3px); border-color: var(--ep-accent-ring); box-shadow: 0 18px 30px -18px rgba(0,0,0,.35); }
.ep-stat--ok { --ep-stat-accent: var(--ep-ok); --ep-stat-soft: var(--ep-ok-soft); --ep-stat-line: linear-gradient(90deg, #4ade80, #16a34a); }
.ep-stat--warn { --ep-stat-accent: var(--ep-warn); --ep-stat-soft: var(--ep-warn-soft); --ep-stat-line: linear-gradient(90deg, #fbbf24, #d97706); }
.ep-stat--bad { --ep-stat-accent: var(--ep-bad); --ep-stat-soft: var(--ep-bad-soft); --ep-stat-line: linear-gradient(90deg, #f87171, #dc2626); }
.ep-stat__head { display: flex; align-items: center; gap: 10px; }
.ep-stat__icon { flex: none; width: 36px; height: 36px; border-radius: 9999px; display: grid; place-items: center; background: var(--ep-stat-soft); color: var(--ep-stat-accent); transition: transform .3s var(--nd-ease); }
.ep-stat:hover .ep-stat__icon { transform: scale(1.08) rotate(-6deg); }
.ep-stat__icon svg { width: 18px; height: 18px; }
.ep-stat__label { font-size: 13px; font-weight: 500; color: var(--nd-ink-muted); }
.ep-stat__value { font-family: var(--nd-font-mono); font-size: 30px; line-height: 1.1; letter-spacing: -.02em; font-weight: 500; color: var(--nd-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-stat__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 12.5px; color: var(--nd-ink-muted); flex-wrap: wrap; }
.ep-stat__link { color: var(--ep-accent); font-weight: 500; font-size: 12.5px; border-bottom: 1px solid transparent; transition: border-color .15s; }
.ep-stat__link:hover { border-bottom-color: var(--ep-accent); }
@media (max-width: 1180px) { .ep-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ep-stats { grid-template-columns: 1fr; } .ep-stat { min-height: 0; } }
.nd-kpi__figure { font-family: var(--nd-font-mono); color: var(--nd-ink); }

/* ---------- Abas segmentadas (rude-mouse) ---------- */
.nd-tabs { display: flex; flex-wrap: wrap; gap: 2px; width: fit-content; max-width: 100%; padding: 4px; border-radius: 10px; background: var(--nd-raised); box-shadow: 0 0 0 1px var(--nd-hairline); border-bottom: 0; }
.nd-tabs .nd-tab { height: 32px; padding: 0 14px; margin: 0; border: 0; border-radius: 8px; background: transparent; color: var(--nd-ink-muted); font-weight: 500; font-size: var(--nd-text-base); box-shadow: none; transition: all .15s ease-in-out; }
.nd-tabs .nd-tab:hover { color: var(--nd-ink); box-shadow: none; transform: none; }
.nd-tabs .nd-tab[aria-selected="true"] { background: var(--nd-panel); color: var(--ep-accent); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.14), 0 0 0 1px var(--nd-hairline); }
@media (max-width: 860px) { .nd-tabs { flex-wrap: nowrap; width: 100%; } }

/* ---------- Alertas / toasts (short-ape) ---------- */
.ep-toast { border: 0; border-left: 4px solid var(--ep-accent); background: var(--ep-accent-soft); border-radius: 10px; padding: 12px 14px; animation: ep-toast-in .35s cubic-bezier(.2,.8,.2,1); }
.ep-toast--ok { border-left-color: var(--ep-ok); background: var(--ep-ok-soft); } .ep-toast--ok svg { color: var(--ep-ok); }
.ep-toast--erro { border-left-color: var(--ep-bad); background: var(--ep-bad-soft); } .ep-toast--erro svg { color: var(--ep-bad); }
@keyframes ep-toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Linha do tempo da NF-e (orange-newt, horizontal) ---------- */
.ep-steps { display: flex; align-items: flex-start; padding: 6px 0 10px; overflow-x: auto; scrollbar-width: none; }
.ep-step { position: relative; flex: 1 1 0; min-width: 88px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; font-size: 12.5px; color: var(--nd-ink-muted); }
.ep-step::before { content: ""; position: absolute; top: 19px; left: 50%; width: 100%; height: 2px; background: var(--nd-hairline-strong); z-index: 0; }
.ep-step:last-child::before { display: none; }
.ep-step__circle { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--nd-panel); border: 2px solid var(--nd-hairline-strong); color: var(--nd-ink-faint); transition: background .3s, border-color .3s, color .3s, box-shadow .3s; }
.ep-step__circle svg { width: 16px; height: 16px; }
.ep-step--done .ep-step__circle { background: var(--ep-accent); border-color: var(--ep-accent); color: #fff; }
.ep-step--done::before { background: var(--ep-accent); }
.ep-step--done { color: var(--nd-ink); }
.ep-step--active { color: var(--nd-ink); font-weight: 600; }
.ep-step--active .ep-step__circle { border-color: var(--ep-accent); color: var(--ep-accent); background: var(--ep-accent-soft); animation: ep-pulse 1.8s ease-out infinite; }
.ep-step--bad { color: var(--ep-bad); font-weight: 600; }
.ep-step--bad .ep-step__circle { background: var(--ep-bad); border-color: var(--ep-bad); color: #fff; }
@keyframes ep-pulse { 0% { box-shadow: 0 0 0 0 var(--ep-accent-ring); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Painéis, tabelas ---------- */
.nd-panel { transition: box-shadow .2s ease; }
.nd-grid > .nd-panel:hover { box-shadow: 0 14px 30px -20px rgba(0,0,0,.35); }
.nd-table tbody tr { transition: background .15s; }

/* Cabeçalho de painel no celular: ações quebram linha e ocupam a largura */
@media (max-width: 640px) {
  .nd-panel__head { flex-wrap: wrap; }
  .nd-panel__head > .nd-title { flex: 1 1 auto; min-width: 0; }
  .nd-panel__actions { margin-left: 0; flex-wrap: wrap; width: 100%; }
  .nd-panel__actions > .nd-btn, .nd-panel__actions > form { flex: 1 1 auto; }
  .nd-panel__actions > form > .nd-btn { width: 100%; }
}

/* ---------- Ajustes: itens fixos do menu não encolhem; rodapé em uma linha; alturas baixas ---------- */
.ep-stage .nd-sidebar > *:not(.ep-sidebar-nav) { flex: none; }
.ep-user-row { display: flex; align-items: center; gap: 8px; }
.ep-user-row .ep-user { flex: 1 1 auto; min-width: 0; }
.ep-user-row .ep-switch { font-size: 11px; }
.ep-user-row form { flex: none; display: flex; }
.ep-logout { width: 34px; height: 34px; }
.ep-logout:hover { color: var(--ep-bad); background: var(--ep-bad-soft); }
.ep-btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ep-btn-row form { display: inline-flex; }
@media (min-width: 861px) {
  .is-rail .ep-user-row { flex-direction: column; gap: 10px; }
  .is-rail .ep-user-row .ep-user { flex: none; }
  .is-rail .ep-sidebar-foot form { width: auto; }
}
@media (max-height: 760px) {
  .ep-stage .nd-sidebar { gap: 8px; }
  .nd-brand { padding-bottom: 6px; min-height: 32px; }
  .nd-switcher { padding: 4px 8px; }
  .nd-sidebar .nd-nav-item { height: 30px; }
  .nd-sidebar .nd-nav-heading { padding: 4px 10px 2px; font-size: 10px; }
  .ep-sidebar-nav { gap: 6px; }
  .is-rail .nd-sidebar .nd-nav-item { height: 34px; }
}

/* ---------- Cartão de empresa (Yaya12085/splendid-firefox-37: moldura branca + painel interno azulado + etiqueta no canto) ---------- */
.ep-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--nd-space-4); }
.ep-card { display: block; padding: 8px; border: 1px solid var(--nd-hairline); border-radius: 16px; background: var(--nd-panel); color: inherit; font: inherit; text-align: left; cursor: pointer; box-shadow: 0 30px 30px -25px var(--ep-accent-ring); transition: transform .25s var(--nd-ease), box-shadow .25s var(--nd-ease), border-color .2s; }
.ep-card:hover { transform: translateY(-4px); border-color: var(--ep-accent-ring); box-shadow: 0 34px 34px -24px var(--ep-accent-ring); background: var(--nd-panel); }
.ep-card__inner { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px 16px 14px; border-radius: 11px; background: var(--ep-accent-soft); overflow: hidden; min-height: 150px; }
:root[data-theme="light"] .ep-card__inner { background: #ecf0ff; }
.ep-card__tag { position: absolute; top: 0; right: 0; padding: 5px 12px 5px 14px; border-radius: 99em 0 0 99em; background: var(--ep-warn-soft); color: var(--ep-warn); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.ep-card__tag--prod { background: var(--ep-ok-soft); color: var(--ep-ok); }
:root[data-theme="light"] .ep-card__tag { background: #fde8c4; } :root[data-theme="light"] .ep-card__tag--prod { background: #c9f1d8; }
.ep-card__head { display: flex; align-items: center; gap: 10px; padding-right: 96px; }
.ep-card__head .nd-tile { width: 38px; height: 38px; font-size: 14px; background: var(--ep-grad); color: #fff; border: 0; font-weight: 700; flex: none; }
.ep-card__head strong { font-weight: 600; }
.ep-card__meta { display: inline-flex; align-items: center; gap: 6px; color: var(--nd-ink-muted); font-size: 12.5px; }
.ep-card__meta svg { width: 14px; height: 14px; }
.ep-card__go { margin-top: auto; display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 8px; background: var(--ep-accent); color: #fff; font-weight: 500; font-size: 13px; transition: background .2s, gap .2s; }
.ep-card__go svg { width: 16px; height: 16px; transition: transform .2s; }
.ep-card:hover .ep-card__go { background: var(--ep-accent-deep); }
.ep-card:hover .ep-card__go svg { transform: translateX(3px); }
.ep-card--new { box-shadow: none; border-style: dashed; }
.ep-card--new .ep-card__inner { align-items: center; justify-content: center; flex-direction: row; gap: 8px; background: transparent; color: var(--nd-ink-muted); font-weight: 500; }
.ep-card--new:hover .ep-card__inner { color: var(--ep-accent); }

/* ---------- Cartão de destaque (gharsh11032000/fuzzy-robin-67: camadas atrás que giram no hover) ---------- */
.ep-cta { position: relative; display: flex; border-radius: 20px; transition: transform .48s cubic-bezier(.23, 1, .32, 1); }
.ep-cta__content { position: relative; display: flex; flex-direction: column; gap: 16px; width: 100%; padding: 22px; border-radius: 18px; color: #fff; background: var(--ep-grad); box-shadow: 0 16px 30px -18px var(--ep-accent-ring); transition: all .48s cubic-bezier(.23, 1, .32, 1); }
.ep-cta__content::before, .ep-cta__content::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); transform-origin: bottom; border-radius: inherit; transition: all .48s cubic-bezier(.23, 1, .32, 1); }
.ep-cta__content::before { top: -4%; width: 90%; height: 90%; background: #ced8ff; z-index: -1; }
.ep-cta__content::after { top: -8%; width: 80%; height: 80%; background: #e7ecff; z-index: -2; }
:root[data-theme="dark"] .ep-cta__content::before { background: rgba(124, 140, 255, .35); } :root[data-theme="dark"] .ep-cta__content::after { background: rgba(124, 140, 255, .18); }
.ep-cta:hover { transform: translateY(-8px); }
.ep-cta:hover .ep-cta__content::before { rotate: -6deg; top: 0; width: 100%; height: 100%; }
.ep-cta:hover .ep-cta__content::after { rotate: 6deg; top: 0; width: 100%; height: 100%; }
.ep-cta__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.18); }
.ep-cta__icon svg { width: 22px; height: 22px; }
.ep-cta__title { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: #fff; }
.ep-cta__text { margin: 4px 0 0; font-size: 13px; opacity: .9; line-height: 1.45; }
.ep-cta__actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.ep-cta__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.35); color: #fff; font-weight: 500; font-size: 13.5px; transition: background .2s, transform .15s; }
.ep-cta__btn svg { width: 16px; height: 16px; }
.ep-cta__btn:hover { background: rgba(255,255,255,.14); }
.ep-cta__btn--solid { background: #fff; color: var(--ep-accent-deep); border-color: #fff; box-shadow: 0 6px 14px -8px rgba(0,0,0,.4); }
.ep-cta__btn--solid:hover { background: #f3f5ff; transform: translateY(-1px); }

/* Linha do tempo compacta no celular: as 5 etapas cabem sem rolar */
@media (max-width: 560px) {
  .ep-steps { padding: 4px 0 6px; }
  .ep-step { min-width: 0; gap: 6px; font-size: 10.5px; }
  .ep-step__circle { width: 30px; height: 30px; }
  .ep-step__circle svg { width: 13px; height: 13px; }
  .ep-step::before { top: 14px; }
}

/* ===== Painel v2 (uiverse: thin-lionfish-5 pontos pulsando · tiny-emu-37 indicador c/ barra · short-swan-83 bateria · silly-moth-73 gráfico · nasty-firefox-13 alerta) ===== */
.ep-hero { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; padding: 18px 20px; border-radius: 16px; background: var(--nd-panel); border: 1px solid var(--nd-hairline); overflow: hidden; }
.ep-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 160px at 0% 0%, var(--ep-accent-soft), transparent 70%); pointer-events: none; }
.ep-hero__txt { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 260px; }
.ep-hero__txt h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.ep-hero__txt p { margin: 0; color: var(--nd-ink-muted); font-size: 13px; }
.ep-hero__right { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ep-live-form { display: inline-flex; }
.ep-live { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px 0 10px; border-radius: 99px; background: var(--nd-raised); border: 1px solid var(--nd-hairline); font: inherit; font-size: 13px; color: var(--nd-ink); cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.ep-live:hover { border-color: var(--ep-accent-ring); box-shadow: 0 0 0 3px var(--ep-accent-ring); }
.ep-live small { color: var(--nd-ink-muted); }
.ep-live__dots { display: flex; align-items: center; gap: 5px; }
.ep-live__dots i { display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--ep-ok); animation: ep-live-pulse 1.5s infinite ease-in-out; }
.ep-live__dots i:nth-child(1) { animation-delay: -.3s; } .ep-live__dots i:nth-child(2) { animation-delay: -.1s; } .ep-live__dots i:nth-child(3) { animation-delay: .1s; }
.ep-live--off .ep-live__dots i { background: var(--ep-bad); animation: none; opacity: .75; }
.ep-live--none .ep-live__dots i { background: var(--nd-ink-faint); animation: none; }
@keyframes ep-live-pulse { 0%,100% { transform: scale(.8); box-shadow: 0 0 0 0 var(--ep-ok-soft); } 50% { transform: scale(1.2); box-shadow: 0 0 0 6px transparent; } }

.ep-stat__row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ep-stat__row .ep-stat__value { flex: 1 1 auto; min-width: 0; }
.ep-delta { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--ep-ok-soft); color: var(--ep-ok); white-space: nowrap; }
.ep-delta svg { width: 12px; height: 12px; }
.ep-delta--down { background: var(--ep-bad-soft); color: var(--ep-bad); }
.ep-delta--flat { background: var(--nd-raised); color: var(--nd-ink-muted); }
.ep-range { position: relative; width: 100%; height: 6px; border-radius: 4px; background: var(--nd-raised); overflow: hidden; }
.ep-range i { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: 4px; background: var(--ep-stat-accent); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.ep-range--grad i { background: var(--ep-grad); }
.ep-sub { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--nd-ink-muted); flex-wrap: wrap; }
.ep-batt { position: relative; display: inline-block; width: 46px; height: 20px; border: 2px solid var(--nd-ink-muted); border-radius: 4px; color: var(--ep-stat-accent); flex: none; }
.ep-batt::before { content: ""; position: absolute; right: -5px; top: 4px; width: 3px; height: 8px; border-radius: 2px; background: var(--nd-ink-muted); }
.ep-batt::after { content: ""; position: absolute; left: 2px; top: 2px; bottom: 2px; width: var(--w, 50%); border-radius: 2px; background: currentColor; transition: width .8s ease; }

.ep-kpi-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ep-kpi-line b { font-family: var(--nd-font-mono); font-size: 28px; font-weight: 500; letter-spacing: -.02em; }
.ep-kpi-line span { color: var(--nd-ink-muted); font-size: 13px; }
.ep-chart { position: relative; height: 120px; margin: 8px 0 4px; }
.ep-chart__avg { position: absolute; left: 0; right: 0; top: var(--avg, 50%); height: 1.5px; background: var(--nd-hairline-strong); z-index: 1; }
.ep-chart__avg-label { position: absolute; left: 0; top: calc(var(--avg, 50%) - 22px); background: var(--nd-ink); color: var(--nd-ink-inverse); padding: 2px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 600; z-index: 2; }
.ep-chart__bars { display: flex; align-items: flex-end; justify-content: space-around; height: 100%; padding: 0 6px; position: relative; z-index: 2; }
.ep-bar { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; height: 100%; justify-content: flex-end; }
.ep-bar i { display: block; width: 18px; height: var(--h, 40%); border-radius: 9px; background: linear-gradient(to bottom, var(--ep-accent) 0%, #8fa3ff 100%); position: relative; transition: transform .3s; min-height: 6px; }
.ep-bar i:hover { transform: scale(1.06); }
.ep-bar i.is-today::before { content: ""; position: absolute; top: -4px; left: 50%; transform: translateX(-50%); width: 8px; height: 8px; border-radius: 50%; background: var(--nd-panel); border: 1.5px solid var(--ep-accent); }
.ep-bar i.is-zero { background: var(--nd-raised); }
.ep-bar small { font-size: 10px; color: var(--nd-ink-muted); font-weight: 500; }
.ep-readings { border-top: 1px solid var(--nd-hairline); padding-top: 4px; display: flex; flex-direction: column; }
.ep-reading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--nd-hairline); font-size: 12.5px; color: var(--nd-ink); }
.ep-reading:last-child { border-bottom: 0; }
.ep-reading:hover { color: var(--ep-accent); }
.ep-reading > span:first-child { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-reading .nd-num { font-size: 12px; white-space: nowrap; }

.ep-alerts { display: flex; flex-direction: column; gap: 16px; }
.ep-alert { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 16px; border-radius: 16px; background: var(--nd-panel); border: 1px solid var(--nd-hairline); box-shadow: 0 20px 25px -18px rgba(0,0,0,.25); }
.ep-alert__x { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; border: 1.5px solid var(--nd-hairline-strong); background: var(--nd-panel); color: var(--nd-ink-muted); cursor: pointer; font-size: 16px; line-height: 1; transition: .25s; }
.ep-alert__x:hover { background: var(--ep-bad); border-color: var(--ep-bad); color: #fff; }
.ep-alert__icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ep-accent-soft); color: var(--ep-accent); animation: ep-breathe 1.2s ease-in-out infinite alternate; }
.ep-alert__icon svg { width: 24px; height: 24px; }
.ep-alert--warn .ep-alert__icon { background: var(--ep-warn-soft); color: var(--ep-warn); }
.ep-alert--bad .ep-alert__icon { background: var(--ep-bad-soft); color: var(--ep-bad); }
.ep-alert--ok .ep-alert__icon { background: var(--ep-ok-soft); color: var(--ep-ok); animation: none; }
@keyframes ep-breathe { from { transform: scale(1); } to { transform: scale(1.08); } }
.ep-alert h3 { margin: 0; font-size: 15px; font-weight: 600; padding-right: 32px; }
.ep-alert p { margin: 0; font-size: 13px; color: var(--nd-ink-muted); line-height: 1.45; }
.ep-alert__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ep-alert[hidden] { display: none; }
.ep-perfil-mini .nd-panel__head { flex-wrap: wrap; }

.ep-grid-3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; align-items: start; }
.ep-grid-2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.ep-grid-3 > .ep-cta { align-self: stretch; }
@media (max-width: 1100px) { .ep-grid-3 { grid-template-columns: 1fr 1fr; } .ep-grid-3 > :first-child { grid-column: 1 / -1; } }
@media (max-width: 700px) { .ep-grid-3, .ep-grid-2 { grid-template-columns: 1fr; } .ep-grid-3 > :first-child { grid-column: auto; } .ep-hero__right { width: 100%; } .ep-hero__right .nd-btn--primary { margin-left: auto; } }

.ep-feed { display: flex; flex-direction: column; }
.ep-feed__item { position: relative; display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; font-size: 13px; }
.ep-feed__item::before { content: ""; position: absolute; left: 8px; top: 26px; bottom: -8px; width: 1.5px; background: var(--nd-hairline); }
.ep-feed__item:last-child::before { display: none; }
.ep-feed__dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--ep-accent-soft); color: var(--ep-accent); margin-top: 1px; }
.ep-feed__dot svg { width: 10px; height: 10px; }
.ep-feed__dot--ok { background: var(--ep-ok-soft); color: var(--ep-ok); } .ep-feed__dot--warn { background: var(--ep-warn-soft); color: var(--ep-warn); } .ep-feed__dot--bad { background: var(--ep-bad-soft); color: var(--ep-bad); }
.ep-feed__txt { min-width: 0; } .ep-feed__txt small { display: block; color: var(--nd-ink-muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-feed__when { color: var(--nd-ink-faint); font-size: 11.5px; white-space: nowrap; font-family: var(--nd-font-mono); }
@media (prefers-reduced-motion: reduce) { .ep-live__dots i, .ep-alert__icon, .ep-step--active .ep-step__circle { animation: none !important; } }
