/* Nota Fácil — design system
   Tipografia Inter (embutida, licença OFL) · ícones próprios em SVG · sem dependências externas */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/inter-Regular.woff) format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/inter-Medium.woff) format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url(/fonts/inter-SemiBold.woff) format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/inter-Bold.woff) format("woff"); }

[hidden] { display: none !important; }
:root {
  --bg: #f5f6fa; --surface: #fff; --surface-2: #f9fafc;
  --ink: #101828; --ink-2: #475467; --ink-3: #98a2b3;
  --line: #e9ecf2; --line-2: #d6dbe4;
  --brand: #4f46e5; --brand-2: #4338ca; --brand-3: #6366f1; --brand-bg: #eef0ff; --brand-ring: rgba(79,70,229,.18);
  --accent: #0ea5a4;
  --side: #0c1222; --side-2: #121a30; --side-ink: #aeb7cb; --side-line: rgba(255,255,255,.07);
  --brass: var(--brand); --brass-2: var(--brand-2); --brass-bg: var(--brand-bg);
  --ok: #067647; --ok-bg: #e7f6ee; --warn: #b54708; --warn-bg: #fff4e5;
  --bad: #c01048; --bad-bg: #fdeef3; --info: #175cd3; --info-bg: #eaf2ff;
  --r: 14px; --r-sm: 10px;
  --sh-1: 0 1px 2px rgba(16,24,40,.05);
  --sh: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px -4px rgba(16,24,40,.07);
  --sh-lg: 0 18px 50px -12px rgba(16,24,40,.28);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "calt"; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 24px; letter-spacing: -.022em; font-weight: 700; } h2 { font-size: 16px; } h3 { font-size: 14px; }
.muted { color: var(--ink-2); } .small { font-size: 12.5px; } .num { font-variant-numeric: tabular-nums; }
a { color: var(--brand-2); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::selection { background: #dfe1ff; }
svg { flex: none; }

/* ---------- estrutura ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%); color: var(--side-ink); padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #26304a transparent; }
.side::after { content: ""; position: absolute; inset: 0 0 auto; height: 220px; pointer-events: none; background: radial-gradient(260px 160px at 20% 0%, rgba(99,102,241,.22), transparent 70%); }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 12px; color: #fff; position: relative; z-index: 1; }
.brand img, .brand .logo { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 6px 18px -6px rgba(99,102,241,.7); }
.brand b { font-size: 15px; display: block; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand span { font-size: 12px; color: #7f8aa3; }
.nav { display: grid; gap: 2px; position: relative; z-index: 1; }
.nav .sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #5f6b85; font-weight: 600; padding: 10px 12px 4px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 5px 10px; border-radius: 10px; color: var(--side-ink); text-decoration: none; font-weight: 500; font-size: 13.5px; position: relative; transition: background .18s var(--ease), color .18s var(--ease); }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(99,102,241,.28), rgba(99,102,241,.08)); color: #fff; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, #818cf8, #22d3ee); }
.nav a .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.04); transition: background .18s var(--ease), color .18s var(--ease); }
.nav a[aria-current="page"] .ic { background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff; box-shadow: 0 6px 14px -6px rgba(99,102,241,.9); }
.nav svg { width: 17px; height: 17px; }
.nav .pill { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: #c7cee0; }
.side .spacer { flex: 1; min-height: 16px; }
.side .me { border: 1px solid var(--side-line); background: rgba(255,255,255,.03); border-radius: 12px; padding: 10px; display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.side .me .who { min-width: 0; flex: 1; }
.side .me b { color: #fff; display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .me span { font-size: 11.5px; color: #7f8aa3; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, #6366f1, #0ea5a4); flex: none; }
.side .me .out { background: transparent; border: 0; color: #7f8aa3; cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.side .me .out:hover { background: rgba(255,255,255,.08); color: #fff; }
.side .me .out svg { width: 17px; height: 17px; }

.main { padding: 0 36px 56px; max-width: 1280px; width: 100%; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 0; margin-bottom: 14px; background: linear-gradient(var(--bg) 70%, rgba(245,246,250,0)); }
.topbar .crumb { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 13px; font-weight: 500; min-width: 0; }
.topbar .crumb b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb svg { width: 15px; height: 15px; }
.topbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.env { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); box-shadow: var(--sh-1); }
.env i { width: 7px; height: 7px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 3px rgba(18,183,106,.18); }
.env.homol i { background: #f79009; box-shadow: 0 0 0 3px rgba(247,144,9,.2); }
.page { animation: page-in .38s var(--ease) both; }
.btn svg { width: 16px; height: 16px; }
.card, .grid > * { min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-head .actions > input, .page-head .actions > select { width: auto; }
.page-head p.muted, .page-head .small.muted { margin-top: 4px; }

/* ---------- componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); }
.card > .hd { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card > .bd { padding: 18px 20px; }
.page > .card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 18px; }
.kpi { padding: 18px 20px; position: relative; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); animation: rise .45s var(--ease) both; }
.kpis > :nth-child(2) { animation-delay: .04s; } .kpis > :nth-child(3) { animation-delay: .08s; } .kpis > :nth-child(4) { animation-delay: .12s; } .kpis > :nth-child(5) { animation-delay: .16s; } .kpis > :nth-child(6) { animation-delay: .2s; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,.08), transparent 70%); pointer-events: none; }
.kpi .lbl { color: var(--ink-2); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 9px; line-height: 1.3; }
.kpi .lbl .chip { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-bg); color: var(--brand); }
.kpi .lbl .chip svg { width: 15px; height: 15px; }
.kpi .lbl .chip.ok { background: var(--ok-bg); color: var(--ok); } .kpi .lbl .chip.warn { background: var(--warn-bg); color: var(--warn); }
.kpi .lbl .chip.bad { background: var(--bad-bg); color: var(--bad); } .kpi .lbl .chip.info { background: var(--info-bg); color: var(--info); }
.kpi .val { font-size: 26px; font-weight: 700; margin-top: 10px; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.kpi .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
a.kpi, .kbtn { text-decoration: none; color: inherit; }
a.kpi:hover, .kbtn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px -12px rgba(16,24,40,.22); border-color: #d9dcff; }
.cols-2 { grid-template-columns: 2fr 1fr; }

.btn { appearance: none; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 13.5px;
  padding: 7px 14px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; white-space: nowrap;
  box-shadow: var(--sh-1); transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease), color .15s; }
.btn:hover { background: var(--surface-2); border-color: #c4cbd8; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(180deg, var(--brand-3), var(--brand)); border-color: var(--brand-2); color: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.1), 0 6px 16px -8px rgba(79,70,229,.8), inset 0 1px 0 rgba(255,255,255,.18); }
.btn.primary:hover { background: linear-gradient(180deg, #5a5ff0, var(--brand-2)); }
.btn.danger { color: var(--bad); border-color: #f5c6d4; }
.btn.danger:hover { background: var(--bad-bg); border-color: #efa6bb; }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn.sm svg { width: 14px; height: 14px; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: #eef0f5; }
.btn.wa { background: linear-gradient(180deg, #25c26b, #16a34a); border-color: #15803d; color: #fff; }
.btn.wa:hover { background: linear-gradient(180deg, #22b463, #15803d); }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(127,127,127,.35); border-top-color: var(--brand); animation: spin .7s linear infinite; }
.btn.primary.busy::after, .btn.wa.busy::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
a.btn { text-decoration: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.field .err { font-size: 12px; color: var(--bad); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 11px; min-height: 38px; width: 100%;
  box-shadow: var(--sh-1); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input:hover, select:hover, textarea:hover { border-color: #c4cbd8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-3); box-shadow: 0 0 0 4px var(--brand-ring); }
input::placeholder, textarea::placeholder { color: #a6aec0; }
input[aria-invalid="true"] { border-color: var(--bad); }
input[type="checkbox"] { width: 17px; height: 17px; min-height: 0; accent-color: var(--brand); box-shadow: none; }
input[type="search"] { padding-left: 34px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px 50% / 16px; }
select { appearance: none; padding-right: 32px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; }
.check { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; }
.form { display: grid; gap: 15px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.card > .tbl-wrap:first-child th:first-child, .card > .tbl-wrap:first-child table { border-top-left-radius: var(--r); }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s var(--ease); }
tbody tr.click { cursor: pointer; } tbody tr:hover td { background: #fafbff; }
td.r, th.r { text-align: right; }
.tbl-wrap { overflow-x: auto; border-radius: var(--r); }
td .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
tbody tr { animation: fade .35s var(--ease) both; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-scheduled { background: var(--info-bg); color: var(--info); border-color: #d1e0ff; }
.b-confirmed { background: var(--brand-bg); color: var(--brand-2); border-color: #dcdffe; }
.b-completed { background: var(--ok-bg); color: var(--ok); border-color: #c8ecd8; }
.b-canceled { background: #f2f4f7; color: var(--ink-2); border-color: #e4e7ec; }
.b-no_show { background: var(--bad-bg); color: var(--bad); border-color: #fbd0dd; }
.tag { font-size: 11.5px; color: var(--ink-2); background: #f2f4f7; border-radius: 6px; padding: 2px 7px; font-weight: 600; }
.tag.wa { background: #e7f6ee; color: #067647; }
.tag.web { background: var(--info-bg); color: var(--info); }

.empty { padding: 48px 20px; text-align: center; color: var(--ink-2); }
.empty::before { content: ""; display: block; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px;
  background: var(--brand-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7.5z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E") no-repeat center / 26px; }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; font-size: 15px; }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 12px; background: var(--warn-bg); color: #7a2e0e; border: 1px solid #fedf89; margin-bottom: 16px; animation: fade .35s var(--ease) both; }
.banner.bad { background: var(--bad-bg); border-color: #fbd0dd; color: #89123e; }
.banner.info { background: var(--info-bg); border-color: #d1e0ff; color: #1849a9; }

.datebar { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; box-shadow: var(--sh-1); }
.datebar .btn { border: 0; box-shadow: none; min-height: 30px; padding: 4px 9px; }
.datebar b { font-weight: 600; }
.datebar input[type=date], .datebar input[type=month] { width: auto; }
.picklist { border: 1px solid var(--line); border-radius: 12px; max-height: 220px; overflow: auto; margin-top: 6px; box-shadow: var(--sh); animation: drop .18s var(--ease) both; }
.picklist button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); background: #fff; font: inherit; cursor: pointer; text-align: left; }
.picklist button:hover { background: #f6f7ff; }
.picked { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border: 1px solid #c7ccfb; background: var(--brand-bg); border-radius: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; word-break: break-all; background: #f2f4f7; padding: 8px 10px; border-radius: 8px; }

/* janelas */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); box-shadow: var(--sh-lg); color: var(--ink); overflow: hidden; }
dialog[open] { animation: pop .26s var(--ease) both; }
dialog.closing { animation: pop-out .16s ease-in both; }
dialog::backdrop { background: rgba(12,18,34,.42); backdrop-filter: blur(3px); animation: fade .2s ease both; }
dialog.closing::backdrop { animation: fade-out .16s ease-in both; }
dialog .hd { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
dialog .hd h2 { font-size: 17px; }
dialog .hd .btn { border-radius: 50%; width: 32px; height: 32px; min-height: 32px; padding: 0; }
dialog .bd { padding: 20px 22px; max-height: 70vh; overflow: auto; }
dialog .ft { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); flex-wrap: wrap; }
dialog.wide { width: min(840px, calc(100vw - 32px)); }

/* notificações */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { display: flex; align-items: flex-start; gap: 10px; background: #101828; color: #fff; padding: 12px 14px 12px 12px; border-radius: 12px; box-shadow: 0 14px 34px -10px rgba(16,24,40,.45); max-width: 380px; font-weight: 500; font-size: 13.5px; animation: toast-in .32s var(--ease) both; position: relative; overflow: hidden; }
.toast .ti { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #12b76a; flex: none; }
.toast .ti svg { width: 14px; height: 14px; }
.toast.err .ti { background: #f04438; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255,255,255,.25); transform-origin: left; animation: shrink var(--t, 3.5s) linear both; }
.toast.out { animation: toast-out .25s ease-in both; }

/* carregando */
.skel { display: grid; gap: 16px; animation: fade .2s ease both; }
.skel .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.skel i { display: block; border-radius: var(--r); background: linear-gradient(90deg, #eceff4 0%, #f6f7fa 50%, #eceff4 100%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.skel .h { height: 34px; width: 260px; border-radius: 10px; }
.skel .k { height: 108px; }
.skel .t { height: 300px; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); }
.login .hero { position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(600px 400px at 0% 0%, rgba(99,102,241,.55), transparent 60%), radial-gradient(500px 400px at 100% 100%, rgba(14,165,164,.4), transparent 60%), linear-gradient(160deg, #0c1222, #1a1f4b); }
.login .hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 70%); pointer-events: none; }
.login .hero > * { position: relative; z-index: 1; }
.login .hero h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.03em; font-weight: 700; max-width: 460px; margin: 26px 0 14px; }
.login .hero p { color: #c3c9e0; max-width: 430px; margin: 0; font-size: 15px; }
.login .hero ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.login .hero li { display: flex; gap: 10px; align-items: center; color: #dfe3f3; font-weight: 500; }
.login .hero li i { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.login .hero li svg { width: 15px; height: 15px; }
.login .hero .foot { font-size: 12px; color: #8d95b3; }
.login .pane { display: grid; place-items: center; padding: 32px 20px; }
.login .card { width: min(400px, 100%); padding: 32px; animation: rise .5s var(--ease) both; border-radius: 20px; }
.login .brand { color: var(--ink); padding: 0 0 22px; }
.login .brand span { color: var(--ink-2); }
.login .hero .brand { color: #fff; padding: 0; } .login .hero .brand span { color: #9aa3c2; }
.login .sec { margin-top: 18px; font-size: 12px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.login .sec svg { width: 14px; height: 14px; }
.login.solo { grid-template-columns: 1fr; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 50% -10%, #e3e6ff 0%, var(--bg) 60%); }

/* animações */
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pop-out { to { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* celular */
.menu-btn { display: none; }
.scrim { display: none; }
@media (max-width: 1020px) { .login { grid-template-columns: 1fr; } .login .hero { display: none; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 60; transform: translateX(-102%); transition: transform .28s var(--ease); box-shadow: var(--sh-lg); }
  .side.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(12,18,34,.4); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
  .side.open + .scrim { opacity: 1; pointer-events: auto; }
  .main { padding: 0 16px 40px; }
  .topbar { margin-bottom: 6px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 14px; } .kpi .val { font-size: 20px; }
  .banner { flex-direction: column; align-items: flex-start; }
  .menu-btn { display: inline-flex; }
  .cols-2, .row2, .row3 { grid-template-columns: 1fr; }
  td, th { padding: 10px 12px; }
  h1 { font-size: 21px; }
  #toasts { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.page-head .actions .check { white-space: nowrap; }

/* ---------- NFS-e ---------- */
.tag.homol { background: var(--warn-bg); color: var(--warn); margin-left: 6px; }
.banner.info { background: var(--info-bg); border-color: #c9d8f2; color: #1d4583; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.filters > * { width: auto; }
.clip { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre { white-space: pre-wrap; }
.errs { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
fieldset.box { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px 16px; margin: 0; background: var(--surface-2); }
fieldset.box legend { font-size: 12.5px; font-weight: 650; color: var(--ink-2); padding: 0 6px; }
details > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); }
dialog.wide { width: min(820px, calc(100vw - 32px)); }
tr.dim td { opacity: .55; }
.acts-left { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px; border-top: 1px dashed var(--line); padding-top: 12px; }

/* módulos */
.tag.mod { background: var(--brand-bg); color: var(--brand-2); margin: 4px 4px 0 0; display: inline-block; }
.tag.in { background: var(--ok-bg); color: var(--ok); }
.tag.out { background: var(--bad-bg); color: var(--bad); }
.mod-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--info-bg); color: var(--info); display: grid; place-items: center; }
.mod-ico svg { width: 22px; height: 22px; }
ul.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
ul.checks li::before { content: '✓'; color: var(--ok); font-weight: 700; margin-right: 8px; }
.kbtn { text-align: left; cursor: pointer; font: inherit; color: inherit; }
.err { color: var(--bad); }
.fluxo { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 12px 16px 4px; align-items: end; }
.fcol { display: grid; gap: 4px; justify-items: center; }
.fbars { display: flex; gap: 4px; height: 140px; align-items: flex-end; }
.fbar { width: 18px; height: 100%; display: flex; flex-direction: column-reverse; border-radius: 6px 6px 2px 2px; overflow: hidden; background: #f0f2f6; }
.fbar i { transition: height .6s var(--ease); }
.fbar i { display: block; width: 100%; }
.fbar i.prev { order: 2; }
.fbar.in i { background: var(--ok); } .fbar.in i.prev { background: #a9d8bd; }
.fbar.out i { background: var(--bad); } .fbar.out i.prev { background: #efb3ad; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; }
.dot.in { background: var(--ok); } .dot.out { background: var(--bad); }
@media (max-width: 640px) { .fbar { width: 11px; } .fluxo { gap: 4px; padding: 10px 6px 4px; } }
.grid.kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .grid.kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hide-sm { display: none; } }
fieldset.box > .form { margin-top: 4px; }
.mod-row { display: grid; grid-template-columns: 1fr 160px; gap: 12px; align-items: end; }
.mod-row .check { align-items: flex-start; }
@media (max-width: 640px) { .mod-row { grid-template-columns: 1fr; } }
.side .me .avatar { color: #fff; font-size: 12.5px; letter-spacing: .02em; }
