/* =========================================================================
   EuroFiscal — folha de estilo única (sem dependências externas)
   ========================================================================= */

:root {
    --brand: #1560d4;
    --brand-600: #0d47a1;
    --brand-300: #90c2f9;
    --brand-soft: #e8f1fe;
    --brand-50: #f3f8ff;
    --brand-navy: #0a2a66;
    --brand-accent: #29b6f6;

    --ink: #0f172a;
    --ink-2: #1e293b;
    --muted: #64748b;
    --muted-2: #94a3b8;
    --line: #e6e9f0;
    --line-soft: #f1f5f9;

    --bg: #f4f6fb;
    --card: #ffffff;

    --ok: #059669;
    --ok-soft: #ecfdf5;
    --warn: #b45309;
    --warn-soft: #fffbeb;
    --ko: #dc2626;
    --ko-soft: #fef2f2;
    --info: #0369a1;
    --info-soft: #f0f9ff;

    --sidebar-w: 264px;
    --topbar-h: 68px;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 4px 16px rgba(15, 23, 42, .07);
    --shadow-lg: 0 18px 40px rgba(15, 23, 42, .16);
    --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; color: var(--ink); }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

svg { width: 18px; height: 18px; flex: none; }

::selection { background: var(--brand-300); color: var(--ink); }

/* ------------------------------------------------------------ estrutura */

.app-shell { display: flex; min-height: 100vh; }

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding: 26px 28px 40px;
    max-width: 1480px;
    width: 100%;
}

.app-footer {
    padding: 18px 28px 26px;
    color: var(--muted-2);
    font-size: 13px;
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--line-soft);
}

.app-footer__sep { opacity: .5; }

/* -------------------------------------------------------------- sidebar */

.sidebar {
    width: var(--sidebar-w);
    flex: none;
    background: linear-gradient(185deg, #0c2457 0%, #091b45 55%, #0a1d4a 100%);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.brand:hover { text-decoration: none; }

.brand__mark {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: #fff;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(10, 42, 102, .22);
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.brand__text small { font-size: 11.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .08em; }

.sidebar__close {
    display: none;
    background: none; border: 0;
    color: #94a3b8; font-size: 26px; line-height: 1;
    cursor: pointer; padding: 0 6px;
}

.sidebar__nav { flex: 1; overflow-y: auto; padding: 16px 12px 22px; }
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 99px; }

.sidebar__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #64748b;
    margin: 18px 12px 8px;
    font-weight: 600;
}
.sidebar__label:first-child { margin-top: 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: #b6c2d4;
    font-size: 14.2px;
    font-weight: 500;
    margin-bottom: 3px;
    transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-item svg { opacity: .85; }
.nav-item.is-active {
    background: linear-gradient(90deg, rgba(21, 96, 212, .32), rgba(21, 96, 212, .12));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(144, 194, 249, .22);
}
.nav-item.is-active svg { opacity: 1; color: #90c2f9; }

.sidebar__foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .07); }

.tenant-chip {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    padding: 10px;
}
.tenant-chip__avatar {
    width: 34px; height: 34px; flex: none;
    border-radius: 9px;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, .1);
    color: #e2e8f0; font-size: 12px; font-weight: 700;
}
.tenant-chip__info { display: flex; flex-direction: column; min-width: 0; }
.tenant-chip__info strong { font-size: 13px; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-chip__info small { font-size: 11.5px; color: #94a3b8; }

/* --------------------------------------------------------------- topbar */

.topbar {
    height: var(--topbar-h);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__titles { min-width: 0; }
.topbar__title { font-size: 19px; font-weight: 660; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__subtitle { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__subtitle:empty { display: none; }
.topbar__right { display: flex; align-items: center; gap: 12px; }

.icon-btn {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--line-soft); border-color: #d8dde8; }
.topbar__burger { display: none; }

.user-menu { position: relative; }

.user-menu__trigger {
    display: flex; align-items: center; gap: 9px;
    background: none; border: 1px solid transparent;
    padding: 4px 8px 4px 4px; border-radius: 999px;
    cursor: pointer; color: var(--ink-2);
}
.user-menu__trigger:hover { background: var(--line-soft); border-color: var(--line); }

.user-menu__avatar {
    width: 34px; height: 34px; flex: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-navy));
    color: #fff; font-size: 12.5px; font-weight: 700;
    display: grid; place-items: center;
}
.user-menu__name { font-size: 14px; font-weight: 550; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__chevron { width: 15px; height: 15px; color: var(--muted); }

.user-menu__panel {
    position: absolute; right: 0; top: calc(100% + 10px);
    min-width: 224px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 50;
}
.user-menu__header { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.user-menu__header strong { display: block; font-size: 14px; }
.user-menu__header small { color: var(--muted); font-size: 12.5px; word-break: break-all; }
.user-menu__item {
    display: block; width: 100%; text-align: left;
    padding: 9px 12px; border-radius: 8px;
    font-size: 14px; color: var(--ink-2);
    background: none; border: 0; cursor: pointer; font-family: inherit;
}
.user-menu__item:hover { background: var(--line-soft); text-decoration: none; }
.user-menu__item--danger { color: var(--ko); }

/* ------------------------------------------------------------- botões */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14.2px;
    font-weight: 570;
    font-family: inherit;
    cursor: pointer;
    transition: transform .12s, background .15s, box-shadow .15s, border-color .15s;
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }

.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(21, 96, 212, .28); }
.btn--primary:hover { background: var(--brand-600); }

.btn--secondary { background: #fff; border-color: var(--line); color: var(--ink-2); box-shadow: var(--shadow-sm); }
.btn--secondary:hover { background: var(--line-soft); border-color: #d5dbe6; }

.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--line-soft); color: var(--ink-2); }

.btn--success { background: var(--ok); color: #fff; }
.btn--success:hover { background: #047857; }

.btn--danger { background: var(--ko); color: #fff; }
.btn--danger:hover { background: #b91c1c; }

.btn--sm { padding: 7px 12px; font-size: 13.4px; border-radius: 9px; }
.btn--sm svg { width: 15px; height: 15px; }
.btn--lg { padding: 13px 22px; font-size: 15.5px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn:disabled, .btn.is-disabled { opacity: .55; pointer-events: none; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* -------------------------------------------------------------- cards */

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card__head {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line-soft);
    flex-wrap: wrap;
}
.card__title { font-size: 15.5px; font-weight: 640; }
.card__subtitle { font-size: 13px; color: var(--muted); margin-top: 2px; }
.card__body { padding: 20px; }
.card__body--flush { padding: 0; }
.card__foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); background: var(--line-soft); }

.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.grid--side { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }

.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- KPI */

.kpi {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; gap: 10px;
}
.kpi::after {
    content: "";
    position: absolute; inset: 0 auto 0 0; width: 3px;
    background: var(--kpi-accent, var(--brand));
}
.kpi__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kpi__label { font-size: 12.5px; color: var(--muted); font-weight: 550; text-transform: uppercase; letter-spacing: .05em; }
.kpi__value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.kpi__hint { font-size: 12.8px; color: var(--muted); }
.kpi__icon {
    width: 40px; height: 40px; flex: none;
    border-radius: 11px;
    display: grid; place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
}
.kpi__icon--ok { background: var(--ok-soft); color: var(--ok); }
.kpi__icon--warn { background: var(--warn-soft); color: var(--warn); }
.kpi__icon--info { background: var(--info-soft); color: var(--info); }
.kpi__icon--ko { background: var(--ko-soft); color: var(--ko); }

/* ------------------------------------------------------------- tabelas */

.table-wrap { width: 100%; overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    text-align: left;
    padding: 11px 16px;
    font-size: 11.8px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
    font-weight: 650;
    background: var(--line-soft);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table__primary { font-weight: 600; color: var(--ink); }
.table__muted { color: var(--muted); font-size: 13px; }
.table__actions { display: flex; gap: 6px; justify-content: flex-end; }

/* -------------------------------------------------------------- badges */

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12.2px;
    font-weight: 600;
    line-height: 1.7;
    background: var(--line-soft);
    color: var(--muted);
    white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-ko { background: var(--ko-soft); color: var(--ko); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand-600); }
.badge-muted { background: var(--line-soft); color: var(--muted); }
.badge-plain::before { display: none; }

.chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 7px;
    background: var(--line-soft);
    color: var(--muted);
    font-size: 12.3px;
    font-weight: 550;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ------------------------------------------------------------ formulários */

.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field--full { grid-column: 1 / -1; }
.form-field--3 { grid-column: span 3; }
.form-field--2 { grid-column: span 2; }

label, .label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
}

.input, .select, .textarea,
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="tel"], input[type="search"],
input[type="url"], input[type="file"], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-family: inherit;
    font-size: 14.4px;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
    min-height: 42px;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }

.input:focus, .select:focus, .textarea:focus,
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(21, 96, 212, .14);
}

.input::placeholder, textarea::placeholder { color: var(--muted-2); }
.input:disabled, select:disabled, textarea:disabled { background: var(--line-soft); color: var(--muted); }

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 34px;
}

.field-help { font-size: 12.4px; color: var(--muted); }
.field-error { font-size: 12.6px; color: var(--ko); font-weight: 550; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--ko); }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 8px; }

.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-group label {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    font-size: 13.6px;
    font-weight: 550;
    background: #fff;
    transition: all .15s;
}
.radio-group label:hover { border-color: var(--brand-300); }
.radio-group input { accent-color: var(--brand); width: 15px; height: 15px; min-height: 0; }
.radio-group input:checked + span { color: var(--brand-600); }
.radio-group label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

.checkbox { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--brand); min-height: 0; }

fieldset.radio-group-fieldset > .radio-group { margin-bottom: 10px; }

/* --------------------------------------------------------------- filtros */

.filters {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line-soft);
}
.filters .form-field { min-width: 150px; flex: 0 1 190px; }
.filters .form-field--grow { flex: 1 1 240px; }

/* -------------------------------------------------------------- abas */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a {
    padding: 10px 16px;
    font-size: 14.2px;
    font-weight: 570;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.is-active { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------------------------------------------------------- estado vazio */

.empty-state { text-align: center; padding: 54px 24px; }
.empty-state__icon {
    width: 58px; height: 58px; margin: 0 auto 16px;
    border-radius: 16px;
    display: grid; place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
}
.empty-state__icon svg { width: 26px; height: 26px; }
.empty-state h3 { font-size: 16.5px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 14px; max-width: 420px; margin: 0 auto 18px; }

/* --------------------------------------------------------- paginação */

.pagination {
    display: flex; gap: 10px 16px; align-items: center; justify-content: space-between;
    padding: 14px 18px; flex-wrap: wrap; border-top: 1px solid var(--line-soft);
}
.pagination__info { font-size: 13.4px; color: var(--muted); }
.pagination__pages { display: flex; gap: 6px; flex-wrap: wrap; }
.pagination .pagination__info, .pagination .pagination__gap { border: 0 !important; background: none !important; min-width: 0 !important; padding: 0 !important; height: auto !important; }
.pagination .pagination__gap { padding: 0 4px !important; color: var(--muted); }
.pagination__pages a, .pagination__pages span {
    min-width: 36px; height: 36px;
    padding: 0 10px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13.6px; font-weight: 550; color: var(--ink-2);
}
.pagination a:hover { background: var(--line-soft); text-decoration: none; }
.pagination span.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination span.is-disabled { opacity: .45; }

/* ---------------------------------------------------------- gráfico */

.chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding: 8px 0; }
.chart__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.chart__bar {
    width: 100%;
    max-width: 26px;
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-navy) 100%);
    border-radius: 5px 5px 2px 2px;
    min-height: 3px;
    transition: opacity .15s, transform .15s;
    position: relative;
}
.chart__bar:hover { opacity: .82; transform: scaleY(1.02); transform-origin: bottom; }
.chart__label { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }

.bar-list { display: flex; flex-direction: column; gap: 13px; }
.bar-list__item { display: flex; flex-direction: column; gap: 5px; }
.bar-list__top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.6px; }
.bar-list__name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-list__value { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-list__track { height: 7px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.bar-list__fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-accent)); }

/* ----------------------------------------------------- busca inteligente */

.search-results {
    position: absolute;
    left: 0; right: 0; top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 60;
    max-height: 260px;
    overflow-y: auto;
    display: none;
}
.search-results:not(:empty) { display: block; }
.search-results__item {
    display: flex; flex-direction: column; gap: 2px;
    width: 100%; text-align: left;
    padding: 10px 13px;
    border: 0; background: none; cursor: pointer;
    border-bottom: 1px solid var(--line-soft);
    font-family: inherit;
}
.search-results__item:last-child { border-bottom: 0; }
.search-results__item:hover { background: var(--line-soft); }
.search-results__item strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.search-results__item small { font-size: 12.4px; color: var(--muted); }

.field-wrap { position: relative; }

/* ------------------------------------------------------------ alertas */

.messages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.alert {
    display: flex; align-items: flex-start; gap: 11px;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fff;
    font-size: 14.2px;
    box-shadow: var(--shadow-sm);
}
.alert__icon { display: grid; place-items: center; padding-top: 1px; }
.alert__text { flex: 1; }
.alert__close { background: none; border: 0; font-size: 21px; line-height: 1; color: var(--muted-2); cursor: pointer; padding: 0 2px; }
.alert--success { background: var(--ok-soft); border-color: #a7f3d0; color: #065f46; }
.alert--error { background: var(--ko-soft); border-color: #fecaca; color: #991b1b; }
.alert--warning { background: var(--warn-soft); border-color: #fde68a; color: #92400e; }
.alert--info { background: var(--info-soft); border-color: #bae6fd; color: #075985; }

/* ------------------------------------------------------------ modal */

.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.modal__box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: min(520px, 100%);
    max-height: 90vh;
    overflow-y: auto;
}
.modal__head { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.modal__head h3 { font-size: 16.5px; }
.modal__body { padding: 22px; }
.modal__foot { padding: 16px 22px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 10px; }

/* ------------------------------------------------------------- overlay */

.overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 35;
    opacity: 0;
    transition: opacity .2s;
}
.overlay[hidden] { display: none; }
.overlay.is-visible { opacity: 1; }

/* ------------------------------------------------------------- landing */

.landing { background: #fff; }

.landing-nav {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}
.landing-nav__inner {
    max-width: 1180px; margin: 0 auto; padding: 14px 22px;
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.landing-nav .brand { color: var(--ink); }
.landing-nav__links { display: flex; align-items: center; gap: 26px; }
.landing-nav__links a { color: var(--ink-2); font-size: 14.4px; font-weight: 550; }
.landing-nav__links a:hover { color: var(--brand); text-decoration: none; }

.hero {
    background:
        radial-gradient(1100px 420px at 78% -8%, rgba(41, 182, 246, .16), transparent 62%),
        radial-gradient(900px 420px at 8% 4%, rgba(21, 96, 212, .14), transparent 60%),
        linear-gradient(180deg, #fbfcff 0%, #f4f6fb 100%);
    padding: 74px 22px 82px;
    text-align: center;
    overflow: hidden;
}
.hero__inner { max-width: 830px; margin: 0 auto; }
.hero__badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 15px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line);
    color: var(--brand-600); font-size: 13px; font-weight: 600;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}
.hero h1 {
    font-size: clamp(30px, 5.2vw, 50px);
    line-height: 1.1;
    letter-spacing: -.03em;
    margin-bottom: 18px;
}
.hero h1 span {
    background: linear-gradient(120deg, var(--brand) 0%, var(--brand-navy) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lead { font-size: 17.5px; color: var(--muted); max-width: 660px; margin: 0 auto 30px; }
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 44px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.hero__stat strong { display: block; font-size: 27px; font-weight: 720; letter-spacing: -.02em; }
.hero__stat span { font-size: 13.4px; color: var(--muted); }

.hero__visual {
    position: relative;
    max-width: 940px;
    margin: 54px auto 0;
    isolation: isolate;
}
.hero__visual img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow:
        0 30px 70px rgba(15, 23, 42, .16),
        0 6px 18px rgba(21, 96, 212, .12);
    background: #fff;
}
.hero__visual-glow {
    position: absolute;
    inset: 8% -6% -12%;
    background: linear-gradient(135deg, rgba(21, 96, 212, .3), rgba(41, 182, 246, .22));
    filter: blur(48px);
    z-index: -1;
    border-radius: 40px;
}

.section { max-width: 1180px; margin: 0 auto; padding: 76px 22px; }
.section--muted { background: var(--bg); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 46px; }
.section__head h2 { font-size: clamp(24px, 3.2vw, 33px); letter-spacing: -.025em; margin-bottom: 12px; }
.section__head p { color: var(--muted); font-size: 16.5px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feature {
    background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius); padding: 26px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s, box-shadow .18s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature__icon {
    width: 46px; height: 46px; border-radius: 13px;
    display: grid; place-items: center;
    background: var(--brand-soft); color: var(--brand);
    margin-bottom: 16px;
}
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14.4px; }

.pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.plan {
    background: #fff; border: 1px solid var(--line);
    border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px;
    box-shadow: var(--shadow-sm);
}
.plan--destaque { border-color: var(--brand); box-shadow: 0 14px 36px rgba(21, 96, 212, .16); position: relative; }
.plan--destaque::before {
    content: "Mais popular"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--brand); color: #fff; font-size: 11.8px; font-weight: 650;
    padding: 4px 14px; border-radius: 999px; letter-spacing: .04em;
}
.plan h3 { font-size: 17px; }
.plan__price { font-size: 32px; font-weight: 720; letter-spacing: -.03em; }
.plan__price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.plan li { display: flex; gap: 9px; align-items: flex-start; font-size: 14.2px; color: var(--ink-2); }
.plan li svg { width: 17px; height: 17px; color: var(--ok); margin-top: 2px; }

.cta {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-navy) 100%);
    color: #fff; text-align: center; padding: 66px 22px;
}
.cta h2 { color: #fff; font-size: clamp(24px, 3.4vw, 34px); margin-bottom: 12px; }
.cta p { color: rgba(255, 255, 255, .85); margin-bottom: 26px; font-size: 16.5px; }
.cta .btn--secondary { background: #fff; border-color: transparent; color: var(--brand-600); }

.landing-footer { background: var(--brand-navy); color: #94a3b8; padding: 44px 22px; }
.landing-footer__inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.landing-footer strong { color: #fff; }

/* ------------------------------------------------- landing (nova, prefixo lp-) */

.lp { background: #fff; color: var(--ink); }
.lp h1, .lp h2, .lp h3 { letter-spacing: -.025em; }

.lp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
    font-size: 14.5px; font-weight: 650; line-height: 1.2; white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.lp-btn:hover { text-decoration: none; transform: translateY(-1px); }
.lp-btn svg { width: 17px; height: 17px; }
.lp-btn--lg { padding: 14px 24px; font-size: 15.5px; border-radius: 12px; }
.lp-btn--block { width: 100%; }
.lp-btn--primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(21, 96, 212, .28); }
.lp-btn--primary:hover { background: var(--brand-600); }
.lp-btn--ghost { color: var(--ink-2); }
.lp-btn--ghost:hover { background: var(--brand-50); color: var(--brand-600); }
.lp-btn--outline { background: #fff; border-color: var(--line); color: var(--ink-2); }
.lp-btn--outline:hover { border-color: var(--brand); color: var(--brand); }
.lp-btn--outline-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.lp-btn--outline-light:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.lp-btn--white { background: #fff; color: var(--brand-navy); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); }

.lp-eyebrow {
    display: inline-block; margin-bottom: 14px;
    font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--brand);
}
.lp-eyebrow--dark {
    color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
    padding: 6px 14px; border-radius: 999px; letter-spacing: .1em;
}

/* marca */
.lp-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-navy); }
.lp-brand:hover { text-decoration: none; }
.lp-brand img { width: 36px; height: 36px; object-fit: contain; }
.lp-brand span { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.lp-brand b { color: var(--brand); font-weight: 800; }
.lp-brand--light { color: #fff; }
.lp-brand--light b { color: var(--brand-accent); }

/* menu */
.lp-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .2s, border-color .2s;
}
.lp-nav.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(10, 42, 102, .06); }
.lp-nav__inner {
    max-width: 1200px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.lp-nav__menu { display: flex; align-items: center; gap: 4px; }
.lp-nav__menu > a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; font-weight: 550; }
.lp-nav__menu > a:hover { color: var(--brand); background: var(--brand-50); text-decoration: none; }
.lp-nav__actions { display: flex; align-items: center; gap: 8px; margin-left: 14px; }
.lp-nav__toggle {
    display: none; width: 42px; height: 42px; place-items: center;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-2); cursor: pointer;
}

/* hero */
.lp-hero { position: relative; overflow: hidden; color: #fff; background: var(--brand-navy); }
.lp-hero__bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(700px 420px at 85% 10%, rgba(41, 182, 246, .35), transparent 60%),
        radial-gradient(800px 500px at 10% 110%, rgba(21, 96, 212, .55), transparent 60%),
        linear-gradient(160deg, #0b2f78 0%, #0a2a66 45%, #061a45 100%);
}
.lp-hero__bg::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: 44px 44px;
    mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
}
.lp-hero__inner {
    position: relative; max-width: 1200px; margin: 0 auto; padding: 84px 24px 96px;
    display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center;
}
.lp-hero h1 { color: #fff; font-size: clamp(36px, 5.4vw, 60px); line-height: 1.04; font-weight: 800; margin-bottom: 20px; }
.lp-hero h1 span {
    display: block;
    background: linear-gradient(90deg, #7cc8ff 0%, var(--brand-accent) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-hero__lead { font-size: 18px; line-height: 1.6; color: rgba(226, 236, 255, .86); max-width: 540px; margin-bottom: 32px; }
.lp-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.lp-hero__checks { list-style: none; padding: 0; margin: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.lp-hero__checks li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: rgba(226, 236, 255, .9); }
.lp-hero__checks svg { width: 18px; height: 18px; padding: 3px; border-radius: 50%; background: var(--brand); color: #fff; }

/* prévia do produto */
.lp-hero__visual { position: relative; padding: 10px 0 40px 0; }
.lp-mock {
    background: #fff; color: var(--ink); border-radius: 16px; overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .08);
    transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
}
.lp-mock__bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: #f1f4f9; border-bottom: 1px solid var(--line); }
.lp-mock__bar i { width: 10px; height: 10px; border-radius: 50%; background: #d4dae4; }
.lp-mock__bar i:first-child { background: #f87171; } .lp-mock__bar i:nth-child(2) { background: #fbbf24; } .lp-mock__bar i:nth-child(3) { background: #34d399; }
.lp-mock__bar span { margin-left: 10px; font-size: 11.5px; color: var(--muted); background: #fff; padding: 3px 12px; border-radius: 6px; border: 1px solid var(--line); }
.lp-mock__body { padding: 18px; display: grid; gap: 14px; background: var(--bg); }
.lp-mock__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lp-mock__kpis div, .lp-mock__chart, .lp-mock__rows { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.lp-mock small { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lp-mock__kpis strong { display: block; font-size: 15px; font-weight: 750; margin: 2px 0; }
.lp-mock__kpis em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ok); }
.lp-mock__bars { display: flex; align-items: flex-end; gap: 5px; height: 86px; margin-top: 10px; }
.lp-mock__bars i { flex: 1; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, var(--brand-accent), var(--brand)); }
.lp-mock__rows { padding: 4px 12px; }
.lp-mock__rows div { display: grid; grid-template-columns: 1fr 1.3fr auto auto; gap: 10px; align-items: center; padding: 8px 0; font-size: 12px; border-bottom: 1px solid var(--line-soft); }
.lp-mock__rows div:last-child { border-bottom: 0; }
.lp-mock__rows span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-mock__rows em { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.lp-mock__rows em.ok { background: var(--ok-soft); color: var(--ok); }

.lp-receipt {
    position: absolute; right: -14px; bottom: -6px; width: 230px;
    background: #fff; color: var(--ink); border-radius: 16px; padding: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
    animation: lp-float 6s ease-in-out infinite;
}
.lp-receipt__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.lp-receipt__ok { width: 34px; height: 34px; border-radius: 50%; background: #16a34a; color: #fff; display: grid; place-items: center; flex: none; }
.lp-receipt__ok svg { width: 18px; height: 18px; }
.lp-receipt__head small { display: block; font-size: 11px; color: var(--muted); }
.lp-receipt__head b { display: inline-block; margin-top: 2px; font-size: 10.5px; letter-spacing: .06em; background: #16a34a; color: #fff; padding: 2px 8px; border-radius: 5px; }
.lp-receipt__num { display: block; font-size: 17px; font-weight: 800; }
.lp-receipt > small { font-size: 11px; color: var(--muted); }
.lp-receipt__lines { margin: 12px 0 10px; padding: 10px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); display: grid; gap: 5px; }
.lp-receipt__lines div, .lp-receipt__total { display: flex; justify-content: space-between; font-size: 12px; }
.lp-receipt__lines span:first-child { color: var(--muted); }
.lp-receipt__total { font-size: 13px; font-weight: 600; }
.lp-receipt__total b { font-size: 15px; color: var(--brand-navy); }
@keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .lp-receipt { animation: none; } }

/* faixa de diferenciais */
.lp-strip { background: #fff; border-bottom: 1px solid var(--line); }
.lp-strip__inner { max-width: 1200px; margin: 0 auto; padding: 26px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.lp-strip__item { display: flex; align-items: center; gap: 14px; }
.lp-strip__item svg { width: 42px; height: 42px; padding: 9px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); flex: none; }
.lp-strip__item b { display: block; font-size: 14.5px; color: var(--brand-navy); }
.lp-strip__item span { font-size: 13px; color: var(--muted); }

/* seções */
.lp-section { max-width: 1200px; margin: 0 auto; padding: 96px 24px; }
.lp-section--tint { max-width: none; background: linear-gradient(180deg, var(--brand-50) 0%, #fff 100%); }
.lp-section__inner { max-width: 1152px; margin: 0 auto; }
.lp-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.lp-head h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; font-weight: 800; color: var(--brand-navy); margin-bottom: 14px; }
.lp-head p { font-size: 17px; color: var(--muted); }

.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.lp-feature {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.lp-feature:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(10, 42, 102, .1); border-color: var(--brand-300); }
.lp-feature__icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-navy) 100%); color: #fff;
    box-shadow: 0 10px 20px rgba(21, 96, 212, .25);
}
.lp-feature__icon svg { width: 24px; height: 24px; }
.lp-feature h3 { font-size: 18px; color: var(--brand-navy); margin-bottom: 8px; }
.lp-feature p { color: var(--muted); font-size: 15px; line-height: 1.6; }

.lp-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: passo; }
.lp-step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; box-shadow: 0 10px 30px rgba(10, 42, 102, .05); }
.lp-step__num {
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; margin-bottom: 18px;
    background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 18px;
    box-shadow: inset 0 0 0 2px var(--brand-300);
}
.lp-step h3 { font-size: 18px; color: var(--brand-navy); margin-bottom: 8px; }
.lp-step p { color: var(--muted); font-size: 15px; }

.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.lp-split__media img { display: block; width: 100%; height: auto; border-radius: 24px; box-shadow: 0 30px 60px rgba(10, 42, 102, .18); }
.lp-split__copy h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.15; font-weight: 800; color: var(--brand-navy); margin-bottom: 16px; }
.lp-split__copy > p { font-size: 17px; color: var(--muted); margin-bottom: 24px; }
.lp-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 14px; }
.lp-list li { display: flex; align-items: center; gap: 12px; font-size: 15.5px; color: var(--ink-2); }
.lp-list svg { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--brand); color: #fff; flex: none; }

.lp-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: start; }
.lp-plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px 28px; }
.lp-plan h3 { font-size: 19px; color: var(--brand-navy); }
.lp-plan__desc { font-size: 14px; color: var(--muted); margin: 4px 0 18px; }
.lp-plan__price { font-size: 42px; font-weight: 800; letter-spacing: -.04em; color: var(--ink); margin-bottom: 22px; line-height: 1.1; }
.lp-plan__price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.lp-plan__price--text { font-size: 32px; padding: 5px 0; }
.lp-plan ul { list-style: none; padding: 22px 0 0; margin: 22px 0 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.lp-plan li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.lp-plan li svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.lp-plan--featured {
    background: linear-gradient(165deg, #0d3a8f 0%, var(--brand-navy) 100%); border-color: transparent; color: #fff;
    box-shadow: 0 30px 60px rgba(10, 42, 102, .3); transform: translateY(-12px);
}
.lp-plan--featured h3, .lp-plan--featured .lp-plan__price { color: #fff; }
.lp-plan--featured .lp-plan__desc, .lp-plan--featured .lp-plan__price small { color: rgba(226, 236, 255, .75); }
.lp-plan--featured ul { border-color: rgba(255, 255, 255, .15); }
.lp-plan--featured li { color: rgba(255, 255, 255, .92); }
.lp-plan--featured li svg { color: var(--brand-accent); }
.lp-plan--featured .lp-btn--primary { background: var(--brand-accent); color: var(--brand-navy); box-shadow: 0 10px 24px rgba(41, 182, 246, .35); }
.lp-plan__tag {
    position: absolute; top: 20px; right: 20px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    background: rgba(41, 182, 246, .18); color: var(--brand-accent); padding: 5px 11px; border-radius: 999px;
}

.lp-faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.lp-faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; transition: border-color .15s, box-shadow .15s; }
.lp-faq details[open] { border-color: var(--brand-300); box-shadow: 0 10px 26px rgba(10, 42, 102, .07); }
.lp-faq summary {
    list-style: none; cursor: pointer; padding: 19px 0; font-size: 16px; font-weight: 650; color: var(--brand-navy);
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; font-size: 22px; font-weight: 500; color: var(--brand); transition: transform .2s; }
.lp-faq details[open] summary::after { transform: rotate(45deg); }
.lp-faq details p { padding: 0 0 20px; color: var(--muted); font-size: 15px; line-height: 1.65; }

.lp-cta { padding: 0 24px 96px; }
.lp-cta__inner {
    max-width: 1152px; margin: 0 auto; padding: 52px 56px; border-radius: 24px; color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
    background:
        radial-gradient(500px 260px at 90% 0%, rgba(41, 182, 246, .4), transparent 60%),
        linear-gradient(135deg, var(--brand) 0%, var(--brand-navy) 100%);
    box-shadow: 0 30px 60px rgba(10, 42, 102, .25);
}
.lp-cta h2 { color: #fff; font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; margin-bottom: 8px; }
.lp-cta p { color: rgba(226, 236, 255, .85); font-size: 16.5px; }
.lp-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.lp-footer { background: #061a45; color: rgba(203, 213, 225, .8); }
.lp-footer__inner { max-width: 1200px; margin: 0 auto; padding: 64px 24px 40px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.lp-footer__brand p { margin-top: 14px; font-size: 14px; line-height: 1.65; max-width: 340px; }
.lp-footer__col { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.lp-footer__col h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 6px; }
.lp-footer__col a { color: rgba(203, 213, 225, .8); }
.lp-footer__col a:hover { color: #fff; text-decoration: none; }
.lp-footer__bottom {
    max-width: 1200px; margin: 0 auto; padding: 22px 24px; border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px;
}

@media (max-width: 1024px) {
    .lp-hero__inner { grid-template-columns: 1fr; padding: 64px 24px 80px; gap: 48px; }
    .lp-hero__copy { text-align: center; }
    .lp-hero__lead { margin-left: auto; margin-right: auto; }
    .lp-hero__actions, .lp-hero__checks { justify-content: center; }
    .lp-hero__visual { max-width: 620px; margin: 0 auto; width: 100%; }
    .lp-mock { transform: none; }
    .lp-strip__inner { grid-template-columns: repeat(2, 1fr); }
    .lp-features, .lp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-split { grid-template-columns: 1fr; gap: 40px; }
    .lp-plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
    .lp-plan--featured { transform: none; }
    .lp-footer__inner { grid-template-columns: 1fr 1fr; }

    .lp-nav__toggle { display: grid; }
    .lp-nav__menu {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 18px;
        background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px rgba(10, 42, 102, .1);
    }
    .lp-nav.is-open .lp-nav__menu { display: flex; }
    .lp-nav__menu > a { padding: 12px; }
    .lp-nav__actions { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
    .lp-nav__actions .lp-btn { flex: 1; }
}

@media (max-width: 640px) {
    .lp-section { padding: 68px 18px; }
    .lp-nav__inner { padding: 12px 16px; }
    .lp-hero__inner { padding: 48px 18px 64px; }
    .lp-hero__lead { font-size: 16.5px; }
    .lp-hero__actions .lp-btn { width: 100%; }
    .lp-mock__body { padding: 12px; }
    .lp-mock__kpis { grid-template-columns: 1fr 1fr; }
    .lp-mock__kpis div:last-child { display: none; }
    .lp-mock__rows div { grid-template-columns: 1fr auto; }
    .lp-mock__rows span, .lp-mock__rows em { display: none; }
    .lp-receipt { position: relative; right: auto; bottom: auto; width: auto; max-width: 280px; margin: -30px auto 0; }
    .lp-strip__inner { grid-template-columns: 1fr; }
    .lp-features, .lp-steps { grid-template-columns: 1fr; }
    .lp-head { margin-bottom: 36px; }
    .lp-cta { padding: 0 16px 68px; }
    .lp-cta__inner { padding: 36px 24px; }
    .lp-cta__actions, .lp-cta__actions .lp-btn { width: 100%; }
    .lp-footer__inner { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; }
}

/* --------------------------------------------------------- páginas auth */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    background: #fff;
}
.auth__aside {
    background:
        radial-gradient(800px 400px at 20% 10%, rgba(41, 182, 246, .3), transparent 60%),
        linear-gradient(160deg, #0a2a66 0%, #061a45 100%);
    color: #e2e8f0;
    padding: 48px 52px;
    display: flex; flex-direction: column; justify-content: space-between;
}
.auth__aside h2 { color: #fff; font-size: 30px; letter-spacing: -.025em; line-height: 1.22; margin-bottom: 14px; }
.auth__aside p { color: #a8b3c7; font-size: 15.5px; }
.auth__points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 14px; }
.auth__points li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.6px; color: #cbd5e1; }
.auth__points svg { color: var(--brand-accent); margin-top: 2px; }
.auth__quote { font-size: 14px; color: #94a3b8; border-left: 2px solid rgba(165, 180, 252, .5); padding-left: 14px; }

.auth__main { display: flex; align-items: center; justify-content: center; padding: 46px 26px; }
.auth__box { width: min(430px, 100%); }
.auth__box h1 { font-size: 25px; margin-bottom: 8px; }
.auth__lead { color: var(--muted); margin-bottom: 28px; font-size: 15px; }
.auth__form { display: flex; flex-direction: column; gap: 16px; }
.auth__foot { margin-top: 22px; text-align: center; color: var(--muted); font-size: 14px; }
.auth__divider { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 12.5px; margin: 20px 0; }
.auth__divider::before, .auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth__box--wide { width: min(560px, 100%); }
.auth__aside .lp-brand { align-self: flex-start; }
.auth__back { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.auth__back svg { width: 16px; height: 16px; }
.auth__back:hover { color: var(--brand); text-decoration: none; }
.auth__terms { margin-top: 16px; font-size: 12.5px; color: var(--muted-2); text-align: center; }
.auth__google-ok {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 22px;
    border-radius: 12px; background: var(--ok-soft); border: 1px solid #a7f3d0; color: #065f46; font-size: 14px;
}
.auth__google-ok svg { width: 20px; height: 20px; flex: none; color: var(--ok); }

.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
    padding: 12px 18px; border-radius: 11px; border: 1px solid var(--line); background: #fff;
    color: var(--ink-2); font-size: 15px; font-weight: 600; box-shadow: var(--shadow-sm);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.btn-google:hover { text-decoration: none; border-color: #c4ccd8; background: #fafbfd; box-shadow: var(--shadow); }
.btn-google svg { width: 20px; height: 20px; }

.stepper { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stepper__item {
    display: flex; align-items: center; gap: 9px; padding-top: 10px; cursor: pointer;
    border-top: 3px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600;
    transition: border-color .2s, color .2s;
}
.stepper__item span {
    width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
    background: var(--line-soft); color: var(--muted); font-size: 12px; font-weight: 700;
}
.stepper__item.is-active, .stepper__item.is-done { border-color: var(--brand); color: var(--brand-navy); }
.stepper__item.is-active span { background: var(--brand); color: #fff; }
.stepper__item.is-done span { background: var(--brand-soft); color: var(--brand); }

.wizard-step { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.is-ready .wizard-step { display: none; margin: 0; }
.is-ready .wizard-step.is-active { display: block; animation: wizard-in .25s ease; }
.wizard-step legend { font-size: 17px; font-weight: 700; color: var(--brand-navy); margin-bottom: 16px; padding: 0; }
.wizard-nav { display: flex; gap: 10px; margin-top: 8px; }
.wizard-nav .btn { flex: 1 1 0; min-width: 0; white-space: normal; }
.field-hint { font-size: 12.5px; color: var(--muted); }
.muted { color: var(--muted); }
@keyframes wizard-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------- páginas internas */

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { font-size: 21px; letter-spacing: -.02em; }
.page-head p { color: var(--muted); font-size: 14.2px; margin-top: 3px; }

.section-title { font-size: 15px; font-weight: 640; margin-bottom: 12px; }

.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.detail-list__item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.detail-list__label { font-size: 11.8px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 620; }
.detail-list__value { font-size: 14.4px; color: var(--ink); word-break: break-word; }

.timeline { display: flex; flex-direction: column; }
.timeline__item { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.timeline__item:not(:last-child)::before {
    content: ""; position: absolute; left: 9px; top: 22px; bottom: 0; width: 2px; background: var(--line);
}
.timeline__dot { width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); border: 2px solid var(--brand-300); flex: none; margin-top: 3px; }
.timeline__body { min-width: 0; }
.timeline__title { font-size: 14.2px; font-weight: 600; }
.timeline__meta { font-size: 12.8px; color: var(--muted); }

.nota-itens { width: 100%; border-collapse: collapse; font-size: 13.8px; }
.nota-itens th { text-align: left; padding: 9px 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--line-soft); }
.nota-itens td { padding: 10px; border-bottom: 1px solid var(--line-soft); }
.nota-itens td.num { text-align: right; font-variant-numeric: tabular-nums; }
.nota-itens tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; background: #fff; }

.code-block {
    background: #0f172a; color: #cbd5e1;
    border-radius: var(--radius-sm);
    padding: 15px 17px;
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 12.6px;
    line-height: 1.6;
    overflow-x: auto;
    word-break: break-all;
}

/* ------------------------------------------------------ formulário de nota */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.nota-form { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.nota-form__alerta { grid-column: 1 / -1; }
.nota-form__main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.nota-form__side { position: sticky; top: calc(var(--topbar-h) + 20px); }

.radio-group--tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.radio-group--tiles label { justify-content: center; padding: 11px 12px; font-weight: 600; }

.nota-busca { position: relative; margin-bottom: 16px; }
.nota-busca > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.nota-busca input { padding-left: 40px; }

.nota-itens-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.nota-form .nota-itens { table-layout: fixed; }
.nota-form .nota-itens th { padding: 10px 8px; white-space: nowrap; }
.nota-form .nota-itens td { padding: 8px; vertical-align: middle; }
.nota-form .nota-itens tbody tr:last-child td { border-bottom: 0; }
.nota-form .nota-itens input { width: 100%; min-width: 0; padding: 8px 9px; font-size: 13.8px; }
.nota-form .nota-itens .col-un { width: 70px; }
.nota-form .nota-itens .col-qtd { width: 92px; }
.nota-form .nota-itens .col-unit { width: 120px; }
.nota-form .nota-itens .col-descto { width: 104px; }
.nota-form .nota-itens .col-total { width: 116px; }
.nota-form .nota-itens .col-acao { width: 44px; text-align: center; }
.nota-form .nota-itens td.col-total strong { font-size: 14px; white-space: nowrap; }
.nota-itens.is-vazia thead { display: none; }

.nota-itens__remover {
    width: 30px; height: 30px; border-radius: 8px; border: 0; cursor: pointer;
    background: transparent; color: var(--muted); font-size: 20px; line-height: 1;
}
.nota-itens__remover:hover { background: var(--ko-soft); color: var(--ko); }

.nota-itens-vazio { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13.6px; }
.nota-itens-vazio svg { width: 30px; height: 30px; color: var(--brand-300); margin-bottom: 6px; }
.nota-itens-vazio strong { color: var(--ink-2); font-size: 14.6px; }

.nota-resumo__linhas { margin: 0; display: grid; gap: 10px; }
.nota-resumo__linhas div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.nota-resumo__linhas dt { color: var(--muted); }
.nota-resumo__linhas dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.nota-resumo__total {
    margin-top: 16px; padding: 16px; border-radius: 12px;
    background: var(--brand-soft); display: flex; flex-direction: column; gap: 2px;
}
.nota-resumo__total span { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-600); font-weight: 650; }
.nota-resumo__total strong { font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--brand-navy); font-variant-numeric: tabular-nums; }
.nota-resumo__acoes { display: flex; flex-direction: column; gap: 10px; }

.nota-barra { display: none; }

@media (max-width: 1200px) {
    .nota-form .form-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .nota-form { grid-template-columns: minmax(0, 1fr); padding-bottom: 76px; }
    .nota-form__side { position: static; }
    .nota-resumo__acoes { display: none; }
    .nota-barra {
        display: flex; align-items: center; gap: 10px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
        padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
        border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(10, 42, 102, .08);
    }
    .nota-barra__total { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
    .nota-barra__total small { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
    .nota-barra__total strong { font-size: 19px; font-weight: 800; color: var(--brand-navy); white-space: nowrap; }
    .nota-barra .btn { width: auto; }
}

@media (max-width: 760px) {
    .radio-group--tiles label { padding: 10px 6px; }

    /* itens viram cartões */
    .nota-form .nota-itens, .nota-form .nota-itens tbody { display: block; }
    .nota-form .nota-itens thead { display: none; }
    .nota-itens-wrap { border: 0; border-radius: 0; overflow: visible; }
    .nota-form .nota-itens tbody tr {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px;
        grid-template-areas: "desc desc" "un qtd" "unit descto" "total acao";
        padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
    }
    .nota-form .nota-itens td, .nota-form .nota-itens td[class] { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; width: auto; }
    .nota-form .nota-itens td[data-label]::before {
        content: attr(data-label); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
    }
    .nota-form .nota-itens td.col-desc { grid-area: desc; }
    .nota-form .nota-itens td.col-un { grid-area: un; }
    .nota-form .nota-itens td.col-qtd { grid-area: qtd; }
    .nota-form .nota-itens td.col-unit { grid-area: unit; }
    .nota-form .nota-itens td.col-descto { grid-area: descto; }
    .nota-form .nota-itens td.col-total { grid-area: total; text-align: left; justify-content: center; }
    .nota-form .nota-itens td.col-total strong { font-size: 17px; color: var(--brand-navy); }
    .nota-form .nota-itens td.col-acao { grid-area: acao; align-items: flex-end; justify-content: center; }
    .nota-itens__remover { width: auto; height: auto; padding: 8px 12px; font-size: 13px; border: 1px solid var(--line); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
    .nota-itens__remover::after { content: " Remover"; }
    .nota-itens-vazio { border: 1px dashed var(--line); border-radius: 12px; }
}

@media (max-width: 480px) {
    .nota-form .form-grid--4 { grid-template-columns: minmax(0, 1fr); }
    .nota-barra .btn--secondary { display: none; }
}

/* ------------------------------------------------------ detalhe da nota (nd-) */

.nd { display: flex; flex-direction: column; gap: 20px; }

.nd-hero {
    position: relative; overflow: hidden; border-radius: var(--radius);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center;
    padding: 26px 28px; color: #fff;
    background:
        radial-gradient(520px 220px at 100% 0%, rgba(41, 182, 246, .35), transparent 60%),
        linear-gradient(135deg, var(--brand) 0%, var(--brand-navy) 100%);
    box-shadow: 0 14px 34px rgba(10, 42, 102, .18);
}
.nd-hero--cancelada, .nd-hero--rejeitada { background: linear-gradient(135deg, #475569 0%, #1e293b 100%); }
.nd-hero--rascunho { background: linear-gradient(135deg, #64748b 0%, #334155 100%); }
.nd-hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.nd-hero .badge { background: #fff; }
.nd-chip {
    display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .14); color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
}
.nd-chip--warn { background: rgba(251, 191, 36, .2); border-color: rgba(251, 191, 36, .5); color: #fde68a; }
.nd-hero__title { color: #fff; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.nd-hero__meta { margin-top: 4px; font-size: 14px; color: rgba(226, 236, 255, .82); }
.nd-hero__total { text-align: right; display: flex; flex-direction: column; }
.nd-hero__total span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: rgba(226, 236, 255, .75); font-weight: 650; }
.nd-hero__total strong { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.nd-hero__total small { font-size: 13px; color: rgba(226, 236, 255, .75); }
.nd-hero__acoes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .15); }
.nd-hero__acoes form { margin: 0; }
.nd-hero__acoes .btn--primary { background: #fff; color: var(--brand-navy); box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
.nd-hero__acoes .btn--primary:hover { background: var(--brand-50); }
.nd-hero__acoes .btn--secondary { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; box-shadow: none; }
.nd-hero__acoes .btn--secondary:hover { background: rgba(255, 255, 255, .18); }

.nd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.nd-main, .nd-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.nd-partes { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; }
.nd-parte { display: flex; flex-direction: column; gap: 3px; padding: 22px 24px; min-width: 0; font-size: 13.8px; color: var(--muted); }
.nd-parte strong { font-size: 16px; color: var(--ink); margin-bottom: 4px; overflow-wrap: anywhere; }
.nd-parte__rotulo { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 6px; }
.nd-parte__end { margin-top: 4px; }
.nd-partes__seta { display: grid; place-items: center; padding: 0 4px; color: var(--brand-300); }
.nd-partes__seta svg { width: 26px; height: 26px; }

.nd-itens td { vertical-align: top; }
.nd-itens__fiscal { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 12px; color: var(--muted); }
.nd-itens .table__primary { display: block; }
.nd-itens__mob { display: none; }

.nd-chave { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; background: var(--brand-50); border: 1px dashed var(--brand-300); }
.nd-chave code { flex: 1; min-width: 0; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 15px; font-weight: 600; letter-spacing: .04em; color: var(--brand-navy); overflow-wrap: anywhere; }
.nd-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 14px; font-weight: 600; }
.nd-link svg { width: 15px; height: 15px; }

.nd-obs { display: grid; gap: 14px; }
.nd-obs span { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nd-obs p { margin-top: 4px; font-size: 14.2px; color: var(--ink-2); }

.nd-xml summary, .nd-cancelar summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 20px; font-weight: 650; font-size: 15px;
}
.nd-xml summary::-webkit-details-marker, .nd-cancelar summary::-webkit-details-marker { display: none; }
.nd-xml summary small { font-weight: 500; color: var(--brand); font-size: 13px; }
.nd-xml[open] summary small { visibility: hidden; }
.nd-xml pre { margin: 0; max-height: 360px; white-space: pre-wrap; }
.nd-cancelar summary { color: var(--ko); }
.nd-cancelar summary svg { width: 18px; height: 18px; transition: transform .2s; }
.nd-cancelar[open] summary svg { transform: rotate(180deg); }
.nd-cancelar .card__body { padding-top: 0; }

.nd-valores { margin: 0; display: grid; gap: 9px; }
.nd-valores div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.nd-valores dt { color: var(--muted); }
.nd-valores dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.nd-valores__total { padding-top: 10px; border-top: 1px solid var(--line); }
.nd-valores__total dt { color: var(--ink); font-weight: 650; }
.nd-valores__total dd { font-size: 18px; font-weight: 800; color: var(--brand-navy); }
.nd-valores--mini div { font-size: 13.4px; }
.nd-valores__sub { margin: 18px 0 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); }

.nd-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.nd-timeline li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 0 0 18px 28px; font-size: 13.2px; color: var(--muted); }
.nd-timeline li:last-child { padding-bottom: 0; }
.nd-timeline li::before {
    content: ""; position: absolute; left: 0; top: 2px; width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: 2px solid var(--line);
}
.nd-timeline li:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 20px; bottom: 2px; width: 2px; background: var(--line); }
.nd-timeline li.is-done::before { background: var(--ok); border-color: var(--ok); }
.nd-timeline li.is-ko::before { background: var(--ko); border-color: var(--ko); }
.nd-timeline b { font-size: 14px; color: var(--ink); }
.nd-timeline code { font-size: 12.4px; color: var(--ink-2); }

@media (max-width: 1100px) {
    .nd-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
    .nd-hero { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
    .nd-hero__total { text-align: left; }
    .nd-hero__title { font-size: 22px; }
    .nd-hero__acoes .btn { flex: 1 1 auto; }
    .nd-partes { grid-template-columns: minmax(0, 1fr); }
    .nd-partes__seta { padding: 0; transform: rotate(90deg); height: 20px; }
    .nd-parte { padding: 18px 20px; }

    /* itens em cartões */
    .nd-itens thead { display: none; }
    .nd-itens, .nd-itens tbody, .nd-itens tr { display: block; width: 100%; }
    .nd-itens tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
    .nd-itens td { display: block; padding: 0; border: 0; text-align: left; }
    .nd-itens td:nth-child(1) { grid-column: 1; grid-row: 1; }
    .nd-itens td:nth-child(2) { grid-column: 2; grid-row: 1; }
    .nd-itens td:nth-child(7) { grid-column: 3; grid-row: 1; text-align: right; }
    .nd-itens td:nth-child(3), .nd-itens td:nth-child(4), .nd-itens td:nth-child(5), .nd-itens td:nth-child(6) { display: none; }
    .nd-itens__mob { display: block; margin-top: 3px; font-size: 12.8px; color: var(--ink-2); }
}

/* ------------------------------------------------------------ dashboards (db-) */

.db { display: flex; flex-direction: column; gap: 20px; }
.db-row { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.db-row--meio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.db-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.db .card__head .btn svg { width: 15px; height: 15px; }
.db-vazio { color: var(--muted); font-size: 14px; }

/* boas-vindas */
.db-welcome {
    position: relative; overflow: hidden; border-radius: var(--radius);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 28px; align-items: center;
    padding: 26px 28px; color: #fff;
    background:
        radial-gradient(480px 220px at 100% 0%, rgba(41, 182, 246, .35), transparent 60%),
        linear-gradient(135deg, var(--brand) 0%, var(--brand-navy) 100%);
    box-shadow: 0 14px 34px rgba(10, 42, 102, .18);
}
.db-welcome h2 { color: #fff; font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 6px; }
.db-welcome p { color: rgba(226, 236, 255, .85); font-size: 14.6px; }
.db-welcome b { color: #fff; }
.db-welcome__data { font-size: 12.5px !important; text-transform: uppercase; letter-spacing: .08em; font-weight: 650; }
.db-welcome__acoes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.db-atalho {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #fff;
    transition: background .15s, transform .15s;
}
.db-atalho:hover { background: rgba(255, 255, 255, .18); text-decoration: none; transform: translateY(-2px); }
.db-atalho__icone { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: #fff; color: var(--brand); }
.db-atalho__icone svg { width: 18px; height: 18px; }
.db-atalho b { display: block; font-size: 14px; white-space: nowrap; }
.db-atalho small { display: block; font-size: 12px; color: rgba(226, 236, 255, .78); white-space: nowrap; }

/* pendências */
.db-pendencias { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.db-pendencia {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 13.8px; font-weight: 550;
    border: 1px solid; transition: transform .15s, box-shadow .15s;
}
.db-pendencia:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.db-pendencia svg { width: 18px; height: 18px; flex: none; }
.db-pendencia span { flex: 1; }
.db-pendencia svg:last-child { width: 15px; height: 15px; opacity: .6; }
.db-pendencia--ko { background: var(--ko-soft); border-color: #fecaca; color: #991b1b; }
.db-pendencia--warn { background: var(--warn-soft); border-color: #fde68a; color: #92400e; }
.db-pendencia--info { background: var(--info-soft); border-color: #bae6fd; color: #075985; }

/* KPIs */
.db-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.db-kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.db-kpi__topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.db-kpi__rotulo { font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.db-kpi__icone { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.db-kpi__icone svg { width: 19px; height: 19px; }
.db-kpi__valor { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-kpi__rodape { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.8px; color: var(--muted); }
.db-var { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px 2px 4px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.db-var svg { width: 14px; height: 14px; }
.db-var--sobe { background: var(--ok-soft); color: var(--ok); }
.db-var--desce { background: var(--ko-soft); color: var(--ko); }

/* gráfico */
.db-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; height: 250px; }
.db-chart__eixo { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 24px; font-size: 11px; color: var(--muted-2); text-align: right; font-variant-numeric: tabular-nums; }
.db-chart__eixo span { transform: translateY(-50%); }
.db-chart__eixo span:last-child { transform: translateY(50%); }
.db-chart__area { position: relative; min-width: 0; }
.db-chart__grade { position: absolute; inset: 0 0 24px 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.db-chart__grade i { display: block; height: 1px; background: var(--line-soft); }
.db-chart__grade i:last-child { background: var(--line); }
.db-chart__barras { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 3px; }
.db-chart__col { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 24px; outline: none; }
.db-chart__barra {
    width: 100%; max-width: 22px; margin: 0 auto; min-height: 2px; border-radius: 5px 5px 2px 2px;
    background: linear-gradient(180deg, var(--brand-accent) 0%, var(--brand) 100%); opacity: .85;
    transition: opacity .15s, filter .15s;
}
.db-chart__col.is-hoje .db-chart__barra { background: linear-gradient(180deg, #34d399 0%, var(--ok) 100%); }
.db-chart__col:hover .db-chart__barra, .db-chart__col:focus .db-chart__barra { opacity: 1; filter: saturate(1.2); }
.db-chart__rotulo { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.db-chart__dica {
    position: absolute; bottom: calc(100% - 20px); left: 50%; transform: translate(-50%, 4px); z-index: 5;
    background: var(--brand-navy); color: #fff; border-radius: 9px; padding: 7px 10px; white-space: nowrap;
    font-size: 12px; box-shadow: var(--shadow); pointer-events: none; opacity: 0; transition: opacity .12s, transform .12s;
}
.db-chart__dica b { display: block; font-size: 13.5px; }
.db-chart__dica span { color: rgba(226, 236, 255, .8); }
.db-chart__col:hover .db-chart__dica, .db-chart__col:focus .db-chart__dica { opacity: 1; transform: translate(-50%, 0); }
.db-chart__col:first-child .db-chart__dica, .db-chart__col:nth-child(2) .db-chart__dica { left: 0; transform: translate(0, 4px); }
.db-chart__col:last-child .db-chart__dica, .db-chart__col:nth-last-child(2) .db-chart__dica { left: auto; right: 0; transform: translate(0, 4px); }
.db-chart__col:first-child:hover .db-chart__dica, .db-chart__col:nth-child(2):hover .db-chart__dica,
.db-chart__col:last-child:hover .db-chart__dica, .db-chart__col:nth-last-child(2):hover .db-chart__dica { transform: none; }
.db-chart-vazio { height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; color: var(--muted); font-size: 13.6px; border: 1px dashed var(--line); border-radius: 12px; }
.db-chart-vazio svg { width: 30px; height: 30px; color: var(--brand-300); margin-bottom: 6px; }
.db-chart-vazio strong { color: var(--ink-2); }

/* por tipo */
.db-empilhado { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--line-soft); gap: 2px; margin-bottom: 16px; }
.db-empilhado i { display: block; min-width: 4px; }
.db-legenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.db-legenda li { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "cor nome valor" "cor qtd valor"; gap: 0 10px; align-items: center; font-size: 14px; }
.db-legenda i { grid-area: cor; width: 10px; height: 10px; border-radius: 3px; }
.db-legenda span { grid-area: nome; font-weight: 600; }
.db-legenda small { grid-area: qtd; color: var(--muted); font-size: 12.4px; }
.db-legenda b { grid-area: valor; font-variant-numeric: tabular-nums; }

/* plano */
.db-plano__topo { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.db-plano__topo strong { display: block; font-size: 16px; }
.db-medidor { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.db-medidor i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand-accent), var(--brand)); }
.db-medidor.is-warn i { background: #f59e0b; }
.db-medidor.is-ko i { background: var(--ko); }
.db-plano__dica { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* últimas notas */
.db-notas { list-style: none; margin: 0; padding: 0; }
.db-notas li + li { border-top: 1px solid var(--line-soft); }
.db-notas a { display: flex; align-items: center; gap: 14px; padding: 13px 20px; color: inherit; transition: background .12s; }
.db-notas a:hover { background: var(--brand-50); text-decoration: none; }
.db-notas__tipo { width: 58px; flex: none; text-align: center; padding: 6px 0; border-radius: 9px; font-size: 11.5px; font-weight: 750; background: var(--brand-soft); color: var(--brand); }
.db-notas__tipo--nfce { background: #e0f4fd; color: #0369a1; }
.db-notas__tipo--nfse { background: #e6ebf5; color: var(--brand-navy); }
.db-notas__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.db-notas__info b { font-size: 14.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-notas__info small { font-size: 12.5px; color: var(--muted); }
.db-notas__valor { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.db-notas__valor b { font-size: 14.2px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* rankings */
.db-ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.db-ranking li { display: flex; align-items: center; gap: 12px; }
.db-ranking__pos { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--line-soft); color: var(--muted); font-size: 12.5px; font-weight: 750; }
.db-ranking li:first-child .db-ranking__pos { background: var(--brand); color: #fff; }
.db-ranking__info { flex: 1; min-width: 0; }
.db-ranking__info > div:first-child { display: flex; justify-content: space-between; gap: 10px; font-size: 13.8px; margin-bottom: 5px; }
.db-ranking__info b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-ranking__info span { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.db-ranking__barra { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.db-ranking__barra i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-accent)); }

/* saúde / status */
.db-status { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.db-status__item { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; color: inherit; }
.db-status__item:hover { text-decoration: none; border-color: var(--brand-300); }
.db-status__item b { font-size: 22px; font-weight: 800; }
.db-status__item span { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.db-status__item span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.db-status__item--ok span::before { background: var(--ok); }
.db-status__item--warn span::before { background: #f59e0b; }
.db-status__item--ko span::before { background: var(--ko); }
.db-info-lista { margin: 14px 0 0; display: grid; gap: 8px; }
.db-info-lista div { display: flex; justify-content: space-between; gap: 10px; font-size: 13.6px; }
.db-info-lista dt { color: var(--muted); }
.db-info-lista dd { margin: 0; font-weight: 650; }

@media (max-width: 1280px) {
    .db-welcome { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1200px) {
    .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .db-row, .db-row--meio { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .db-welcome { padding: 22px 20px; }
    .db-welcome h2 { font-size: 22px; }
    .db-welcome__acoes { grid-template-columns: minmax(0, 1fr); }
    .db-kpis { gap: 12px; }
    .db-kpi { padding: 14px 16px; }
    .db-kpi__valor { font-size: 21px; }
    .db-kpi__icone { width: 32px; height: 32px; }
    .db-chart { height: 210px; }
    .db-chart__barras { gap: 2px; }
    .db-notas a { padding: 12px 16px; gap: 10px; }
    .db-notas__tipo { width: 50px; }
}
@media (max-width: 420px) {
    .db-kpis { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------- responsivo */

@media (max-width: 1200px) {
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid--main, .grid--side { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }
    .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .sidebar__close { display: block; }
    .topbar__burger { display: grid; }
    .app-content { padding: 20px 18px 34px; }
    .topbar { padding: 0 18px; }
    .feature-grid, .pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth__main { padding: 32px 18px; }
    .auth__aside { display: none; }
}

@media (max-width: 760px) {
    body { font-size: 14.6px; }
    .grid--2, .grid--3, .grid--4, .form-grid, .form-grid--3, .form-grid--4 { grid-template-columns: minmax(0, 1fr); }
    .form-field--3, .form-field--2 { grid-column: auto; }
    .detail-list { grid-template-columns: minmax(0, 1fr); }
    .feature-grid, .pricing { grid-template-columns: minmax(0, 1fr); }
    .topbar__title { font-size: 17px; }
    .user-menu__name { display: none; }
    .app-footer { padding: 16px 18px 22px; flex-direction: column; gap: 4px; }
    .app-footer__sep { display: none; }
    .landing-nav__links { display: none; }
    .landing-nav__inner { padding: 12px 16px; }
    .section { padding: 52px 18px; }
    .hero { padding: 52px 18px 58px; }
    .hero__stats { gap: 26px; }
    .page-head { flex-direction: column; align-items: stretch; }
    .filters { padding: 14px 16px; }
    .filters .form-field { flex: 1 1 100%; }
    .card__head, .card__body { padding: 16px; }
    .kpi__value { font-size: 23px; }
}

@media (max-width: 480px) {
    .btn { width: 100%; }
    .btn-row .btn { width: 100%; }
    .topbar__right .btn--primary span { display: none; }
    .hero__actions .btn { width: 100%; }
    .landing-nav .btn, .landing-footer .btn { width: auto; }
    .card__head .btn { width: auto; }
    .landing-nav .brand__text { display: none; }
    .topbar__subtitle { display: none; }
}

@media print {
    .sidebar, .topbar, .app-footer, .btn, .overlay { display: none !important; }
    .app-content { padding: 0; }
}
.nd-itens td.num { white-space: nowrap; }

/* ------------------------------------------------------ botões de ícone */
.btn .svg-inline, .btn > svg { width: 17px; height: 17px; flex: none; }
.table__actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.table__actions form { display: inline-flex; margin: 0; }
.btn-icon {
    width: 36px; height: 36px; flex: none;
    display: inline-grid; place-items: center;
    border-radius: 10px; border: 1px solid var(--line); background: #fff;
    color: var(--muted); cursor: pointer; padding: 0;
    transition: background .15s, color .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.btn-icon svg { width: 17px; height: 17px; }
.btn-icon:hover { text-decoration: none; color: var(--brand); border-color: var(--brand-300); background: var(--brand-50); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-icon--edit { color: var(--brand); }
.btn-icon--danger { color: var(--ko); }
.btn-icon--danger:hover { color: #fff; background: var(--ko); border-color: var(--ko); }
.btn-icon:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ------------------------------------------------------- SweetAlert2 (tema) */
.swal-ef { font-family: var(--font) !important; border-radius: 18px !important; }
.swal-ef .swal2-title { font-size: 21px; font-weight: 750; color: var(--ink); letter-spacing: -.01em; }
.swal-ef .swal2-html-container { font-size: 15px; color: var(--muted); }
.swal-ef .swal2-actions { gap: 4px; }
.swal-ef .swal2-styled { border-radius: 10px !important; font-weight: 650 !important; font-size: 14.5px !important; padding: 10px 20px !important; }
.swal-ef .swal2-styled:focus { box-shadow: 0 0 0 3px rgba(21, 96, 212, .25) !important; }
.swal-ef--toast { border-radius: 14px !important; box-shadow: 0 14px 34px rgba(10, 42, 102, .18) !important; }
.swal-ef--toast .swal2-title { font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.swal-ef--toast .swal2-timer-progress-bar { background: var(--brand-300); }

.db-avatar { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-navy)); color: #fff; font-size: 13px; font-weight: 750; }
.db-ranking__info a { color: inherit; }
.db-ranking .db-kpi__icone { width: 32px; height: 32px; }
.db-notas--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.db-notas--grid li + li { border-top: 0; }
.db-notas--grid li { border-bottom: 1px solid var(--line-soft); }
.db-notas--grid li:nth-child(odd) { border-right: 1px solid var(--line-soft); }
@media (max-width: 900px) {
    .db-notas--grid { grid-template-columns: minmax(0, 1fr); }
    .db-notas--grid li:nth-child(odd) { border-right: 0; }
}

/* cards da mesma linha com a mesma altura (sem buracos entre as colunas) */
.db-row { align-items: stretch; }
.db-row > .card, .db-stack > .card:last-child { display: flex; flex-direction: column; }
.db-stack > .card:last-child { flex: 1; }
.db-row > .card > .card__body { flex: 1; display: flex; flex-direction: column; }
.db-row > .card > .card__body > .db-chart, .db-row > .card > .card__body > .db-chart-vazio { flex: 1; min-height: 250px; height: auto; }
.db-row > .card > .db-notas { flex: 1; }
@media (max-width: 1200px) {
    .db-row > .card > .card__body > .db-chart { min-height: 240px; flex: none; height: 240px; }
}
.db-row--tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-row > .card > .card__body > .db-chart { max-height: 320px; }
@media (max-width: 1200px) { .db-row--tres { grid-template-columns: minmax(0, 1fr); } }
.db-row--tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-row > .card > .card__body > .db-chart { max-height: 330px; }
@media (max-width: 1200px) { .db-row--tres { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------- detalhe da empresa (td-) */
.td-hero { grid-template-columns: minmax(0, 1fr) auto; }
.td-hero__id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.td-hero__avatar { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 18px; background: #fff; color: var(--brand-navy); font-size: 22px; font-weight: 800; }
.td-hero h2 { margin-top: 0; overflow-wrap: anywhere; }
.td-hero .badge { background: #fff; }
.td-hero__acoes { margin: 0; }
.td-hero__acoes .btn--secondary { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .3); color: #fff; box-shadow: none; }
.td-hero__acoes .btn--primary { background: #fff; color: var(--brand-navy); }
.td-config { display: flex; flex-direction: column; gap: 12px; }
.td-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.td-switch:has(input:checked) { border-color: var(--brand-300); background: var(--brand-50); }
.td-switch b { display: block; font-size: 14.5px; }
.td-switch small { display: block; font-size: 12.5px; color: var(--muted); }
.td-switch input { position: absolute; opacity: 0; pointer-events: none; }
.td-switch i { position: relative; width: 42px; height: 24px; flex: none; border-radius: 999px; background: #cbd5e1; transition: background .15s; }
.td-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.td-switch input:checked + i { background: var(--brand); }
.td-switch input:checked + i::after { transform: translateX(18px); }
.td-switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }
.td-dl { margin-top: 0; }
.td-dl dd { text-align: right; overflow-wrap: anywhere; }
.td-membros { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line-soft); display: grid; gap: 6px; font-size: 13.6px; }
.td-membros small { color: var(--muted); }
.td-perigo { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.db-notas__linha { display: flex; align-items: center; gap: 14px; padding: 13px 20px; }
@media (max-width: 760px) {
    .td-hero { grid-template-columns: minmax(0, 1fr); }
    .td-hero__id { align-items: flex-start; }
    .td-hero__avatar { width: 52px; height: 52px; font-size: 18px; }
    .db-notas__linha { padding: 12px 16px; gap: 10px; }
}

/* filtros dos relatórios/listas do painel */
.filtros-painel { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(5, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.filtros-painel .form-field { min-width: 0; }
.filtros-painel__acoes { display: flex; gap: 8px; }
@media (max-width: 1280px) { .filtros-painel { grid-template-columns: repeat(3, minmax(0, 1fr)); } .filtros-painel .form-field--grow { grid-column: 1 / -1; } }
@media (max-width: 640px) { .filtros-painel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .filtros-painel__acoes { grid-column: 1 / -1; } .filtros-painel__acoes .btn { flex: 1; } }
.table .db-notas__tipo { display: inline-block; width: 52px; padding: 4px 0; }

/* relatório do painel */
.rel-atalhos { display: flex; gap: 8px; flex-wrap: wrap; padding: 16px 20px 0; }
.rel-atalho { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); background: #fff; }
.rel-atalho:hover { text-decoration: none; border-color: var(--brand-300); color: var(--brand); }
.rel-atalho.is-ativo { background: var(--brand); border-color: var(--brand); color: #fff; }
.filtros-painel--rel { grid-template-columns: minmax(200px, 2fr) repeat(6, minmax(0, 1fr)) auto; }
@media (max-width: 1400px) { .filtros-painel--rel { grid-template-columns: repeat(4, minmax(0, 1fr)); } .filtros-painel--rel .form-field--grow { grid-column: 1 / -1; } }
@media (max-width: 640px) { .filtros-painel--rel { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rel-de { font-size: 14px; font-weight: 600; color: var(--muted); }
.rel-col-fat { min-width: 170px; text-align: right; }
.rel-col-fat b { display: block; margin-bottom: 5px; font-variant-numeric: tabular-nums; }

.auth__status { text-align: center; }
.auth__status .btn { margin-top: 6px; }
.auth__status-icone { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.auth__status-icone svg { width: 30px; height: 30px; }
.auth__status-icone--ok { background: var(--ok-soft); color: var(--ok); }
.auth__status-icone--ko { background: var(--ko-soft); color: var(--ko); }
.auth__esqueci { display: block; text-align: right; font-size: 13.4px; margin-top: -8px; }

.nd-email summary { color: var(--brand); }
.user-menu__avatar { overflow: hidden; } .user-menu__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* foto de perfil */
.perfil-foto .card__body { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.perfil-foto__avatar {
    position: relative; width: 104px; height: 104px; flex: none; border-radius: 50%; overflow: hidden;
    display: grid; place-items: center; font-size: 34px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-navy));
    box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--brand-soft), 0 10px 24px rgba(10, 42, 102, .18);
}
.perfil-foto__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.perfil-foto__avatar.is-enviando::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, .45); }
.perfil-foto__info { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.perfil-foto__info strong { font-size: 18px; }
.perfil-foto__info small { color: var(--muted); font-size: 13.6px; }
.perfil-foto__acoes { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 6px; }
.perfil-foto__acoes form { margin: 0; }
.perfil-foto__acoes label.btn { cursor: pointer; }
@media (max-width: 480px) { .perfil-foto__acoes .btn { width: auto; } }

/* assinatura / expiração */
.aviso-expiracao { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 18px; border-radius: 12px; background: var(--warn-soft); border: 1px solid #fde68a; color: #92400e; font-size: 14px; }
.aviso-expiracao svg { width: 20px; height: 20px; flex: none; }
.bloqueio { max-width: 620px; margin: 40px auto; padding: 44px 36px; text-align: center; }
.bloqueio__icone { width: 76px; height: 76px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: var(--warn-soft); color: var(--warn); }
.bloqueio__icone svg { width: 36px; height: 36px; }
.bloqueio h2 { font-size: 23px; color: var(--brand-navy); margin-bottom: 10px; }
.bloqueio p { color: var(--muted); font-size: 15.2px; line-height: 1.65; }
.bloqueio__acoes { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 26px 0 14px; }
.bloqueio__contato { color: var(--muted-2); font-size: 13px; }
.assinatura--warn { border-color: #fde68a; }
.assinatura--ko { border-color: #fecaca; }
.assinatura .card__body { display: flex; flex-direction: column; gap: 16px; }
.assinatura__validade { padding: 14px 16px; border-radius: 12px; background: var(--brand-50); display: flex; flex-direction: column; }
.assinatura--warn .assinatura__validade { background: var(--warn-soft); }
.assinatura--ko .assinatura__validade { background: var(--ko-soft); }
.assinatura__validade span { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; color: var(--muted); }
.assinatura__validade strong { font-size: 24px; font-weight: 800; color: var(--brand-navy); }
.assinatura__validade small { font-size: 13px; color: var(--muted); }
.assinatura__rapido, .assinatura__data { margin: 0; }
.assinatura__rotulo { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.assinatura__botoes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.assinatura__botoes .btn { width: 100%; }
.assinatura__data { display: flex; gap: 8px; align-items: flex-end; }
.assinatura__data .form-field { flex: 1; }
/* colunas independentes (sem esticar o último card até a altura da outra coluna) */
.db-row--livre { align-items: start; }
.db-row--livre .db-stack > .card:last-child { flex: none; }

/* assinatura / pagamento */
.as-topo--ko { background: linear-gradient(135deg, #b45309 0%, #7c2d12 100%); }
.as-cobranca { border-color: #fde68a; }
.as-cobranca__corpo { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.as-cobranca__dados { flex: 1; min-width: 260px; }
.as-qrcode { width: 200px; height: 200px; border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: #fff; }
.as-passos { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 6px; font-size: 14.2px; color: var(--ink-2); }
.as-rotulo { display: block; font-size: 12.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.as-copiar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px dashed var(--brand-300); border-radius: 12px; background: var(--brand-50); }
.as-copiar code { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 13px; color: var(--brand-navy); overflow-wrap: anywhere; max-height: 66px; overflow: hidden; }
.as-aviso { display: flex; gap: 12px; padding: 16px; border-radius: 12px; background: var(--info-soft); border: 1px solid #bae6fd; color: #075985; }
.as-aviso svg { width: 22px; height: 22px; flex: none; }
.as-aviso p { margin-top: 4px; font-size: 14px; }
.as-form { display: flex; flex-direction: column; gap: 18px; }
.as-periodos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.as-periodo { position: relative; cursor: pointer; }
.as-periodo input { position: absolute; opacity: 0; }
.as-periodo span { display: flex; flex-direction: column; gap: 2px; padding: 16px; border: 2px solid var(--line); border-radius: 14px; transition: border-color .15s, background .15s; }
.as-periodo b { font-size: 14px; color: var(--muted); }
.as-periodo strong { font-size: 22px; font-weight: 800; color: var(--brand-navy); }
.as-periodo small { font-size: 12.5px; color: var(--muted); }
.as-periodo input:checked + span { border-color: var(--brand); background: var(--brand-50); }
.as-periodo input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.as-formas { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .as-periodos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .as-qrcode { margin: 0 auto; } }

.as-historico { padding-top: 14px; border-top: 1px solid var(--line-soft); display: grid; gap: 8px; }
.as-historico__item { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
