:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color-scheme:light;--bg-page: #edf1f4;--surface: #ffffff;--surface-2: #f8fafb;--surface-3: #f3f6f8;--border: #d4dee6;--text-primary: #17212b;--text-heading: #22303d;--text-secondary: #657482;--text-muted: #8fa1b1;--text-on-dark: #f8fafc;--sidebar-bg: #17212b;--sidebar-surface: #1e2b38;--sidebar-hover: #2b3947;--sidebar-text: #d8e2eb;--sidebar-text-muted: #b9c6d1;--accent: #1b7f78;--accent-bright: #2dd4bf;--accent-soft: #dff1ef;--danger: #a73a2a;--danger-bright: #f87171;--danger-soft: #f5ddd8;--success: #1a6e39;--success-bright: #2e9e6b;--success-soft: #def0e4;--warning: #b0853b;--warning-soft: #f5edd3;--button-subtle-bg: #dbe4eb;--chart-grid: #e3eaef;--chart-axis-text: #8a98a5;--chart-today-bg: #f1f6f8;--chart-line: #17212b;--chart-dot-fill: #ffffff;--chart-today-label: #1b7f78;--chart-inflow: #2e9e6b;--chart-outflow: #d9534f;color:var(--text-primary);background:var(--bg-page)}[data-theme=dark]{color-scheme:dark;--bg-page: #0d141c;--surface: #16222e;--surface-2: #1c2935;--surface-3: #1e2a36;--border: #2a3a49;--text-primary: #e8eef4;--text-heading: #dbe4eb;--text-secondary: #9aa7b3;--text-muted: #8fa1b1;--text-on-dark: #f8fafc;--sidebar-bg: #111a24;--sidebar-surface: #16222e;--sidebar-hover: #2a3a49;--sidebar-text: #d8e2eb;--sidebar-text-muted: #8fa1b1;--accent: #1b8f86;--accent-bright: #2dd4bf;--accent-soft: rgba(45, 212, 191, .12);--danger: #f87171;--danger-bright: #f87171;--danger-soft: rgba(248, 113, 113, .12);--success: #2e9e6b;--success-bright: #34b57a;--success-soft: rgba(46, 158, 107, .16);--warning: #c99747;--warning-soft: rgba(176, 133, 59, .18);--button-subtle-bg: #2a3a49;--chart-grid: #2a3a49;--chart-axis-text: #8fa1b1;--chart-today-bg: #1c2935;--chart-line: #2dd4bf;--chart-dot-fill: #16222e;--chart-today-label: #2dd4bf;--chart-inflow: #2e9e6b;--chart-outflow: #f87171}*{box-sizing:border-box}body{margin:0}button,select,input{font:inherit}button{-webkit-tap-highlight-color:transparent}.login-screen{display:grid;min-height:100vh;padding:clamp(16px,4vw,36px);background:linear-gradient(120deg,rgba(24,92,88,.14),transparent 48%),linear-gradient(320deg,rgba(189,76,54,.12),transparent 52%),var(--bg-page)}.login-panel{display:grid;grid-template-columns:minmax(220px,.9fr) minmax(300px,1.1fr);align-self:center;justify-self:center;width:min(900px,100%);min-height:430px;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:0 24px 70px #17212b29}.login-brand{display:flex;gap:12px;align-items:flex-start;padding:clamp(24px,5vw,42px);color:var(--text-on-dark);background:linear-gradient(180deg,rgba(255,255,255,.06),transparent),var(--sidebar-bg)}.login-brand .brand-mark{flex:0 0 auto}.login-brand strong,.login-brand small{display:block}.login-brand small{margin-top:6px;color:var(--sidebar-text-muted)}.login-form{display:grid;align-content:center;gap:18px;padding:clamp(24px,5vw,42px)}.login-heading{display:flex;gap:12px;align-items:center;margin-bottom:2px}.login-heading h1{margin:0 0 5px;font-size:clamp(22px,4vw,28px)}.login-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:8px;color:var(--text-on-dark);background:var(--accent)}.login-form label{display:grid;gap:7px;color:var(--text-secondary);font-size:13px;font-weight:700}.login-form input{min-width:0;height:44px;border:1px solid var(--border);border-radius:8px;padding:0 12px;color:var(--text-primary);background:var(--surface)}.login-form input:focus{border-color:var(--accent);outline:3px solid rgba(27,127,120,.16)}.login-error{color:var(--danger);font-size:13px}.login-hint{color:var(--text-muted);font-size:12px;text-align:center}.login-form button{min-height:44px;border:0;border-radius:8px;color:var(--text-on-dark);background:var(--accent);cursor:pointer;font-weight:800}.shell{display:grid;grid-template-columns:256px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;align-self:start;min-height:100vh;padding:22px 14px;color:var(--text-on-dark);background:var(--sidebar-bg)}.company-selector{margin-bottom:18px;padding:0 2px}.company-selector label{display:block;margin-bottom:6px;color:var(--sidebar-text-muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.5px}.company-selector select{width:100%;min-height:38px;border:1px solid var(--sidebar-hover);border-radius:8px;padding:0 10px;color:var(--text-on-dark);background:var(--sidebar-surface);font-size:13px;font-weight:700;cursor:pointer}.company-selector select:focus{border-color:var(--accent);outline:2px solid rgba(27,127,120,.24)}.company-selector select option{color:var(--text-primary);background:var(--surface)}.brand{display:flex;gap:12px;align-items:center;margin-bottom:28px;min-width:0}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:8px;background:var(--accent);font-weight:900}.brand strong,.brand small{display:block}.brand small{margin-top:3px;color:var(--sidebar-text-muted)}nav{display:grid;gap:4px}.nav-group{display:grid;gap:2px}.nav-group-header{display:flex;align-items:center;gap:10px;width:100%;min-height:38px;border:0;border-radius:8px;color:var(--sidebar-text-muted);background:transparent;padding:8px 12px;cursor:pointer;text-align:left;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.6px}.nav-group-header:hover{color:var(--text-on-dark)}.nav-group-header .nav-group-chevron{margin-left:auto;transition:transform .18s ease}.nav-group-header.open .nav-group-chevron{transform:rotate(180deg)}.nav-group-items{display:grid;gap:2px;margin:2px 0 4px 19px;padding-left:8px;border-left:1px solid var(--sidebar-hover)}.nav-item{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;border:0;border-radius:8px;color:var(--sidebar-text);background:transparent;padding:9px 12px;cursor:pointer;text-align:left}.nav-item.active,.nav-item:hover{background:var(--sidebar-hover);color:var(--text-on-dark)}.content{min-width:0;padding:clamp(18px,3vw,32px)}.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px}.topbar>div:first-child{flex:1;min-width:0}.api-status{display:block;margin-top:8px;color:var(--accent);font-size:13px}.api-status.error{color:var(--danger)}h1{margin:0 0 6px;font-size:clamp(25px,3vw,34px);line-height:1.08}h2{margin:0 0 4px;color:var(--text-heading);font-size:19px}p{margin:0;color:var(--text-secondary)}.topbar-actions{display:flex;align-items:center;gap:10px}.theme-toggle,.logout-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;border:0;border-radius:8px;padding:0 12px;color:var(--text-heading);background:var(--button-subtle-bg);cursor:pointer;white-space:nowrap;font-weight:700}.theme-toggle:hover,.logout-button:hover{background:var(--sidebar-hover);color:var(--text-on-dark)}.user-chip{display:inline-flex;align-items:center;gap:8px;min-height:40px;border-radius:8px;padding:0 12px;color:var(--accent);background:var(--button-subtle-bg);white-space:nowrap}.user-chip svg{flex:0 0 auto}.user-chip div{display:grid;line-height:1.15}.user-chip strong{font-size:13px;font-weight:800}.user-chip span{color:var(--text-secondary);font-size:11px}.command-center{display:grid;grid-template-columns:minmax(250px,1.1fr) minmax(280px,1.25fr) minmax(230px,.8fr);gap:14px;margin:18px 0}.command-main,.command-stack,.signal-panel{border:1px solid var(--border);border-radius:8px;background:var(--surface)}.command-main{display:grid;align-content:space-between;min-height:252px;padding:clamp(18px,3vw,26px);color:var(--text-on-dark);background:linear-gradient(140deg,rgba(255,255,255,.14),transparent 45%),var(--sidebar-bg)}.command-kicker{display:inline-flex;align-items:center;gap:8px;width:fit-content;color:var(--accent-bright);font-size:13px;font-weight:800;text-transform:uppercase}.command-value{display:grid;gap:5px}.command-value strong{font-size:clamp(64px,9vw,96px);line-height:.9}.command-value span{color:var(--sidebar-text);font-weight:800}.command-main p{max-width:34ch;color:var(--border)}.command-stack{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;overflow:hidden;background:var(--border)}.metric-row{display:grid;grid-template-columns:auto 1fr;align-content:center;gap:12px;min-width:0;min-height:125px;padding:18px;background:var(--surface)}.metric-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:8px;color:var(--accent);background:var(--accent-soft)}.metric-row div{display:grid;min-width:0}.metric-row strong{color:var(--text-primary);font-size:30px;line-height:1}.metric-row span{color:var(--text-secondary);font-weight:800}.metric-row small{grid-column:2;color:var(--text-secondary)}.signal-panel{display:grid;gap:10px;align-content:start;padding:14px}.signal-item,.signal-trend{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;min-height:48px;border-radius:8px;padding:10px 12px;color:var(--text-secondary);background:var(--surface-3)}.signal-item span,.signal-trend span{min-width:0;font-size:13px;font-weight:800}.signal-item strong{color:var(--text-primary)}.signal-item.strong svg{color:var(--accent)}.signal-item.warning svg{color:var(--warning)}.signal-item.success svg{color:var(--success)}.signal-trend{grid-template-columns:auto 1fr;margin-top:4px;color:var(--text-secondary);background:var(--surface);border:1px dashed var(--border)}.workspace{margin-top:18px}.data-form{display:grid;gap:16px;padding:16px;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.form-header{display:flex;align-items:flex-start;gap:12px;padding-bottom:14px;border-bottom:1px solid var(--border)}.icon-button{display:inline-grid;flex:0 0 auto;place-items:center;width:38px;height:38px;border:0;border-radius:8px;color:var(--text-heading);background:var(--button-subtle-bg);cursor:pointer}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.settings-form{gap:18px}.settings-layout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.settings-wide{grid-column:span 2}.settings-company-info,.fiscal-company-info{display:flex;align-items:center;min-height:40px;padding:0 12px;border:1px solid var(--border);border-radius:8px;color:var(--text-primary);background:var(--surface-3);font-size:14px;font-weight:600}.settings-summary{display:grid;gap:4px;border:1px dashed var(--border);border-radius:8px;padding:12px 14px;color:var(--text-secondary);background:var(--surface-2)}.settings-summary strong{color:var(--text-heading)}.data-form label{display:grid;gap:7px;min-width:0;color:var(--text-secondary);font-size:13px;font-weight:700}.data-form label .field-hint{color:var(--text-muted);font-size:11.5px;font-weight:500;line-height:1.3}.data-form input,.data-form select{min-width:0;width:100%;height:40px;border:1px solid var(--border);border-radius:8px;padding:0 10px;color:var(--text-primary);background:var(--surface)}.data-form input:focus,.data-form select:focus{border-color:var(--accent);outline:3px solid rgba(27,127,120,.16)}.form-actions{display:flex;justify-content:flex-end;gap:10px}.form-actions button,.toolbar-actions button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;border:0;border-radius:8px;padding:0 14px;color:var(--text-on-dark);background:var(--accent);cursor:pointer;font-weight:800}.form-actions button:disabled,.toolbar-actions button:disabled{cursor:wait;opacity:.72}.toolbar{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:12px}.toolbar-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}.toolbar .secondary,.form-actions .secondary{color:var(--text-heading);background:var(--button-subtle-bg)}.fiscal-launch{display:grid;gap:20px}.fiscal-launch-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.fiscal-launch-section{display:grid;gap:14px;padding:16px;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.fiscal-launch-section label{display:grid;gap:7px;min-width:0;color:var(--text-secondary);font-size:13px;font-weight:700}.fiscal-launch-section select{min-width:0;width:100%;height:40px;border:1px solid var(--border);border-radius:8px;padding:0 10px;color:var(--text-primary);background:var(--surface)}.fiscal-launch-section select:focus{border-color:var(--accent);outline:3px solid rgba(27,127,120,.16)}.model-toggle{display:flex;gap:6px}.model-option{flex:1;min-height:40px;border:1px solid var(--border);border-radius:8px;padding:0 14px;color:var(--text-primary);background:var(--surface-3);cursor:pointer;font-weight:700;transition:all .15s ease}.model-option:hover{border-color:var(--accent);color:var(--accent)}.model-option.active{border-color:var(--accent);color:var(--text-on-dark);background:var(--accent)}.fiscal-items-section{display:grid;gap:12px;padding:16px;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.fiscal-items-header{display:flex;justify-content:space-between;align-items:center;padding-bottom:12px;border-bottom:1px solid var(--border)}.fiscal-items-header strong{font-size:15px;color:var(--text-heading)}.fiscal-items-empty{display:grid;place-items:center;gap:8px;padding:40px 24px;color:var(--text-secondary);text-align:center}.fiscal-items-empty svg{color:var(--sidebar-text-muted)}.fiscal-items-empty strong{color:var(--text-heading)}.fiscal-items-table{overflow-x:auto}.fiscal-items-head{display:grid;grid-template-columns:2.5fr 80px 120px 130px 120px 36px;gap:10px;padding:10px 12px;color:var(--text-secondary);font-size:12px;font-weight:800;text-transform:uppercase;border-bottom:1px solid var(--border)}.fiscal-item-row{display:grid;grid-template-columns:2.5fr 80px 120px 130px 120px 36px;gap:10px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--bg-page)}.fiscal-item-row:last-child{border-bottom:0}.fiscal-item-row select,.fiscal-item-row input{width:100%;min-height:36px;border:1px solid var(--border);border-radius:6px;padding:0 8px;color:var(--text-primary);background:var(--surface);font-size:13px}.fiscal-item-row select:focus,.fiscal-item-row input:focus{border-color:var(--accent);outline:2px solid rgba(27,127,120,.12)}.fiscal-item-total{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;font-weight:700;color:var(--text-primary)}.icon-button.danger{color:var(--danger);background:var(--danger-soft)}.icon-button.danger:hover{background:var(--danger-soft)}.fiscal-total-row{display:flex;justify-content:flex-end;align-items:center;gap:16px;padding:12px 12px 0;border-top:2px solid var(--text-primary);margin-top:8px}.fiscal-total-row span{color:var(--text-secondary);font-weight:700;font-size:14px}.fiscal-total-row strong{font-size:24px;color:var(--text-primary)}.fiscal-result{display:grid;gap:12px;padding:16px;border-radius:8px;border:1px solid var(--border);background:var(--surface)}.fiscal-result-header{display:flex;align-items:center;gap:12px}.fiscal-result-header svg{flex:0 0 auto}.fiscal-result-header strong{display:block;font-size:15px;margin-bottom:3px}.fiscal-result-header span{color:var(--text-secondary);font-size:13px}.fiscal-result-details{display:flex;gap:24px;padding-top:10px;border-top:1px solid var(--border)}.fiscal-result-details div{display:grid;gap:2px}.fiscal-result-details small{color:var(--text-secondary);font-size:11px;text-transform:uppercase;font-weight:700}.fiscal-result-details span{font-size:14px;font-weight:600}.fiscal-result.status-authorized{border-color:var(--success);background:var(--success-soft)}.fiscal-result.status-authorized svg{color:var(--success)}.fiscal-result.status-draft{border-color:var(--warning);background:var(--warning-soft)}.fiscal-result.status-draft svg{color:var(--warning)}.fiscal-result.status-error{border-color:var(--danger);background:var(--danger-soft)}.fiscal-result.status-error svg{color:var(--danger)}.status-badge{display:inline-flex;align-items:center;gap:5px;padding:3px 10px;border-radius:12px;font-size:12px;font-weight:800;width:fit-content}.status-badge.authorized{color:var(--success);background:var(--success-soft)}.status-badge.draft{color:var(--warning);background:var(--warning-soft)}.status-badge.rejected{color:var(--danger);background:var(--danger-soft)}.rejection-hint{display:block;margin-top:4px;color:var(--danger);font-size:12px;line-height:1.3;max-width:28ch}.table{overflow-x:auto;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.table-head{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));min-width:640px;gap:12px;padding:14px 16px;color:var(--text-secondary);font-size:13px;font-weight:800;border-bottom:1px solid var(--border)}.table-head.has-actions{grid-template-columns:repeat(4,minmax(130px,1fr)) 48px}.table-body{min-width:640px}.table-row{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;padding:14px 16px;color:var(--text-primary);border-bottom:1px solid var(--bg-page);transition:background .12s ease}.table-row:hover{background:var(--surface-2)}.table-row.clickable{cursor:pointer}.table-row.clickable:hover{background:var(--bg-page)}.table-row:last-child{border-bottom:0}.table-row.has-actions{grid-template-columns:repeat(4,minmax(130px,1fr)) 48px}.table-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center}.actions-cell{position:relative;display:flex!important;align-items:center;justify-content:center;overflow:visible!important}.hamburger-btn{display:inline-grid;place-items:center;width:32px;height:32px;border:0;border-radius:6px;color:var(--text-secondary);background:transparent;cursor:pointer;transition:all .12s ease}.hamburger-btn:hover{color:var(--text-primary);background:var(--surface-3)}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9}.dropdown-menu-fixed{position:fixed;z-index:10;display:grid;gap:2px;min-width:160px;padding:6px;border:1px solid var(--border);border-radius:8px;background:var(--surface);box-shadow:0 8px 30px #17212b2e}.dropdown-item{display:flex;align-items:center;gap:10px;width:100%;min-height:36px;border:0;border-radius:6px;padding:8px 10px;color:var(--text-primary);background:transparent;cursor:pointer;font-size:13px;font-weight:600;text-align:left;transition:background .1s ease}.dropdown-item:hover{background:var(--surface-3);color:var(--text-primary)}.dropdown-item svg{flex:0 0 auto;color:var(--text-secondary)}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;z-index:100;display:grid;place-items:center;padding:24px;background:#17212b80}.modal-content{display:grid;gap:14px;width:min(480px,100%);padding:24px;border-radius:12px;background:var(--surface);box-shadow:0 24px 60px #17212b4d}.modal-title{font-size:17px;color:var(--text-primary)}.modal-description{color:var(--text-secondary);font-size:14px;line-height:1.5}.modal-textarea{width:100%;min-height:100px;border:1px solid var(--border);border-radius:8px;padding:12px;color:var(--text-primary);font:inherit;font-size:14px;resize:vertical}.modal-textarea:focus{border-color:var(--accent);outline:3px solid rgba(27,127,120,.16)}.modal-actions{display:flex;justify-content:flex-end;gap:10px}.modal-actions button{display:inline-flex;align-items:center;gap:8px;min-height:38px;border:0;border-radius:8px;padding:0 16px;color:var(--text-on-dark);background:var(--accent);cursor:pointer;font-weight:800}.modal-actions .secondary{color:var(--text-heading);background:var(--button-subtle-bg)}.empty-state{display:grid;place-items:center;min-width:640px;min-height:220px;gap:8px;padding:24px;color:var(--text-secondary);text-align:center}.empty-state strong{color:var(--text-heading)}.nfse-hint{color:var(--text-secondary);font-size:12px;line-height:1.4}.nfse-badge-pill{display:inline-flex;align-items:center;padding:4px 10px;border-radius:12px;color:var(--accent);background:var(--accent-soft);font-size:12px;font-weight:800}.nfse-trib-summary{display:flex;gap:24px;flex-wrap:wrap;padding:12px 14px;border:1px dashed var(--border);border-radius:8px;background:var(--surface-2)}.nfse-trib-summary div{display:grid;gap:2px}.nfse-trib-summary small{color:var(--text-secondary);font-size:11px;text-transform:uppercase;font-weight:700}.nfse-trib-summary span{color:var(--text-primary);font-size:14px;font-weight:600}@media(max-width:1180px){.command-center{grid-template-columns:minmax(280px,1fr) minmax(320px,1fr)}.signal-panel{grid-column:1 / -1;grid-template-columns:repeat(4,minmax(0,1fr))}.signal-trend{margin-top:0}}@media(max-width:900px){.login-panel{grid-template-columns:1fr;min-height:auto}.login-brand{min-height:130px}.shell{grid-template-columns:1fr}.sidebar{min-height:auto;padding:14px}.brand{margin-bottom:14px}nav{grid-template-columns:1fr}.nav-item{justify-content:flex-start;min-height:40px;padding:9px 12px}.topbar{align-items:stretch}.command-center{grid-template-columns:1fr}.signal-panel{grid-template-columns:repeat(2,minmax(0,1fr))}.signal-trend{grid-column:1 / -1}.form-grid,.settings-layout{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.content{padding:16px}.topbar,.toolbar,.form-actions{flex-direction:column}.topbar-actions{flex-direction:column;width:100%}.theme-toggle,.logout-button,.toolbar-actions,.toolbar-actions button,.form-actions button{width:100%}.command-main{min-height:230px}.command-stack,.signal-panel,.form-grid,.settings-layout{grid-template-columns:1fr}.settings-wide{grid-column:auto}.metric-row{min-height:98px}.signal-trend{grid-column:auto}}@media(max-width:420px){.brand div{min-width:0}.brand strong,.brand small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.login-heading{align-items:flex-start}.table-head,.empty-state{min-width:560px}}.commercial-items-head,.commercial-item-row{grid-template-columns:2.5fr 90px 130px 130px 36px}.commercial-doc-fields{display:grid;grid-template-columns:220px 1fr;gap:14px;padding-top:12px}.commercial-doc-fields label{display:grid;gap:7px;min-width:0;color:var(--text-secondary);font-size:13px;font-weight:700}.commercial-doc-fields input,.commercial-doc-fields textarea{width:100%;min-height:40px;border:1px solid var(--border);border-radius:8px;padding:8px 10px;color:var(--text-primary);background:var(--surface);font-size:13px;resize:vertical}.commercial-doc-fields input:focus,.commercial-doc-fields textarea:focus{border-color:var(--accent);outline:3px solid rgba(27,127,120,.16)}.dropdown-item.danger{color:var(--danger)}.dropdown-item.danger:hover{background:var(--danger-soft)}@media(max-width:900px){.commercial-doc-fields{grid-template-columns:1fr}}.table-head.has-actions.commercial-table,.table-row.has-actions.commercial-table{grid-template-columns:repeat(5,minmax(120px,1fr)) 48px}.fiscal-launch-section input[type=date]{width:100%;height:40px;border:1px solid var(--border);border-radius:8px;padding:0 10px;color:var(--text-primary);background:var(--surface)}.fiscal-launch-section input[type=date]:focus{border-color:var(--accent);outline:3px solid rgba(27,127,120,.16)}.cash-flow{display:grid;gap:18px}.cash-flow-toolbar{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}.cash-flow-toolbar h2{margin:0 0 4px;color:var(--text-heading);font-size:20px}.cash-flow-toolbar p{margin:0;max-width:60ch;color:var(--text-secondary);font-size:13px}.cash-flow-period{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:6px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.cash-flow-period>span{padding:0 8px;color:var(--text-secondary);font-size:12px;font-weight:800;text-transform:uppercase}.cash-flow-period button{min-height:32px;border:0;border-radius:7px;padding:0 12px;color:var(--text-secondary);background:transparent;cursor:pointer;font-weight:700}.cash-flow-period button:hover{background:var(--surface-3)}.cash-flow-period button.active{color:var(--text-on-dark);background:var(--accent)}.cash-flow-period button.secondary{display:inline-grid;place-items:center;width:34px;padding:0;color:var(--text-heading);background:var(--button-subtle-bg)}.cash-flow-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.cf-card{display:flex;align-items:flex-start;gap:12px;padding:18px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.cf-card-icon{display:grid;flex:0 0 auto;place-items:center;width:40px;height:40px;border-radius:10px;color:var(--accent);background:var(--accent-soft)}.cf-card-icon.inflow{color:var(--success);background:var(--success-soft)}.cf-card-icon.outflow{color:var(--danger);background:var(--danger-soft)}.cf-card>div{display:grid;gap:3px;min-width:0}.cf-card small{color:var(--text-secondary);font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.3px}.cf-card strong{color:var(--text-primary);font-size:24px;line-height:1.1;word-break:break-word}.cf-card>div>span{color:var(--text-secondary);font-size:12px;line-height:1.35}.cf-card>div>span.overdue{color:var(--danger);font-weight:800}.cf-card-balance{color:var(--text-on-dark);background:linear-gradient(140deg,rgba(255,255,255,.1),transparent 45%),var(--sidebar-bg);border-color:var(--text-primary)}.cf-card-balance .cf-card-icon{color:var(--accent-bright);background:#ffffff1a}.cf-card-balance small{color:var(--sidebar-text-muted)}.cf-card-balance strong{color:var(--text-on-dark)}.cf-card-balance>div>span{color:var(--border)}.cf-card-projection{border-color:var(--accent);background:var(--accent-soft)}.cf-card-projection .cf-card-icon{background:var(--accent-soft)}.cf-chart-card{overflow:hidden;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.cf-chart-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;padding:16px 18px 0}.cf-chart-header h3{margin:0 0 4px;color:var(--text-heading);font-size:16px}.cf-chart-header p{margin:0;color:var(--text-secondary);font-size:12.5px}.cf-legend{display:flex;align-items:center;gap:16px;flex-wrap:wrap;color:var(--text-secondary);font-size:12.5px;font-weight:700}.cf-legend span{display:inline-flex;align-items:center;gap:6px}.cf-legend .dot{display:inline-block;width:10px;height:10px;border-radius:3px}.cf-legend .dot.inflow{background:var(--success-bright)}.cf-legend .dot.outflow{background:var(--danger-bright)}.cf-legend .line{display:inline-block;width:18px;height:3px;border-radius:2px;background:var(--sidebar-bg)}.cf-chart{position:relative;padding:8px 4px 0}.cf-chart svg{display:block}.cf-chart-empty{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;color:var(--text-secondary);font-size:13px;background:#ffffffd1}.cf-lists{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}.cf-list{overflow:hidden;border:1px solid var(--border);border-radius:10px;background:var(--surface)}.cf-list-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border)}.cf-list-header h3{margin:0;color:var(--text-heading);font-size:15px}.cf-list-header span{color:var(--text-secondary);font-size:12px;font-weight:800}.cf-empty{padding:28px 16px;color:var(--text-secondary);font-size:13px;text-align:center}.cf-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto auto;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--surface-3)}.cf-row:last-child{border-bottom:0}.cf-row:hover{background:var(--surface-2)}.cf-kind{display:grid;place-items:center;width:30px;height:30px;border-radius:8px}.cf-kind.inflow{color:var(--success);background:var(--success-soft)}.cf-kind.outflow{color:var(--danger);background:var(--danger-soft)}.cf-row-main{display:grid;gap:2px;min-width:0}.cf-row-main strong{color:var(--text-heading);font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cf-row-main span{color:var(--text-secondary);font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cf-row-due{text-align:right;white-space:nowrap}.cf-row-due span{color:var(--text-secondary);font-size:12px;font-weight:700}.cf-row-due span.overdue{color:var(--danger)}.cf-row-value{font-size:13.5px;white-space:nowrap}.cf-row-value.inflow{color:var(--success)}.cf-row-value.outflow{color:var(--danger)}.cf-settle{display:inline-flex;align-items:center;gap:6px;min-height:32px;border:0;border-radius:8px;padding:0 12px;color:var(--text-on-dark);background:var(--accent);cursor:pointer;font-size:12.5px;font-weight:800;white-space:nowrap}.cf-settle:hover{background:var(--accent)}.cf-settle:disabled{cursor:wait;opacity:.72}@media(max-width:1100px){.cash-flow-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.cf-lists{grid-template-columns:1fr}}@media(max-width:640px){.cash-flow-cards{grid-template-columns:1fr}.cf-row{grid-template-columns:auto minmax(0,1fr) auto}.cf-row-due{display:none}}.settings-stack{display:grid;gap:18px}.data-form textarea{width:100%;min-height:84px;border:1px solid var(--border);border-radius:8px;padding:8px 10px;color:var(--text-primary);background:var(--surface);font-size:13px;font-family:inherit;resize:vertical}.data-form textarea:focus{border-color:var(--accent);outline:3px solid rgba(27,127,120,.16)}.table-head.ap-table,.table-row.ap-table{grid-template-columns:repeat(5,minmax(130px,1fr));min-width:780px}.table-body.ap-table{min-width:780px}.table-head.ar-table,.table-row.ar-table{grid-template-columns:36px repeat(5,minmax(110px,1fr)) 160px;min-width:900px}.table-body.ar-table{min-width:900px}.ar-check-cell{display:grid;place-items:center}.ar-check-cell input{width:16px;height:16px;accent-color:var(--accent);cursor:pointer}.boleto-cell{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.boleto-cell.muted{color:var(--text-muted)}.boleto-link{display:inline-flex;align-items:center;gap:4px;color:var(--accent);font-size:12px;font-weight:800;text-decoration:none;white-space:nowrap}.boleto-link:hover{text-decoration:underline}.pdv-app{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:grid;grid-template-rows:auto 1fr;color:var(--sidebar-text);background:var(--sidebar-bg);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.pdv-header{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;padding:12px 18px;border-bottom:1px solid var(--sidebar-surface);background:var(--sidebar-bg)}.pdv-brand{display:flex;align-items:center;gap:10px}.pdv-brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;color:var(--sidebar-bg);background:var(--accent-bright);font-size:18px;font-weight:900}.pdv-brand strong,.pdv-brand small{display:block}.pdv-brand strong{font-size:17px;letter-spacing:1px}.pdv-brand small{color:var(--text-muted);font-size:12px}.pdv-header-center{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.pdv-header-center label{display:grid;gap:4px;min-width:220px}.pdv-header-center label span{color:var(--text-muted);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.4px}.pdv-header-center select{min-width:220px;height:36px;border:1px solid var(--sidebar-hover);border-radius:8px;padding:0 10px;color:var(--sidebar-text);background:var(--sidebar-surface);font-size:13px}.pdv-header-right{display:flex;align-items:center;gap:14px}.pdv-clock{display:grid;text-align:right}.pdv-clock strong{font-size:18px;font-variant-numeric:tabular-nums}.pdv-clock span{color:var(--text-muted);font-size:12px}.pdv-exit{display:inline-flex;align-items:center;gap:8px;min-height:38px;border:1px solid var(--sidebar-hover);border-radius:8px;padding:0 14px;color:var(--sidebar-text);background:transparent;cursor:pointer;font-weight:700}.pdv-exit:hover{background:var(--sidebar-surface)}.pdv-main{display:grid;grid-template-columns:minmax(0,1fr) 430px;min-height:0}.pdv-products{display:grid;grid-template-rows:auto 1fr;min-height:0;padding:16px;gap:14px}.pdv-products-toolbar{display:flex;align-items:center;gap:12px}.pdv-search{display:flex;align-items:center;gap:10px;flex:1;height:44px;border:1px solid var(--sidebar-hover);border-radius:10px;padding:0 14px;color:var(--text-muted);background:var(--sidebar-bg)}.pdv-search input{flex:1;min-width:0;border:0;outline:0;color:var(--sidebar-text);background:transparent;font-size:15px}.pdv-search input::placeholder{color:var(--text-secondary)}.pdv-count{color:var(--text-muted);font-size:13px;font-weight:700;white-space:nowrap}.pdv-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;align-content:start;overflow-y:auto;padding:2px}.pdv-product-card{display:grid;gap:6px;justify-items:center;text-align:center;padding:16px 12px;border:1px solid var(--sidebar-hover);border-radius:12px;color:var(--sidebar-text);background:var(--sidebar-surface);cursor:pointer;transition:transform .06s ease,border-color .12s ease,background .12s ease}.pdv-product-card:hover{border-color:var(--accent-bright);background:var(--sidebar-hover);transform:translateY(-2px)}.pdv-product-card:active{transform:scale(.97)}.pdv-product-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:10px;color:var(--accent-bright);background:#2dd4bf1f}.pdv-product-card strong{font-size:13px;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.pdv-product-price{color:var(--accent-bright);font-size:15px;font-weight:900}.pdv-product-stock{color:var(--text-muted);font-size:11px}.pdv-product-stock.out{color:var(--danger-bright);font-weight:700}.pdv-empty-products{display:grid;place-items:center;gap:8px;align-content:center;min-height:260px;color:var(--text-muted);text-align:center}.pdv-empty-products strong{color:var(--sidebar-text-muted)}.pdv-cart{display:grid;grid-template-rows:auto 1fr auto auto auto auto;min-height:0;border-left:1px solid var(--sidebar-surface);background:var(--sidebar-bg)}.pdv-cart-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--sidebar-surface)}.pdv-cart-head h2{display:flex;align-items:center;gap:8px;margin:0;font-size:16px}.pdv-clear{border:0;padding:6px 10px;border-radius:7px;color:var(--danger-bright);background:#f871711a;cursor:pointer;font-size:12px;font-weight:800}.pdv-clear:disabled{opacity:.4;cursor:default}.pdv-cart-items{overflow-y:auto;padding:8px 12px}.pdv-cart-empty{display:grid;place-items:center;gap:8px;min-height:180px;color:var(--text-secondary);text-align:center}.pdv-cart-empty strong{color:var(--text-muted)}.pdv-cart-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;padding:10px 4px;border-bottom:1px dashed var(--sidebar-hover)}.pdv-cart-item:last-child{border-bottom:0}.pdv-cart-item-main{display:grid;gap:2px;min-width:0}.pdv-cart-item-main strong{font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdv-cart-item-main span{color:var(--text-muted);font-size:12px}.pdv-cart-item-price strong{color:var(--accent-bright);font-size:14px}.pdv-cart-item-actions{display:flex;align-items:center;gap:6px;grid-column:1 / -1}.pdv-cart-item-actions button{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--sidebar-hover);border-radius:7px;color:var(--sidebar-text);background:var(--sidebar-surface);cursor:pointer}.pdv-cart-item-actions button:hover{background:var(--sidebar-hover)}.pdv-cart-item-actions button.danger{color:var(--danger-bright);border-color:transparent;background:#f871711f}.pdv-cart-item-actions span{min-width:22px;text-align:center;font-weight:800}.pdv-cart-item input{grid-column:1 / -1;width:100%;height:30px;border:1px solid var(--sidebar-hover);border-radius:7px;padding:0 8px;color:var(--sidebar-text);background:var(--sidebar-bg);font-size:12.5px}.pdv-summary{display:grid;gap:6px;padding:12px 16px;border-top:1px solid var(--sidebar-surface)}.pdv-summary-row{display:flex;justify-content:space-between;align-items:center;gap:10px;color:var(--text-muted);font-size:13px}.pdv-summary-row strong{color:var(--sidebar-text);font-size:13px}.pdv-summary-row.pdv-total{margin-top:4px;padding-top:10px;border-top:1px dashed var(--sidebar-hover)}.pdv-summary-row.pdv-total span{color:var(--sidebar-text);font-weight:800;font-size:15px}.pdv-summary-row.pdv-total strong{color:var(--accent-bright);font-size:24px;font-weight:900}.pdv-discount{align-items:flex-end}.pdv-discount-control{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pdv-discount-control span{font-size:12px;font-weight:800;text-transform:uppercase}.pdv-discount-control>div{display:flex;align-items:center;gap:4px}.pdv-discount-control button{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--sidebar-hover);border-radius:7px;color:var(--text-muted);background:var(--sidebar-bg);cursor:pointer;font-size:12px;font-weight:800}.pdv-discount-control button.active{color:var(--sidebar-bg);background:var(--accent-bright);border-color:var(--accent-bright)}.pdv-discount-control input{width:84px;height:30px;border:1px solid var(--sidebar-hover);border-radius:7px;padding:0 8px;color:var(--sidebar-text);background:var(--sidebar-bg);font-size:13px}.pdv-payments{display:grid;gap:10px;padding:12px 16px;border-top:1px solid var(--sidebar-surface)}.pdv-payments-title{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.pdv-payments-title h3{margin:0;font-size:13px;text-transform:uppercase;letter-spacing:.4px;color:var(--text-muted)}.pdv-prazo-options{display:flex;gap:10px}.pdv-prazo-options label{display:flex;align-items:center;gap:6px;color:var(--text-muted);font-size:12px;font-weight:700}.pdv-prazo-options input{width:58px;height:30px;border:1px solid var(--sidebar-hover);border-radius:7px;padding:0 8px;color:var(--sidebar-text);background:var(--sidebar-bg)}.pdv-payment-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.pdv-payment-buttons button{display:grid;place-items:center;gap:5px;min-height:54px;border:1px solid var(--sidebar-hover);border-radius:9px;color:var(--sidebar-text-muted);background:var(--sidebar-surface);cursor:pointer;font-size:11.5px;font-weight:800}.pdv-payment-buttons button:hover{border-color:var(--sidebar-hover)}.pdv-payment-buttons button.active{color:var(--sidebar-bg);background:var(--accent-bright);border-color:var(--accent-bright)}.pdv-payment-list{display:grid;gap:6px}.pdv-payment-row{display:grid;grid-template-columns:1fr 110px 30px;align-items:center;gap:8px;padding:4px 8px;border-radius:8px;background:var(--sidebar-bg)}.pdv-payment-row span{color:var(--sidebar-text-muted);font-size:13px;font-weight:700}.pdv-payment-row input{width:100%;height:30px;border:1px solid var(--sidebar-hover);border-radius:7px;padding:0 8px;color:#e8eef4;background:#111a24;text-align:right}.pdv-payment-row button{display:grid;place-items:center;width:28px;height:28px;border:0;border-radius:7px;color:#f87171;background:#f871711f;cursor:pointer}.pdv-payment-status{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;color:#8fa1b1;font-size:12.5px}.pdv-payment-status .diff{color:#f87171;font-weight:800}.pdv-payment-status .troco{color:#2dd4bf;font-weight:800}.pdv-error{padding:9px 12px;border:1px solid rgba(248,113,113,.4);border-radius:8px;color:#fecaca;background:#f871711a;font-size:12.5px;font-weight:700;line-height:1.4}.pdv-finalize{padding:12px 16px;border-top:1px solid #1e2a36}.pdv-finalize-btn{display:flex;justify-content:center;align-items:center;gap:10px;width:100%;min-height:52px;border:0;border-radius:10px;color:#0d141c;background:#2dd4bf;cursor:pointer;font-size:16px;font-weight:900}.pdv-finalize-btn:hover{background:#1fc4b0}.pdv-finalize-btn:disabled{opacity:.5;cursor:wait}.pdv-receipt-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:wrap;padding:24px;background:#050a0fe0}.pdv-receipt{width:min(340px,92vw);max-height:calc(100vh - 120px);overflow-y:auto;padding:18px 16px;color:#17212b;background:#fff;font-family:Courier New,monospace;font-size:12px;line-height:1.45}.pdv-receipt-brand{display:grid;gap:2px;text-align:center;padding-bottom:10px;border-bottom:1px dashed #9aa7b3}.pdv-receipt-brand strong{font-size:14px;text-transform:uppercase}.pdv-receipt-brand span{color:#4a5a68}.pdv-receipt-meta{display:flex;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px dashed #9aa7b3}.pdv-receipt-status{display:flex;align-items:center;gap:6px;padding:8px 0;border-bottom:1px dashed #9aa7b3;font-weight:700}.pdv-receipt-status.ok{color:#1a6e39}.pdv-receipt-status.warn{color:#a73a2a}.pdv-receipt-items{display:grid;gap:4px;padding:8px 0;border-bottom:1px dashed #9aa7b3}.pdv-receipt-item{display:flex;justify-content:space-between;gap:10px}.pdv-receipt-totals{display:grid;gap:4px;padding:8px 0;border-bottom:1px dashed #9aa7b3}.pdv-receipt-totals>div{display:flex;justify-content:space-between}.pdv-receipt-totals .total{font-size:15px}.pdv-receipt-payments{display:grid;gap:4px;padding:8px 0;border-bottom:1px dashed #9aa7b3}.pdv-receipt-payments>div{display:flex;justify-content:space-between}.pdv-receipt-ar{display:grid;gap:4px;padding:8px 0;border-bottom:1px dashed #9aa7b3}.pdv-receipt-ar strong{font-size:12px}.pdv-receipt-ar>div{display:flex;justify-content:space-between;gap:10px}.pdv-receipt-warnings{display:grid;gap:4px;padding:8px 0;border-bottom:1px dashed #9aa7b3;color:#a73a2a}.pdv-receipt-footer{display:grid;gap:2px;padding-top:10px;text-align:center}.pdv-receipt-footer span{color:#3a4a5a}.pdv-receipt-actions{display:grid;gap:10px;align-content:center}.pdv-receipt-actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border:0;border-radius:10px;padding:0 18px;color:#0d141c;background:#2dd4bf;cursor:pointer;font-weight:800}.pdv-receipt-actions button.secondary{color:#e8eef4;background:#22303e}@media(max-width:1000px){.pdv-main{grid-template-columns:1fr;grid-template-rows:1fr 1fr}.pdv-cart{border-left:0;border-top:1px solid var(--sidebar-surface)}}@media print{body *{visibility:hidden!important}.pdv-receipt,.pdv-receipt *{visibility:visible!important}.pdv-receipt{position:fixed;inset:0 auto auto 0;width:340px;max-height:none;overflow:visible;box-shadow:none}}
