﻿:root { color-scheme: light; --ink:#18202a; --muted:#667085; --line:#d9dee7; --panel:#fff; --bg:#f4f6f8; --primary:#0f766e; --primary-dark:#115e59; --accent:#b45309; --danger:#b42318; --ok:#15803d; }
* { box-sizing: border-box; }
body { margin:0; min-height:100vh; display:flex; font-family: Inter, Segoe UI, Arial, sans-serif; color:var(--ink); background:var(--bg); }
button, input, select, textarea { font: inherit; }
body.locked .sidebar, body.locked .app { display:none; }
.login-screen { position:fixed; inset:0; z-index:10; display:grid; place-items:center; padding:24px; background:#111827; }
.login-screen.hidden { display:none; }
.login-card { width:min(420px, 100%); display:grid; gap:14px; padding:24px; background:white; border-radius:8px; border:1px solid var(--line); box-shadow:0 24px 70px rgba(0,0,0,.22); }
.login-card label { display:grid; gap:7px; color:var(--muted); font-size:13px; }
.login-brand { color:var(--ink); margin-bottom:4px; }
.login-brand small { color:var(--muted); }
.login-error { min-height:20px; color:var(--danger); font-size:13px; margin:0; }
.sidebar { width:260px; min-height:100vh; padding:22px 16px; background:#111827; color:white; position:sticky; top:0; }
.brand { display:flex; gap:12px; align-items:center; margin-bottom:26px; }
.brand-mark { width:42px; height:42px; display:grid; place-items:center; background:var(--primary); border-radius:8px; font-weight:800; }
.brand small { display:block; color:#aeb7c5; margin-top:2px; }
.nav { display:grid; gap:8px; }
.nav-group { display:grid; gap:6px; padding-top:6px; }
.nav-group:not(.open) .nav-subitem { display:none; }
.nav-group-title { display:flex; align-items:center; justify-content:space-between; width:100%; border:0; border-radius:8px; padding:10px 12px; color:#d6dce7; background:transparent; cursor:pointer; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.nav-group-title::after { content:"+"; color:#8f9bad; font-size:16px; line-height:1; }
.nav-group.open .nav-group-title { background:#1b2636; color:white; }
.nav-group.open .nav-group-title::after { content:"-"; }
.nav-group-title:hover { background:#243041; color:white; }
.nav-item { text-align:left; border:0; border-radius:8px; color:#d6dce7; background:transparent; padding:11px 12px; cursor:pointer; }
.nav-subitem { padding-left:24px; }
.nav-item:hover, .nav-item.active { background:#243041; color:white; }
.app { flex:1; min-width:0; padding:24px; }
.topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:22px; }
h1 { margin:0; font-size:28px; letter-spacing:0; }
p { margin:6px 0 0; color:var(--muted); }
.actions { display:flex; flex-wrap:wrap; gap:10px; }
.user-chip { display:inline-flex; align-items:center; min-height:40px; padding:0 12px; border:1px solid var(--line); border-radius:999px; background:white; color:var(--muted); font-size:13px; }
.primary-button, .ghost-button, .import-button, .danger-button { display:inline-flex; align-items:center; justify-content:center; justify-self:start; align-self:end; width:auto; max-width:100%; border:1px solid transparent; border-radius:8px; padding:10px 14px; cursor:pointer; min-height:40px; line-height:1.2; white-space:nowrap; }
.primary-button { background:var(--primary); color:white; }
.primary-button:hover { background:var(--primary-dark); }
.ghost-button, .import-button { background:white; color:var(--ink); border-color:var(--line); }
.danger-button { background:#fff7f6; color:var(--danger); border-color:#fecdca; font-weight:700; }
.danger-button:hover { background:#fee4e2; }
.import-button input { display:none; }
.view { display:none; }
.view.active { display:block; }
.metrics { display:grid; grid-template-columns:repeat(4, minmax(150px, 1fr)); gap:14px; margin-bottom:16px; }
.product-value-metrics { grid-template-columns:repeat(2, minmax(220px, 300px)); }
.metric, .panel, .card, .po-card { background:var(--panel); border:1px solid var(--line); border-radius:8px; }
.metric { padding:16px; }
.metric span { display:block; color:var(--muted); font-size:13px; }
.metric strong { display:block; font-size:25px; margin-top:8px; }
.dashboard-welcome { display:flex; justify-content:space-between; align-items:center; gap:22px; padding:24px; margin-bottom:18px; border-radius:16px; background:linear-gradient(125deg, #111827 0%, #1f2937 66%, #4b3c05 100%); color:white; }
.dashboard-welcome h2 { margin:7px 0 6px; font-size:25px; color:white; }
.dashboard-welcome p { max-width:550px; margin:0; color:#d7dce5; line-height:1.5; }
.dashboard-eyebrow { display:inline-flex; border-radius:999px; padding:5px 10px; background:rgba(196,154,0,.2); color:#fbd566; font-size:11px; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.dashboard-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; max-width:385px; }
.dashboard-action { display:inline-flex; align-items:center; justify-content:center; width:auto; max-width:100%; min-height:40px; padding:10px 14px; border:1px solid rgba(255,255,255,.24); border-radius:8px; background:rgba(255,255,255,.07); color:white; font-weight:700; line-height:1.2; white-space:nowrap; cursor:pointer; }
.dashboard-action.primary { background:var(--primary); border-color:var(--primary); color:#111827; }
.dashboard-action:hover { background:rgba(255,255,255,.18); }
.dashboard-action.primary:hover { background:var(--primary-dark); border-color:var(--primary-dark); }
.dashboard-metrics .metric { display:flex; align-items:flex-start; gap:13px; min-height:126px; padding:18px; border-radius:14px; box-shadow:0 2px 4px rgba(15,23,42,.03); }
.dashboard-metrics .metric strong { margin-top:6px; font-size:30px; line-height:1; }
.dashboard-metrics .metric small { display:block; margin-top:10px; color:var(--muted); font-size:12px; line-height:1.35; }
.dashboard-metrics button.metric { width:100%; text-align:left; font:inherit; color:inherit; cursor:pointer; }
.dashboard-metrics .metric-link { position:relative; transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.dashboard-metrics .metric-link::after { content:"Abrir"; position:absolute; top:14px; right:14px; color:var(--primary-dark); font-size:11px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.dashboard-metrics .metric-link:hover { transform:translateY(-2px); border-color:var(--primary); box-shadow:0 10px 24px rgba(15,23,42,.10); }
.dashboard-metrics .metric-link:focus-visible { outline:3px solid rgba(196,154,0,.32); outline-offset:2px; }
.metric-icon { flex:none; display:grid; place-items:center; width:42px; height:42px; border-radius:11px; background:#eef2ff; color:#3949ab; font-size:19px; font-weight:800; }
.metric-attention .metric-icon { background:#fff1ef; color:var(--danger); }
.metric-overstock .metric-icon { background:#eff6ff; color:#1d4ed8; }
.metric-sales .metric-icon { background:var(--primary-soft); color:var(--primary-dark); }
.dashboard-panels { align-items:start; }
.dashboard-panel { border-radius:14px; padding:18px; min-height:250px; }
.dashboard-panel .panel-header { align-items:flex-start; padding-bottom:13px; margin-bottom:13px; border-bottom:1px solid #edf0f4; }
.dashboard-panel .panel-header p { margin:5px 0 0; font-size:13px; }
.dashboard-count { flex:none; min-width:38px; padding:7px 10px; border-radius:999px; background:#eff6ff; color:#1d4ed8; text-align:center; font-size:14px; font-weight:800; }
.dashboard-count.danger { background:#fef3f2; color:var(--danger); }
.dashboard-panel .list-item { padding:13px; border:0; background:#f8fafc; }
.grid.two { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.sales-po-workspace { display:grid; grid-template-columns:1fr; gap:16px; }
.panel { padding:16px; min-width:0; }
.report-fixed-panel { margin-top:16px; position:sticky; bottom:16px; z-index:1; box-shadow:0 -8px 24px rgba(15,23,42,.08); }
.panel-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
h2 { margin:0; font-size:18px; }
.toolbar { margin-bottom:12px; }
.report-filters { display:grid; grid-template-columns:repeat(2, minmax(160px, 220px)) auto; align-items:end; gap:10px; }
.monthly-report-filters { grid-template-columns:repeat(2, minmax(150px, 190px)) minmax(130px, 160px) auto; }
.product-report-filters { grid-template-columns:repeat(2, minmax(160px, 200px)) minmax(240px, 1fr) auto; }
.report-filters label { display:grid; gap:6px; color:var(--muted); font-size:13px; }
.report-actions { display:flex; align-items:end; gap:8px; }
.report-actions select { width:92px; min-height:40px; padding:9px 10px; }
.report-actions button { flex:none; }
.report-chart { display:grid; gap:10px; margin:0 0 14px; padding:14px; border:1px solid #e5e9f0; border-radius:8px; background:#fbfcfe; }
.report-chart.empty { color:var(--muted); font-size:13px; }
.report-chart-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.report-chart-title { margin:0; color:var(--ink); font-size:14px; font-weight:800; }
.report-chart-total { color:var(--muted); font-size:13px; white-space:nowrap; }
.report-chart-bars { display:grid; gap:9px; }
.report-column-chart { width:min(980px, 100%); }
.report-column-chart .report-chart-bars { display:grid; grid-auto-flow:column; grid-auto-columns:78px; justify-content:start; align-items:end; gap:12px; min-height:260px; overflow-x:auto; padding:12px 4px 2px; }
.report-column-chart .report-chart-row { display:grid; grid-template-columns:1fr; grid-template-rows:22px minmax(160px, 1fr) auto auto; align-items:end; gap:7px; min-height:238px; }
.report-column-chart .report-chart-track { display:flex; align-items:flex-end; width:100%; height:170px; border-radius:8px; background:#eef2f6; }
.report-column-chart .report-chart-fill { width:100%; min-width:0; min-height:4px; border-radius:8px 8px 0 0; background:linear-gradient(180deg, #0f766e, #0f5f95); }
.report-column-chart .report-chart-label { text-align:center; white-space:normal; }
.report-column-chart .report-chart-label small { white-space:normal; }
.report-column-chart .report-chart-value { text-align:center; }
.report-print-page { padding:.45in; }
.report-print-page .print-content { gap:14px; }
.report-print-page .print-header { align-items:flex-start; }
.report-print-page .report-chart { width:100%; margin:0; break-inside:avoid; }
.report-print-page .report-chart-bars { overflow:visible; min-height:220px; }
.report-print-page .report-column-chart .report-chart-track { height:140px; }
.report-print-page .table-wrap { overflow:visible; border:0; }
.report-print-page table { min-width:0; font-size:10px; table-layout:auto; }
.report-print-page th, .report-print-page td { padding:7px 8px; }
.report-print-meta { display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; }
.report-print-meta span { display:block; border:1px solid #cbd5e1; border-radius:8px; padding:9px 10px; color:#475569; font-size:11px; }
.report-table-wrap { width:min(1120px, 100%); }
.report-table-wrap table { width:auto; min-width:min(850px, 100%); }
.report-chart-row { display:grid; grid-template-columns:minmax(130px, 210px) minmax(120px, 1fr) minmax(92px, auto); align-items:center; gap:10px; min-height:32px; }
.report-chart-label { min-width:0; color:#344054; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.report-chart-label small { display:block; margin-top:2px; color:var(--muted); font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.report-chart-track { height:16px; overflow:hidden; border-radius:999px; background:#eef2f6; }
.report-chart-fill { display:block; height:100%; min-width:3px; border-radius:999px; background:linear-gradient(90deg, var(--primary), #0f5f95); }
.report-chart-value { color:var(--ink); font-size:13px; font-weight:700; text-align:right; white-space:nowrap; }
input, select, textarea { width:100%; border:1px solid var(--line); border-radius:8px; padding:10px 11px; background:white; color:var(--ink); }
.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:8px; }
table { width:100%; border-collapse:collapse; min-width:850px; background:white; }
.compact-table { min-width:0; }
th, td { padding:11px 12px; border-bottom:1px solid var(--line); text-align:left; vertical-align:middle; }
th { font-size:12px; text-transform:uppercase; color:var(--muted); background:#f8fafc; }
tr:last-child td { border-bottom:0; }
.badge { display:inline-flex; align-items:center; border-radius:999px; padding:4px 9px; font-size:12px; background:#e8f3f1; color:var(--primary-dark); white-space:nowrap; }
.badge.warn { background:#fff7ed; color:var(--accent); }
.badge.danger { background:#fef3f2; color:var(--danger); }
.badge.overstock { background:#eff6ff; color:#1d4ed8; }
.danger-text { color:var(--danger); }
.incoming-auto .badge { box-shadow:0 0 0 2px rgba(245, 158, 11, .12); }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-grid label, .modal-form label { display:grid; gap:6px; color:var(--muted); font-size:13px; }
.movement-history { grid-column:1 / -1; }
.movement-history-filters { grid-template-columns:repeat(2, minmax(160px, 220px)) auto auto; margin-bottom:14px; }
.quote-history-panel { margin-top:16px; }
.quote-history-filters { grid-template-columns:repeat(2, minmax(160px, 220px)) auto auto; margin-bottom:14px; }
.import-help { color:var(--muted); font-size:13px; line-height:1.5; margin:0 0 12px; }
.movement-import-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.import-status { color:var(--ok); font-size:13px; font-weight:600; line-height:1.45; margin:14px 0 0; min-height:19px; }
.import-status.error { color:var(--danger); }
.product-import-status { margin:0 0 12px; }
.wide { grid-column:1 / -1; }
.list { display:grid; gap:10px; }
.empty { color:var(--muted); }
.list-item { border:1px solid var(--line); border-radius:8px; padding:12px; background:#fbfcfe; display:grid; gap:4px; }
.list-item strong { color:var(--ink); }
.quote-items { display:block; }
.quote-items table { min-width:640px; }
.quote-items tfoot td { font-weight:800; background:#f8fafc; }
.quote-items tfoot td:first-child { text-align:right; }
.quote-quantity-input, .quote-price-input, .table-number-input { max-width:108px; padding:7px 8px; }
.cycle-count-layout { align-items:start; }
.cycle-generator { display:grid; grid-template-columns:minmax(260px, 1fr) auto; align-items:end; gap:10px; margin-bottom:10px; }
.cycle-generator label { display:grid; gap:6px; color:var(--muted); font-size:13px; }
.cycle-progress { min-height:20px; margin-top:8px; }
.cycle-count-table-wrap { margin-top:12px; }
.cycle-count-table-wrap table { min-width:520px; }
.cycle-count-table-wrap input { min-width:118px; }
.cycle-save-button { margin-top:12px; width:auto; }
.cycle-history-panel { margin-top:16px; }
.sales-po-table { min-width:1280px; }
.sales-po-table td { vertical-align:top; }
.sales-po-table th:nth-child(7),
.sales-po-table td:nth-child(7) { min-width:260px; }
.sales-po-preview-header { display:flex; justify-content:space-between; align-items:flex-end; gap:12px; margin:4px 0 10px; }
.sales-po-preview-header strong { color:var(--ink); }
.sales-po-preview-header small { color:var(--muted); text-align:right; }
.sales-po-validation-note { margin-top:6px; }
.sales-po-preview-table table { min-width:920px; }
.sales-po-preview-table input { min-width:120px; padding:7px 8px; }
.cards, .po-board { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:12px; }
.po-board { grid-template-columns:repeat(auto-fill, minmax(300px, 360px)); justify-content:start; align-items:start; }
.card, .po-card { padding:14px; display:grid; gap:7px; }
.po-card { min-width:0; max-width:360px; overflow:hidden; align-content:start; }
.po-card > * { min-width:0; overflow-wrap:anywhere; }
.po-card strong { line-height:1.25; }
.po-card span, .po-card small { line-height:1.35; }
.card small, .po-card small { color:var(--muted); }
.card-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; min-width:0; }
.po-card .card-actions { align-items:center; }
.po-card .icon-button { width:auto; max-width:100%; min-width:0; white-space:normal; overflow-wrap:anywhere; line-height:1.2; }
.open-item-current { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:12px 0 14px; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:#f8fafc; }
.open-item-current .eyebrow { display:block; color:var(--muted); font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.open-item-current strong { display:block; margin-top:4px; font-size:24px; }
.open-item-current small { display:block; margin-top:4px; color:var(--muted); }
.open-item-compact-form { grid-template-columns:minmax(220px, 360px) minmax(90px, 120px) max-content 1fr; align-items:end; }
.open-item-compact-form label { max-width:360px; }
.open-item-compact-form input { min-height:34px; padding:7px 9px; }
.open-item-compact-form button,
.open-item-history-filter button { min-height:40px; padding:10px 14px; line-height:1.2; border-radius:8px; align-self:end; }
.open-item-final-actions { display:flex; justify-content:flex-end; gap:8px; align-items:end; }
.open-item-history-filter { grid-template-columns:repeat(2, minmax(135px, 170px)) max-content max-content; align-items:end; }
.open-item-history-filter label { max-width:170px; }
.open-item-history-filter input { min-height:34px; padding:7px 9px; }
.icon-button { display:inline-flex; align-items:center; justify-content:center; width:auto; max-width:100%; min-height:40px; border:1px solid var(--line); background:white; border-radius:8px; padding:10px 14px; cursor:pointer; line-height:1.2; white-space:nowrap; }
.icon-button.danger { border-color:#fecdca; color:var(--danger); background:#fff7f6; }
.inline-check { display:flex !important; grid-template-columns:auto 1fr; align-items:center; gap:8px !important; color:var(--ink) !important; }
.inline-check input { width:auto; }
.permissions { border:1px solid var(--line); border-radius:8px; padding:12px; display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:0; }
.permissions legend { color:var(--muted); font-size:13px; padding:0 6px; }
.permissions label { display:flex; align-items:center; gap:8px; color:var(--ink); }
.permissions input { width:auto; }
.permission-group-title { grid-column:1 / -1; color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; margin-top:4px; }
.status-off { background:#f2f4f7; color:#667085; }
.status-ok { background:#ecfdf3; color:var(--ok); }
.restock-row td { background:#fff7ed; }
.overstock-row td { background:#eff6ff; }
.hint { font-size:13px; line-height:1.45; }
.form-confirmation { min-height:20px; color:var(--ok); font-size:13px; font-weight:700; }
.format-upload { display:grid; gap:12px; }
.format-upload label { display:grid; gap:7px; color:var(--muted); font-size:13px; }
.quote-format-controls { border:1px solid var(--line); border-radius:8px; padding:12px; margin:0; display:grid; grid-template-columns:repeat(3, minmax(160px, 1fr)); gap:12px; }
.quote-format-controls legend { color:var(--muted); font-size:12px; font-weight:700; padding:0 6px; text-transform:uppercase; }
.quote-format-controls input[type="range"] { padding:0; accent-color:var(--primary); }
.quote-preview-panel { margin-top:16px; }
.quote-format-preview { max-width:100%; max-height:78vh; overflow:auto; padding:14px; border:1px solid var(--line); border-radius:8px; background:#e9edf3; }
.quote-format-preview .print-page { margin:0; transform:scale(.76); transform-origin:top left; box-shadow:0 16px 42px rgba(15,23,42,.18); }
.template-preview { display:grid; grid-template-columns:repeat(auto-fit, minmax(120px, 1fr)); gap:10px; margin-top:14px; }
.template-thumb { border:1px solid var(--line); border-radius:8px; padding:8px; background:#fbfcfe; }
.template-thumb img { width:100%; aspect-ratio:4 / 3; object-fit:contain; display:block; background:white; border-radius:6px; }
.template-thumb span { display:block; color:var(--muted); font-size:12px; margin-top:6px; }
#printDocument { display:none; }
.print-page { width:8.5in; min-height:11in; margin:0 auto; padding:.65in; background:white; color:#111827; position:relative; overflow:hidden; }
.print-bg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.22; z-index:0; }
.print-content { position:relative; z-index:1; display:grid; gap:18px; }
.print-header { display:flex; justify-content:space-between; gap:24px; border-bottom:2px solid #111827; padding-bottom:14px; }
.print-brand { display:flex; gap:14px; align-items:flex-start; }
.print-logo { width:86px; max-height:72px; object-fit:contain; }
.print-title { text-align:right; }
.print-title h1 { font-size:28px; margin:0; }
.print-title strong { display:block; margin-top:8px; }
.print-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.print-box { border:1px solid #cbd5e1; border-radius:8px; padding:12px; min-height:104px; }
.print-box h2 { font-size:13px; text-transform:uppercase; color:#475569; margin-bottom:8px; }
.print-table { min-width:0; border:1px solid #cbd5e1; }
.print-table th, .print-table td { border-bottom:1px solid #cbd5e1; }
.cycle-print-table th, .cycle-print-table td { padding:8px; font-size:11px; }
.cycle-print-table th:nth-child(n+3), .cycle-print-table td:nth-child(n+3) { text-align:center; }
.print-total { justify-self:end; min-width:260px; border:1px solid #cbd5e1; border-radius:8px; padding:12px; display:grid; gap:8px; }
.print-total div { display:flex; justify-content:space-between; gap:16px; }
.print-total strong { font-size:20px; }
.print-signatures { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin-top:34px; }
.print-signatures div { border-top:1px solid #111827; padding-top:8px; text-align:center; color:#475569; }
.print-page-quote { padding:.42in .54in .5in; color:#172033; }
.print-page-quote::before { content:""; position:absolute; inset:0 0 auto; height:8px; background:linear-gradient(90deg,#b78916 0 28%,#101827 28% 100%); z-index:1; }
.print-page-quote::after { content:""; position:absolute; right:-1.15in; top:-.95in; width:3.4in; height:3.4in; border:34px solid rgba(183,137,22,.11); border-radius:50%; z-index:0; }
.print-page-quote .print-content { gap:15px; font-size:calc(11px * var(--quote-font-scale, 1)); }
.print-page-quote .print-header { align-items:flex-start; border-bottom:0; padding:18px 0 12px; position:relative; }
.print-page-quote .print-header::after { content:""; position:absolute; left:0; right:0; bottom:0; height:3px; background:linear-gradient(90deg,#b78916 0 22%,#101827 22% 100%); }
.print-page-quote .print-brand { max-width:60%; align-items:center; gap:16px; }
.print-page-quote .print-brand > div { display:grid; gap:2px; font-size:10.5px; line-height:1.35; color:#536078; }
.print-page-quote .print-brand strong { color:#101827; font-size:14px; letter-spacing:.06em; text-transform:uppercase; }
.print-page-quote .print-logo { width:var(--quote-logo-width, 154px); max-height:72px; }
.print-page-quote .print-title { min-width:245px; padding:14px 16px 13px; border:0; background:#101827; color:white; box-shadow:inset 0 -5px 0 #b78916; }
.print-page-quote .print-title .print-kicker { margin:0 0 5px; color:#d9b765; font-size:9.5px; text-transform:uppercase; letter-spacing:.16em; font-weight:800; }
.print-page-quote .print-title h1 { font-size:25px; text-transform:uppercase; letter-spacing:.08em; color:white; }
.print-page-quote .print-title strong { margin-top:8px; font-size:20px; color:white; }
.print-page-quote .print-title span { display:block; margin-top:4px; color:#d6deea; font-size:11px; }
.print-page-quote .print-grid { grid-template-columns:1.22fr .98fr; gap:12px; }
.print-page-quote .print-box { min-height:0; border:1px solid #c8d1df; border-top:4px solid #b78916; border-radius:6px; padding:10px 12px; display:grid; gap:4px; font-size:11px; line-height:1.38; background:#fff; box-shadow:0 1px 0 rgba(16,24,39,.06); }
.print-page-quote .print-box h2 { margin:0 0 6px; padding-bottom:6px; border-bottom:1px solid #d8dee8; color:#101827; font-size:10.5px; letter-spacing:.12em; }
.print-page-quote .print-box strong { font-size:13px; color:#101827; }
.print-page-quote .print-box span { display:block; color:#536078; }
.print-page-quote .print-table { border:1px solid #101827; border-collapse:separate; border-spacing:0; font-size:var(--quote-table-font-size, 10.5px); overflow:hidden; table-layout:fixed; }
.print-page-quote .print-table th { padding:9px 10px; background:#101827; color:white; border-color:#101827; font-size:9.5px; letter-spacing:.08em; text-transform:uppercase; }
.print-page-quote .print-table th:first-child { border-left:6px solid #b78916; }
.print-page-quote .print-table td { padding:9px 10px; border-color:#dce3ed; line-height:1.35; }
.print-page-quote .print-table tbody tr:nth-child(even) td { background:#f8fafc; }
.print-page-quote .print-table tbody tr:hover td { background:inherit; }
.print-page-quote .print-table th:nth-child(3),
.print-page-quote .print-table th:nth-child(4),
.print-page-quote .print-table th:nth-child(5),
.print-page-quote .print-table td:nth-child(3),
.print-page-quote .print-table td:nth-child(4),
.print-page-quote .print-table td:nth-child(5) { text-align:right; white-space:nowrap; }
.print-page-quote .print-table td:first-child { width:96px; color:#536078; font-weight:700; }
.print-page-single-line .print-table th:first-child,
.print-page-single-line .print-table td:first-child { width:118px; }
.print-page-single-line .print-table th:nth-child(2),
.print-page-single-line .print-table td:nth-child(2) { width:auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.print-page-single-line .print-table td { white-space:nowrap; }
.print-page-quote .print-total { min-width:295px; border-radius:6px; border:1px solid #101827; padding:0; gap:0; overflow:hidden; background:white; box-shadow:0 2px 0 rgba(16,24,39,.08); }
.print-page-quote .print-total div { padding:9px 13px; border-bottom:1px solid #d8dee8; }
.print-page-quote .print-total div:last-child { border-bottom:0; background:#101827; color:white; box-shadow:inset 5px 0 0 #b78916; }
.print-page-quote .print-total strong { font-size:18px; }
.print-page-quote .print-terms { font-size:10.5px; }
.print-page-quote .print-terms p { margin:0; color:#536078; line-height:1.45; }
.print-page-quote .print-signatures { margin-top:22px; }
.print-page-quote .print-signatures div { border-top-color:#101827; color:#536078; }
.quote-print-footer { display:flex; justify-content:space-between; gap:16px; padding-top:8px; border-top:1px solid #d8dee8; color:#536078; font-size:10px; }
dialog { border:0; border-radius:8px; padding:0; width:min(520px, calc(100vw - 32px)); box-shadow:0 24px 70px rgba(15,23,42,.24); }
dialog::backdrop { background:rgba(15,23,42,.48); }
.modal-form { padding:18px; display:grid; gap:12px; }
.modal-form h2 { margin-bottom:4px; }
.po-line-builder { border:1px solid var(--line); border-radius:8px; padding:12px; margin:0; display:grid; grid-template-columns:1.4fr .7fr 1fr auto; gap:12px; align-items:end; }
.po-line-builder legend { color:var(--muted); font-size:12px; font-weight:700; padding:0 6px; text-transform:uppercase; }
.po-line-builder .table-wrap { margin-top:4px; }
.customer-form { max-height:min(84vh, 760px); overflow:auto; }
.customer-form fieldset { border:1px solid var(--line); border-radius:8px; padding:12px; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.customer-form legend { color:var(--muted); font-size:12px; font-weight:700; padding:0 6px; text-transform:uppercase; }
#customerFiscalPdfStatus { min-height:18px; }
.fiscal-preview { border:1px solid var(--line); border-radius:8px; padding:12px; background:#fbfcfe; display:grid; gap:10px; }
.fiscal-preview.hidden { display:none; }
.fiscal-preview > strong { font-size:13px; color:var(--ink); }
.fiscal-preview #customerFiscalPdfPreviewRows { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.fiscal-preview #customerFiscalPdfPreviewRows div { border:1px solid var(--line); border-radius:8px; padding:8px; background:white; display:grid; gap:3px; }
.fiscal-preview #customerFiscalPdfPreviewRows span { color:var(--muted); font-size:11px; }
.fiscal-preview #customerFiscalPdfPreviewRows strong { font-size:12px; font-weight:600; overflow-wrap:anywhere; }
menu { display:flex; justify-content:flex-end; gap:10px; padding:0; margin:8px 0 0; }
@media (max-width: 900px) { body { display:block; } .sidebar { width:auto; min-height:auto; position:static; } .nav { grid-template-columns:repeat(2, 1fr); } .nav-group { align-content:start; } .app { padding:16px; } .topbar, .grid.two { display:grid; grid-template-columns:1fr; } .metrics { grid-template-columns:repeat(2, 1fr); } .dashboard-welcome { align-items:flex-start; flex-direction:column; } .dashboard-actions { justify-content:flex-start; max-width:none; } }
@media (max-width: 560px) { .metrics, .form-grid, .nav, .report-filters, .quote-item-row, .cycle-generator, .po-line-builder, .customer-form fieldset, .fiscal-preview #customerFiscalPdfPreviewRows { grid-template-columns:1fr; } h1 { font-size:24px; } .panel-header { align-items:flex-start; flex-direction:column; } .dashboard-panel .panel-header { flex-direction:row; } .report-actions { flex-wrap:wrap; } .report-chart-header, .report-chart-row { grid-template-columns:1fr; align-items:start; } .report-chart-total, .report-chart-value { text-align:left; } }
@media print {
  body { display:block; background:white; }
  body > :not(#printDocument) { display:none !important; }
  #printDocument { display:block; }
  .print-page { width:auto; min-height:auto; margin:0; box-shadow:none; }
  @page { size: letter; margin:0; }
}

:root {
  --primary:#c49a00;
  --primary-dark:#a88400;
  --primary-soft:#fff7d7;
}

.login-card { width:min(460px, 100%); }
.login-brand { flex-direction:column; justify-content:center; text-align:center; gap:8px; }
.forgot-password-button { justify-self:center; border:0; background:transparent; color:#475569; padding:2px 4px; min-height:auto; cursor:pointer; font-size:12px; font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.forgot-password-button:hover { color:var(--primary-dark); background:transparent; }
.login-footer { margin:4px 0 0; padding-top:12px; border-top:1px solid var(--line); text-align:center; color:#98a2b3; font-size:11px; letter-spacing:0; }
.brand-logo { display:block; object-fit:contain; background:white; border-radius:6px; }
.brand-logo-login { width:260px; max-width:100%; max-height:86px; margin:0 auto; }
.brand-subtitle { display:block; color:var(--muted); font-size:12px; font-weight:400; line-height:1.35; letter-spacing:0; text-align:center; }
.sidebar .brand { flex-direction:column; align-items:center; gap:7px; }
.brand-logo-sidebar { width:152px; max-height:54px; padding:5px; }
.sidebar .brand > div { width:152px; }
.sidebar .brand .brand-subtitle { color:#c8d0dc; font-size:11px; }

.nav-group.open .nav-group-title,
.nav-group-title:hover,
.nav-item:hover,
.nav-item.active {
  background:var(--primary);
  color:#111827;
}

.primary-button,
.ghost-button,
.import-button,
.icon-button {
  border-color:var(--primary);
  background:var(--primary);
  color:#111827;
  font-weight:700;
}

.primary-button:hover,
.ghost-button:hover,
.import-button:hover,
.icon-button:hover {
  background:var(--primary-dark);
  border-color:var(--primary-dark);
  color:#111827;
}

.primary-button:disabled,
.ghost-button:disabled,
.import-button:disabled,
.icon-button:disabled {
  opacity:.55;
  cursor:not-allowed;
}

.icon-button.danger {
  border-color:#fecdca;
  background:#fff7f6;
  color:var(--danger);
}

.icon-button.danger:hover {
  background:#fee4e2;
  border-color:#fecdca;
  color:var(--danger);
}
