/* ═══════════════════════════════════════════════
   Fiscora — Glassmorphism Design System
   ═══════════════════════════════════════════════ */

/* O atributo hidden sempre esconde, mesmo em elementos com display próprio (ex.: .btn-sync) */
[hidden] { display: none !important; }

:root {
    --bg: #0a0a1a;
    --glass: rgba(255,255,255,0.04);
    --glass-border: rgba(255,255,255,0.08);
    --glass-hover: rgba(255,255,255,0.07);
    --accent: #6366f1;
    --accent-glow: rgba(99,102,241,0.3);
    --accent-light: #818cf8;
    --success: #10b981;
    --success-glow: rgba(16,185,129,0.2);
    --warning: #f59e0b;
    --warning-glow: rgba(245,158,11,0.2);
    --error: #ef4444;
    --text-primary: #f1f5f9;
    --text-secondary: rgba(241,245,249,0.6);
    --text-muted: rgba(241,245,249,0.35);
    --gradient-1: #6366f1;
    --gradient-2: #8b5cf6;
    --gradient-3: #06b6d4;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --page-padding: 32px;
    --section-gap: 24px;
    --card-padding: 24px;
    --grid-gap: 16px;
    --control-height: 40px;
    --bottom-nav-height: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ─── Animated Gradient Orbs ─── */

.gradient-orbs {
    position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none;
}
.orb {
    position: absolute; border-radius: 50%;
}
.orb-1 {
    width: 600px; height: 600px; top: -96px; right: -96px;
    background: radial-gradient(circle, rgba(99,102,241,0.13), transparent 70%);
    animation: orbFloat1 20s ease-in-out infinite;
}
.orb-2 {
    width: 504px; height: 504px; bottom: -48px; left: -96px;
    background: radial-gradient(circle, rgba(139,92,246,0.09), transparent 70%);
    animation: orbFloat2 25s ease-in-out infinite;
}
.orb-3 {
    width: 400px; height: 400px; top: 40%; left: 50%;
    background: radial-gradient(circle, rgba(6,182,212,0.08), transparent 70%);
    animation: orbFloat3 18s ease-in-out infinite;
}

/* ─── Layout ─── */

.app-layout {
    display: flex; min-height: 100vh; min-height: 100dvh; position: relative; z-index: 1;
}

/* ─── Sidebar ─── */

.sidebar {
    width: 72px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
    align-items: center; padding: 24px 0; gap: 8px;
    background: rgba(255,255,255,0.02);
    border-right: 1px solid var(--glass-border);
    z-index: 10;
}
.sidebar-logo {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    box-shadow: 0 4px 20px var(--accent-glow);
    font-size: 18px; font-weight: 700; margin-bottom: 24px; color: white;
}
.nav-items { display: flex; flex-direction: column; gap: 8px; }
.nav-btn {
    width: 48px; height: 48px; border-radius: 12px; border: 1px solid transparent;
    background: transparent; color: var(--text-muted);
    cursor: pointer; transition: all 0.3s ease; display: flex;
    align-items: center; justify-content: center;
}
.nav-btn svg { width: 20px; height: 20px; stroke-width: 1.75; transition: all 0.3s ease; }
.nav-btn:hover { background: rgba(255,255,255,0.04); color: var(--text-secondary); }
.nav-btn.active {
    background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.3);
    color: var(--accent-light);
}
.sidebar-spacer { flex: 1; }
.sidebar-avatar {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, var(--gradient-3), var(--gradient-2));
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; cursor: pointer; color: white;
}

/* ─── Main Content ─── */

.main-content {
    flex: 1; min-width: 0; padding: var(--page-padding); overflow-y: auto;
    max-height: 100vh; max-height: 100dvh;
}

/* ─── Header ─── */

.header {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
    gap: var(--grid-gap); margin-bottom: var(--section-gap);
}
.header-title-row { display: flex; align-items: center; gap: 8px; }
.header-title {
    font-size: 26px; font-weight: 700; letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.version-badge {
    padding: 0 8px; line-height: 24px; border-radius: 8px; font-size: 10px; font-weight: 600;
    background: rgba(99,102,241,0.15); color: var(--accent-light);
    border: 1px solid rgba(99,102,241,0.2); letter-spacing: 0.08em;
    text-transform: uppercase;
}
.header-subtitle { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.header-right { display: flex; flex-wrap: wrap; align-items: center; gap: var(--grid-gap); }

/* ─── Search ─── */

.search-box { position: relative; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
.search-box input {
    width: 256px; min-height: var(--control-height); padding: 0 16px 0 40px; border-radius: 12px;
    background: var(--glass); border: 1px solid var(--glass-border);
    color: var(--text-primary); font-size: 13px; font-family: var(--font-body);
    outline: none; backdrop-filter: blur(10px);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.search-box input:focus {
    border-color: rgba(99,102,241,0.4);
    box-shadow: 0 0 20px var(--accent-glow);
}
.search-box input::placeholder { color: var(--text-muted); }

/* ─── Buttons ─── */

.btn-sync {
    min-height: var(--control-height); padding: 0 24px; border-radius: 12px; border: none;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white; font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: var(--font-body); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 20px var(--accent-glow);
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-sync:hover { transform: translateY(-1px); box-shadow: 0 6px 28px var(--accent-glow); }
.btn-sync:active { transform: translateY(0); }
.btn-sync.loading { opacity: 0.7; pointer-events: none; }

.btn-cancel {
    min-height: var(--control-height); padding: 0 24px; border-radius: 12px; border: 1px solid var(--glass-border);
    background: var(--glass); color: var(--text-secondary); font-size: 13px;
    font-weight: 500; cursor: pointer; font-family: var(--font-body);
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
    transition: all 0.3s;
}
.btn-cancel:hover { background: var(--glass-hover); }

/* ─── Glass Card ─── */

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px; padding: var(--card-padding);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
    background: var(--glass-hover);
    border-color: rgba(255,255,255,0.12);
}

/* ─── Stats Grid ─── */

.stats-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--grid-gap);
}
.stat-card { cursor: default; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.stat-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.stat-label {
    font-size: 12px; color: var(--text-muted); font-weight: 500;
    margin-bottom: 8px; letter-spacing: 0.04em; text-transform: uppercase;
}
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.stat-icon {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; color: var(--accent);
}
.stat-icon svg { width: 20px; height: 20px; stroke-width: 1.75; }
.sparkline { width: 100%; display: block; }
.stat-change { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--text-muted); }
.stat-change.positive span { color: var(--success); font-weight: 600; }
.stat-change.negative span { color: var(--error); font-weight: 600; }
.stat-change.neutral span { color: var(--text-secondary); font-weight: 600; }
.stat-change:empty { visibility: hidden; }

/* ─── Content Grid ─── */

.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--grid-gap); }
.content-grid > * { min-width: 0; }

/* ─── Table ─── */

.table-card { padding: 0; }
.table-card:hover { background: var(--glass); transform: none; }
.table-header {
    padding: 16px var(--card-padding); display: flex; flex-wrap: wrap; gap: 16px;
    justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--glass-border);
}
.table-header h2 { font-size: 16px; font-weight: 600; }
.table-subtitle { font-size: 12px; color: var(--text-muted); }

.live-indicator { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--success); font-weight: 500; }
.pulse-dot {
    position: relative; width: 8px; height: 8px; display: inline-block;
}
.pulse-dot::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: var(--success); opacity: 0.6;
    animation: pulse 2s ease-in-out infinite;
}
.pulse-dot::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: var(--success);
}

.table-wrapper { overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; }
.table-wrapper table { min-width: 640px; }
th {
    padding: 8px 16px; height: 40px; text-align: left; font-size: 11px;
    color: var(--text-muted); font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; border-bottom: 1px solid var(--glass-border);
}
td { padding: 16px; font-size: 13px; }
tr { transition: background 0.2s; cursor: pointer; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
.nota-id { font-family: var(--font-mono); color: var(--accent-light); font-weight: 500; font-size: 12px; }
.empresa-name { font-weight: 500; }
.empresa-cnpj { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.servico-text { font-size: 12px; color: var(--text-secondary); }
.valor-text { font-weight: 600; font-family: var(--font-mono); }
.empty-state { text-align: center; color: var(--text-muted); padding: 40px 24px !important; }

/* ─── Status Badges ─── */

.status-badge {
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    padding: 0 8px; line-height: 24px; border-radius: 24px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.status-badge .dot {
    width: 8px; height: 8px; border-radius: 50%;
}
.status-autorizada { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.status-autorizada .dot { background: #34d399; box-shadow: 0 0 6px #34d399; }
.status-cancelada { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.status-cancelada .dot { background: #f87171; box-shadow: 0 0 6px #f87171; }
.status-substituida { background: rgba(148,163,184,0.12); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.2); }
.status-substituida .dot { background: #cbd5e1; box-shadow: 0 0 6px #cbd5e1; }
.status-pendente { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }
.status-pendente .dot { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.status-processando { background: rgba(99,102,241,0.12); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.2); }
.status-processando .dot { background: #a5b4fc; box-shadow: 0 0 6px #a5b4fc; }

/* ─── Right Panel ─── */

.right-panel { display: flex; flex-direction: column; gap: var(--grid-gap); }
.sync-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sync-header h3 { font-size: 14px; font-weight: 600; }
.sync-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.progress-ring-container { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.progress-ring { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 4; }
.ring-fill {
    fill: none; stroke: var(--accent); stroke-width: 4;
    stroke-linecap: round; stroke-dasharray: 175.93; stroke-dashoffset: 175.93;
    transition: stroke-dashoffset 1s ease-out;
}
.ring-label {
    position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; font-size: 14px; font-weight: 700;
}
.sync-count { font-size: 13px; font-weight: 500; }
.sync-sub { font-size: 11px; color: var(--text-muted); }
.sync-auto { font-size: 11px; color: var(--accent-light); margin: 8px 0 16px; }
.sync-auto.desligado { color: var(--text-muted); }
.sync-badges { display: flex; gap: 8px; }
.sync-badge {
    flex: 1; padding: 8px 0; border-radius: 12px; text-align: center;
}
.sync-badge.ok { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.2); }
.sync-badge.pending { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2); }
.sync-badge.error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); }
.badge-val { font-size: 18px; font-weight: 700; }
.sync-badge.ok .badge-val { color: var(--success); }
.sync-badge.pending .badge-val { color: var(--warning); }
.sync-badge.error .badge-val { color: var(--error); }
.badge-lbl { font-size: 10px; color: var(--text-muted); }

/* ─── Clients List ─── */

.clients-card { flex: 1; padding: 0; overflow: hidden; }
.clients-card:hover { transform: none; background: var(--glass); }
.clients-header {
    padding: 16px var(--card-padding); display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--glass-border);
}
.clients-header h3 { font-size: 14px; font-weight: 600; }
.link-btn { font-size: 12px; color: var(--accent-light); cursor: pointer; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
button.link-btn { background: none; border: none; padding: 0; font-family: inherit; text-align: left; }
.clients-list { max-height: 320px; overflow-y: auto; padding: 8px 0; }
.client-item {
    display: flex; align-items: center; gap: 16px;
    padding: 8px var(--card-padding); min-height: 48px; cursor: pointer; transition: background 0.2s;
    border-left: 2px solid transparent;
}
.client-item:hover { background: rgba(255,255,255,0.02); }
.client-item.selected { border-left-color: var(--accent); background: rgba(99,102,241,0.05); }
.client-avatar {
    width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600;
}
.client-info { flex: 1; min-width: 0; }
.client-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-cnpj { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.client-notas { text-align: right; }
.client-notas-val { font-size: 13px; font-weight: 600; }
.client-notas-lbl { font-size: 9px; color: var(--text-muted); }
.client-status {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.client-status.sync { background: var(--success); box-shadow: 0 0 6px var(--success); }
.client-status.pendente { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.client-status.erro { background: var(--error); box-shadow: 0 0 6px var(--error); }

/* ─── Modal ─── */

.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.modal-card { width: 480px; max-width: 100%; max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal-card h2 { font-size: 18px; font-weight: 600; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 12px; color: var(--text-muted);
    font-weight: 500; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em;
}
.form-group input {
    width: 100%; min-height: var(--control-height); padding: 8px 16px; border-radius: 8px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--glass-border);
    color: var(--text-primary); font-size: 13px; font-family: var(--font-body);
    outline: none; transition: border-color 0.3s;
}
.form-group input:focus { border-color: rgba(99,102,241,0.4); }
.form-group input::placeholder { color: var(--text-muted); }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 24px; }

/* ─── Login ─── */

.login-overlay { z-index: 200; background: rgba(10,10,26,0.85); }
.login-card h2 { margin-bottom: 8px; }
.login-logo { margin-bottom: 24px; }
.login-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; }
.form-error {
    font-size: 13px; color: #f87171; margin-top: 8px;
    padding: 8px 16px; border-radius: 8px; background: rgba(239,68,68,0.1);
}
.sidebar-avatar { border: none; font-family: var(--font-body); }

/* ─── Conferência ─── */

.conf-label { font-size: 12px; color: var(--text-muted); align-self: center; text-transform: uppercase; letter-spacing: 0.04em; }
.conf-resumo { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.conf-pill { font-size: 12px; font-weight: 600; padding: 8px 16px; line-height: 16px; border-radius: 999px; border: 1px solid var(--glass-border); }
.conf-pill.critico { color: #f87171; background: rgba(239,68,68,0.1); }
.conf-pill.atencao { color: #fbbf24; background: rgba(245,158,11,0.1); }
.conf-pill.info { color: #818cf8; background: rgba(99,102,241,0.1); }
.conf-avisos { display: flex; flex-direction: column; gap: var(--grid-gap); }
.conf-aviso { border-left: 4px solid var(--glass-border); padding: 16px var(--card-padding); }
.conf-aviso.critico { border-left-color: var(--error); }
.conf-aviso.atencao { border-left-color: var(--warning); }
.conf-aviso.info { border-left-color: var(--accent); }
.conf-aviso-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.conf-gravidade { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.conf-gravidade.critico { color: #f87171; }
.conf-gravidade.atencao { color: #fbbf24; }
.conf-gravidade.info { color: #818cf8; }
.conf-cliente { font-size: 12px; color: var(--text-secondary); }
.conf-titulo { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.conf-detalhe { font-size: 13px; color: var(--text-secondary); line-height: 1.5; overflow-wrap: anywhere; }
.conf-acao { font-size: 13px; margin: 8px 0; color: var(--text-primary); }
.conf-vazio { text-align: center; color: var(--success); font-weight: 600; }
[data-theme="light"] .conf-pill.critico, [data-theme="light"] .conf-gravidade.critico { color: #b91c1c; }
[data-theme="light"] .conf-pill.atencao, [data-theme="light"] .conf-gravidade.atencao { color: #b45309; }
[data-theme="light"] .conf-pill.info, [data-theme="light"] .conf-gravidade.info { color: #4338ca; }

/* ─── Exportação para o Domínio ─── */

.btn-exportar { white-space: nowrap; }
.btn-exportar:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.badge-exportada {
    display: inline-block; margin-left: 8px; font-size: 10px; font-weight: 600; padding: 0 8px; line-height: 16px;
    border-radius: 8px; color: #818cf8; background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.2);
}
[data-theme="light"] .badge-exportada { color: #4338ca; }

/* ─── IBS/CBS na tabela de notas ─── */

.ibscbs-cell { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); white-space: nowrap; line-height: 1.5; }
.ibscbs-vazio { color: var(--text-muted); }

/* ─── Página pública de convite ─── */

.convite-body { overflow: auto; }
.convite-wrap {
    position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 32px 16px calc(32px + env(safe-area-inset-bottom)); gap: 16px;
}
.convite-card { width: 100%; max-width: 480px; }
.convite-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.convite-rodape { font-size: 12px; color: var(--text-muted); }
.mono { font-family: var(--font-mono); }

/* ─── Certificado ─── */

.convite-bloco {
    margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--glass-border);
}
.cert-convite-status { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.cert-convite-link {
    font-family: var(--font-mono); font-size: 11px; display: block; margin-top: 8px;
    padding: 8px 16px; border-radius: 8px; overflow-wrap: anywhere; background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2); color: var(--accent-light);
}
.cert-pill.convite { color: #818cf8; background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.25); }
[data-theme="light"] .cert-pill.convite { color: #4338ca; }

.cert-pill {
    font-size: 10px; font-weight: 600; padding: 0 8px; line-height: 16px; border-radius: 8px; margin-top: 8px;
    display: inline-block; cursor: pointer; border: 1px solid transparent; font-family: var(--font-body);
    background: none; letter-spacing: 0.02em;
}
.cert-pill.ok { color: #34d399; background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); }
.cert-pill.alerta { color: #fbbf24; background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.2); }
.cert-pill.ausente { color: #f87171; background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.2); }
.cert-atual {
    font-size: 13px; margin-bottom: 16px; padding: 16px; border-radius: 12px;
    background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); line-height: 1.6;
    overflow-wrap: anywhere;
}
.cert-atual:empty { display: none; }
.cert-aviso { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
[data-theme="light"] .form-error { color: #b91c1c; }
[data-theme="light"] .cert-pill.ok { color: #047857; }
[data-theme="light"] .cert-pill.alerta { color: #b45309; }
[data-theme="light"] .cert-pill.ausente { color: #b91c1c; }

/* ─── Footer ─── */

.footer {
    padding: 16px 0; text-align: center;
    border-top: 1px solid var(--glass-border);
    font-size: 11px; color: var(--text-muted);
}

/* ─── Animations ─── */

.fade-in {
    opacity: 0; transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 40px) scale(1.1); }
    66% { transform: translate(20px, -20px) scale(0.95); }
}
@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 30px) scale(0.9); }
}
@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -30px) scale(1.15); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(2.2); opacity: 0; }
}

/* ════════════════════════════════════════════
   View de Notas Fiscais
   ════════════════════════════════════════════ */

/* ─── KPI Bar ─── */

.notas-kpi-bar {
    display: flex; align-items: center; gap: 0;
    background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 0; overflow: hidden;
}
.kpi-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 16px 24px; gap: 8px; text-align: center; min-width: 0;
    position: relative;
}
.kpi-item:not(:last-child)::after {
    content: ''; position: absolute; right: 0; top: 20%; bottom: 20%;
    width: 1px; background: var(--glass-border);
}
.kpi-val {
    font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1; overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
.kpi-val.accent { color: var(--accent-light); }
.kpi-val.success { color: var(--success); }
.kpi-lbl {
    font-size: 11px; font-weight: 500; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.kpi-status-bar {
    display: flex; width: 80%; height: 4px; border-radius: 2px;
    overflow: hidden; background: rgba(255,255,255,0.06);
}
.kpi-status-aut { height: 100%; background: var(--success); transition: width 0.5s ease; }
.kpi-status-can { height: 100%; background: var(--error); transition: width 0.5s ease; }
.kpi-status-pen { height: 100%; background: var(--warning); transition: width 0.5s ease; }

/* ─── Filter Bar ─── */

.filter-bar {
    display: flex; flex-direction: column; gap: 16px;
    padding: var(--card-padding); border-radius: 16px;
}
.filter-top-row {
    display: flex; gap: var(--grid-gap); align-items: center; flex-wrap: wrap;
}
.filter-search-wrap {
    position: relative; flex: 1; min-width: 224px;
}
.filter-search-wrap .search-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 16px; pointer-events: none;
}
.filter-search-wrap input {
    width: 100%; min-height: var(--control-height); padding: 0 16px 0 40px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
    border-radius: 10px; color: var(--text-primary); font-family: var(--font-body);
    font-size: 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-search-wrap input:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.filter-search-wrap input::placeholder { color: var(--text-muted); }
.filter-select {
    min-height: var(--control-height); padding: 0 40px 0 16px; appearance: none;
    background: rgba(255,255,255,0.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(241,245,249,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center;
    border: 1px solid var(--glass-border); border-radius: 8px;
    color: var(--text-secondary); font-family: var(--font-body); font-size: 14px;
    cursor: pointer; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 160px;
}
.filter-select:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
    color: var(--text-primary);
}
.filter-select option { background: #1a1a2e; color: var(--text-primary); }

/* Chips de filtro ativos */
.filter-chips-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    min-height: 0;
}
.filter-chips-row:empty { display: none; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 32px; padding: 0 8px 0 16px; border-radius: 24px;
    background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3);
    color: var(--accent-light); font-size: 12px; font-weight: 500;
    cursor: default; transition: background 0.2s;
}
.filter-chip-x {
    cursor: pointer; opacity: 0.6; font-size: 14px; line-height: 1;
    transition: opacity 0.15s; background: none; border: none;
    color: inherit; padding: 0; min-width: 24px; min-height: 24px;
}
.filter-chip-x:hover { opacity: 1; }
.filter-chip-clear {
    min-height: 32px; padding: 0 16px; border-radius: 24px; font-size: 12px; font-weight: 500;
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
    color: #f87171; cursor: pointer; transition: background 0.2s; font-family: var(--font-body);
}
.filter-chip-clear:hover { background: rgba(239,68,68,0.2); }

/* ─── Tabela de Notas (Full) ─── */

.notas-table-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.notas-count-label {
    font-size: 12px; color: var(--text-muted); font-weight: 400;
}

/* Checkbox customizado */
.nota-check {
    width: 16px; height: 16px; border-radius: 4px; cursor: pointer;
    accent-color: var(--accent); border: 1px solid var(--glass-border);
    background: transparent; flex-shrink: 0;
}
.col-check { width: 40px; text-align: center; }

/* Row hover glow */
table tbody tr {
    transition: background 0.15s;
}
table tbody tr:hover {
    background: rgba(99,102,241,0.06);
}
table tbody tr.row-selected {
    background: rgba(99,102,241,0.1);
}

/* ─── Paginação ─── */

.pagination {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap; gap: 8px; padding: 8px 0;
}
.page-btn {
    min-width: var(--control-height); height: var(--control-height); padding: 0 8px; border-radius: 8px;
    border: 1px solid var(--glass-border); background: transparent;
    color: var(--text-secondary); font-size: 13px; font-family: var(--font-body);
    cursor: pointer; transition: all 0.2s; display: flex; align-items: center;
    justify-content: center;
}
.page-btn:hover:not(:disabled) {
    background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.3);
    color: var(--accent-light);
}
.page-btn.active {
    background: rgba(99,102,241,0.2); border-color: var(--accent);
    color: var(--accent-light); font-weight: 600;
}
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-ellipsis {
    color: var(--text-muted); font-size: 13px; padding: 0 8px; user-select: none;
}
.page-size-select {
    min-height: var(--control-height); padding: 0 32px 0 16px; appearance: none;
    background: rgba(255,255,255,0.04) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(241,245,249,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center;
    border: 1px solid var(--glass-border); border-radius: 8px;
    color: var(--text-secondary); font-family: var(--font-body); font-size: 13px;
    cursor: pointer; outline: none; margin-left: 8px;
}
.page-size-select:focus { border-color: var(--accent); }
.page-size-select option { background: #1a1a2e; }
.pagination-info {
    font-size: 12px; color: var(--text-muted); margin-left: 8px; white-space: nowrap;
}

/* ─── Action Bar Flutuante ─── */

.action-bar {
    position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(120px);
    display: flex; align-items: center; gap: 16px;
    padding: 16px 24px; border-radius: 16px;
    background: rgba(15,15,30,0.9); border: 1px solid rgba(99,102,241,0.35);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.1);
    backdrop-filter: blur(24px); z-index: 100;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
    white-space: nowrap;
}
.action-bar.visible {
    transform: translateX(-50%) translateY(0);
}
.action-bar-info {
    display: flex; flex-direction: column;
}
.action-bar-count {
    font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.action-bar-valor {
    font-size: 11px; color: var(--text-muted); font-family: var(--font-mono);
}
.action-bar-divider {
    width: 1px; height: 32px; background: var(--glass-border);
}
.action-bar-btns {
    display: flex; gap: 8px;
}
.btn-action-xml {
    min-height: 40px; padding: 0 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
    background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3);
    color: var(--accent-light); cursor: pointer; font-family: var(--font-body);
    transition: background 0.2s;
}
.btn-action-xml:hover { background: rgba(99,102,241,0.25); }
.btn-action-dominio {
    min-height: 40px; padding: 0 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
    background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3);
    color: #34d399; cursor: pointer; font-family: var(--font-body);
    transition: background 0.2s;
}
.btn-action-dominio:hover { background: rgba(16,185,129,0.25); }
.btn-action-close {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px; font-size: 16px;
    background: transparent; border: 1px solid var(--glass-border);
    color: var(--text-muted); cursor: pointer; display: flex;
    align-items: center; justify-content: center; transition: all 0.15s;
}
.btn-action-close:hover { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #f87171; }

@keyframes slideUp {
    from { transform: translateX(-50%) translateY(120px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ─── Empty State ─── */

.empty-state-full {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 64px 24px; gap: 16px; text-align: center;
}
.empty-state-icon { opacity: 0.3; }
.empty-state-icon svg { width: 48px; height: 48px; stroke-width: 1.25; }
.empty-state-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); }
.empty-state-sub { font-size: 13px; color: var(--text-muted); max-width: 288px; line-height: 1.5; }

/* ─── View transitions ─── */

.view { animation: fadeInUp 0.3s ease-out; }
.view > * + * { margin-top: var(--section-gap); }

/* ─── Theme Toggle Button ─── */

.theme-toggle {
    font-size: 16px !important;
    transition: transform 0.3s ease, color 0.3s ease !important;
}
.theme-toggle:hover { transform: rotate(20deg) !important; }

/* ════════════════════════════════════════════
   Tema Claro
   ════════════════════════════════════════════ */

[data-theme="light"] {
    --bg: #eef1f8;
    --glass: rgba(255,255,255,0.82);
    --glass-border: rgba(99,102,241,0.1);
    --glass-hover: rgba(255,255,255,0.97);
    --accent-glow: rgba(99,102,241,0.14);
    --success-glow: rgba(16,185,129,0.12);
    --warning-glow: rgba(245,158,11,0.12);
    --text-primary: #1e293b;
    --text-secondary: rgba(30,41,59,0.62);
    --text-muted: rgba(30,41,59,0.38);
}

/* Fundo e orbs no tema claro */
[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] .orb-1 {
    background: radial-gradient(circle, rgba(99,102,241,0.07), transparent 70%);
}
[data-theme="light"] .orb-2 {
    background: radial-gradient(circle, rgba(139,92,246,0.05), transparent 70%);
}
[data-theme="light"] .orb-3 {
    background: radial-gradient(circle, rgba(6,182,212,0.05), transparent 70%);
}

/* Sidebar */
[data-theme="light"] .sidebar {
    background: rgba(255,255,255,0.92);
    border-right-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .nav-btn { color: rgba(30,41,59,0.45); }
[data-theme="light"] .nav-btn:hover { color: rgba(30,41,59,0.7); }

/* Cards com sombra no lugar de glow */
[data-theme="light"] .glass-card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.06);
}
[data-theme="light"] .glass-card:hover {
    border-color: rgba(99,102,241,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.08);
}
[data-theme="light"] .stat-card:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}

/* Tabela */
[data-theme="light"] tbody tr:hover { background: rgba(99,102,241,0.04); }
[data-theme="light"] table tbody tr.row-selected { background: rgba(99,102,241,0.07); }
[data-theme="light"] th { border-bottom-color: rgba(0,0,0,0.07); }
[data-theme="light"] .table-header { border-bottom-color: rgba(0,0,0,0.07); }

/* Ring de progresso */
[data-theme="light"] .ring-bg { stroke: rgba(0,0,0,0.07); }

/* Clientes */
[data-theme="light"] .client-item:hover { background: rgba(99,102,241,0.04); }
[data-theme="light"] .clients-header { border-bottom-color: rgba(0,0,0,0.07); }

/* Inputs e selects */
[data-theme="light"] .search-box input { background: rgba(0,0,0,0.04); }
[data-theme="light"] .form-group input { background: rgba(0,0,0,0.04); }
[data-theme="light"] .filter-search-wrap input { background: rgba(0,0,0,0.04); }
[data-theme="light"] .filter-select {
    background-color: rgba(0,0,0,0.04);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(30,41,59,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}
[data-theme="light"] .filter-select option { background: #fff; color: #1e293b; }
[data-theme="light"] .page-size-select {
    background-color: rgba(0,0,0,0.04);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(30,41,59,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    border-color: rgba(0,0,0,0.1); color: rgba(30,41,59,0.65);
}
[data-theme="light"] .page-size-select option { background: #fff; color: #1e293b; }

/* Paginação */
[data-theme="light"] .page-btn { border-color: rgba(0,0,0,0.1); color: rgba(30,41,59,0.65); }
[data-theme="light"] .page-btn:hover:not(:disabled) { background: rgba(99,102,241,0.07); }

/* Action bar */
[data-theme="light"] .action-bar {
    background: rgba(255,255,255,0.96);
    border-color: rgba(99,102,241,0.2);
    box-shadow: 0 8px 40px rgba(0,0,0,0.14), 0 0 0 1px rgba(99,102,241,0.08);
}

/* Status badges — amarelo fica escuro no tema claro para legibilidade */
[data-theme="light"] .status-substituida { color: #475569; }
[data-theme="light"] .status-substituida .dot { background: #64748b; box-shadow: 0 0 6px #64748b; }
[data-theme="light"] .status-pendente { color: #b45309; }
[data-theme="light"] .status-pendente .dot { background: #d97706; box-shadow: 0 0 6px #d97706; }

/* Modal */
[data-theme="light"] .modal-overlay { background: rgba(0,0,0,0.4); }

/* Footer */
[data-theme="light"] .footer { border-top-color: rgba(0,0,0,0.07); }

/* ─── Responsive ─── */

@media (min-width: 1536px) {
    .content-grid { grid-template-columns: minmax(0, 1fr) 400px; }
}
@media (max-width: 1199px) {
    :root { --page-padding: 24px; --card-padding: 16px; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .content-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1199px), (pointer: coarse) {
    :root { --control-height: 48px; }
    .btn-mini { min-height: 48px; }
    .btn-action-close { width: 48px; height: 48px; }
    .nota-check { width: 24px; height: 24px; }
    .filter-chip-x { min-width: 32px; min-height: 32px; }
}
@media (max-width: 899px) {
    .sidebar {
        position: fixed; left: 0; right: 0; bottom: 0; width: auto; min-height: 0;
        flex-direction: row; justify-content: space-around; gap: 0;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        background: rgba(10,10,26,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        border-right: none; border-top: 1px solid var(--glass-border);
    }
    .sidebar .sidebar-logo, .sidebar-spacer { display: none; }
    .nav-items { flex: 1; flex-direction: row; justify-content: space-around; gap: 0; }
    [data-theme="light"] .sidebar { border-top-color: rgba(0,0,0,0.06); }
    .main-content {
        padding-bottom: calc(var(--bottom-nav-height) + var(--page-padding) + env(safe-area-inset-bottom));
    }
    .action-bar {
        left: 16px; right: 16px; bottom: calc(var(--bottom-nav-height) + 16px + env(safe-area-inset-bottom));
        transform: translateY(240px); flex-wrap: wrap; justify-content: space-between;
        gap: 8px 16px; padding: 16px; white-space: normal;
    }
    .action-bar.visible { transform: translateY(0); }
    .action-bar-divider { display: none; }
    .action-bar-btns { order: 3; flex: 1 1 100%; }
    .action-bar-btns > * { flex: 1; }
}
@media (max-width: 599px) {
    :root { --page-padding: 16px; --section-gap: 16px; --grid-gap: 8px; }
    input, select, textarea { font-size: 16px !important; }
    .header { flex-direction: column; align-items: stretch; }
    .header-title { font-size: 24px; }
    .header-right, .search-box, .search-box input { width: 100%; }
    .header-right .btn-sync { flex: 1; }
    .stat-icon { display: none; }
    .stat-header { margin-bottom: 8px; }
    .stat-value { font-size: 20px; }
    .notas-kpi-bar { flex-direction: column; align-items: stretch; }
    .kpi-item:not(:last-child)::after { top: auto; bottom: 0; left: 24px; right: 24px; width: auto; height: 1px; }
    .kpi-val { font-size: 24px; }
    .tipo-doc { display: flex; }
    .tipo-doc-btn { flex: 1; }
    .filter-top-row > * { flex: 1 1 100%; min-width: 0; }
    .filter-select { min-width: 0; }
    .modal-overlay { align-items: flex-end; padding: 8px; }
    .login-overlay { align-items: center; }
    .modal-card { max-height: calc(100dvh - 16px); }
    .modal-actions > * { flex: 1 1 auto; }
    .config-dados { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .config-dados dd { margin-bottom: 8px; }
    .pagination-info { flex-basis: 100%; text-align: center; margin-left: 0; }
    .page-size-select { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ──────────── Clientes ──────────── */
.btn-mini { min-height: 32px; padding: 0 16px; font-size: 12px; white-space: nowrap; }
.btn-mini:disabled { opacity: 0.5; cursor: default; }
.btn-perigo:hover { color: #f87171; border-color: rgba(239,68,68,0.3); }
.acoes-cliente { text-align: right; white-space: nowrap; }
.tabela-clientes .empresa-cnpj { white-space: nowrap; }
.acoes-cliente .btn-mini + .btn-mini { margin-left: 8px; }
.cliente-sync-sub { font-size: 11px; color: var(--text-muted); margin-top: 8px; max-width: 320px; overflow-wrap: anywhere; }
.cliente-sync-sub.erro { color: #f87171; }
.cliente-sync-sub.ok { color: #34d399; }
.cliente-inativo td { opacity: 0.6; }
.cliente-inativo td.acoes-cliente { opacity: 1; }
.tag-inativo {
    font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
    padding: 0 8px; line-height: 16px; margin-left: 8px; border-radius: 4px;
    color: var(--text-muted); border: 1px solid var(--glass-border); vertical-align: middle;
}
#clientesResumo:empty { display: none; }

/* ──────────── Configurações ──────────── */
.config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--grid-gap); align-items: start; }
.config-card h3 { margin-bottom: 16px; }
#senhaForm { grid-row: span 2; }
.config-dados { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; margin-bottom: 8px; }
.config-dados dt { color: var(--text-muted); }
.config-dados dd { margin: 0; overflow-wrap: anywhere; }
.config-status { font-size: 15px; font-weight: 600; color: #34d399; margin-bottom: 8px; }
.config-status.desligado { color: var(--text-secondary); }
.form-ok { font-size: 13px; color: #34d399; margin-top: 8px; }
[data-theme="light"] .form-ok,
[data-theme="light"] .config-status:not(.desligado),
[data-theme="light"] .cliente-sync-sub.ok { color: #047857; }
[data-theme="light"] .cliente-sync-sub.erro { color: #b91c1c; }

/* Equipe */
.equipe-card .table-header { align-items: center; }
.papel-badge { font-size: 11px; font-weight: 600; padding: 0 8px; line-height: 24px; white-space: nowrap; border-radius: 999px; border: 1px solid var(--glass-border); color: var(--text-secondary); }
.papel-badge.admin { color: #a5b4fc; background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.25); }
.tag-voce { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-left: 8px; }
.linha-convite td { opacity: 0.8; }
.check-linha { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 16px; color: var(--text-secondary); margin: 8px 0 16px; cursor: pointer; }
.check-linha input { flex-shrink: 0; width: 16px; height: 16px; margin: 0; accent-color: #6366f1; }

/* ──────────── NF-e de entrada ──────────── */
.tipo-doc { display: inline-flex; max-width: 100%; gap: 8px; padding: 8px; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-border); }
.tipo-doc-btn { border: none; background: transparent; color: var(--text-secondary); font-family: inherit; font-size: 13px; font-weight: 500; min-height: 40px; padding: 8px 16px; border-radius: 8px; cursor: pointer; }
.tipo-doc-btn:hover { color: var(--text-primary); }
.tipo-doc-btn.ativo { background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2)); color: white; }
.xml-tag { font-size: 11px; font-weight: 600; padding: 0 8px; line-height: 24px; border-radius: 999px; white-space: nowrap; }
.xml-tag.completo { color: #34d399; background: rgba(16,185,129,0.12); }
.xml-tag.resumo { color: #fbbf24; background: rgba(245,158,11,0.12); cursor: help; }
[data-theme="light"] .xml-tag.completo { color: #047857; }
[data-theme="light"] .xml-tag.resumo { color: #b45309; }

/* Retenções sob o valor da nota */
.ret-linha { font-size: 11px; font-weight: 500; color: #fbbf24; cursor: help; white-space: nowrap; }
[data-theme="light"] .ret-linha { color: #b45309; }
