:root { color-scheme: light; --ink:#121820; --muted:#667085; --line:#d9dee7; --panel:#fff; --bg:#f4f7fb; --primary:#0784c7; --primary-dark:#05699f; --primary-soft:#e5f6ff; --accent:#00aeef; --danger:#b42318; --ok:#15803d; }
* { box-sizing: border-box; }
[hidden] { display:none !important; }
.sidebar img.brand-logo,
.sidebar img.brand-logo-sidebar,
aside.sidebar img.brand-logo,
aside.sidebar img.brand-logo-sidebar {
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}
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:#07111f; }
.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:#fff; color:var(--ink); border-right:1px solid var(--line); 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:#121820; }
.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-stack { display:grid; grid-template-columns:1fr; gap:16px; }
.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; }
.dashboard-scroll-table { max-height:420px; overflow:auto; border:1px solid var(--line); border-radius:8px; scrollbar-gutter:stable; }
.dashboard-scroll-table::-webkit-scrollbar { width:12px; height:12px; }
.dashboard-scroll-table::-webkit-scrollbar-thumb { background:#9aa3af; border-radius:999px; border:3px solid #f8fafc; }
.dashboard-scroll-table::-webkit-scrollbar-track { background:#f1f5f9; border-radius:999px; }
.dashboard-list-table { width:max-content; min-width:100%; table-layout:auto; }
.dashboard-list-table th, .dashboard-list-table td { white-space:nowrap; }
.dashboard-list-table th { position:sticky; top:0; z-index:1; }
.dashboard-list-table td { padding:11px 12px; }
.dashboard-list-table th:nth-child(1), .dashboard-list-table td:nth-child(1) { min-width:120px; }
.dashboard-list-table th:nth-child(2), .dashboard-list-table td:nth-child(2) { min-width:250px; }
.dashboard-list-table th:nth-child(3), .dashboard-list-table td:nth-child(3) { min-width:180px; }
.dashboard-list-table th:nth-child(4), .dashboard-list-table td:nth-child(4) { min-width:130px; }
.dashboard-list-table th:nth-child(5), .dashboard-list-table td:nth-child(5) { min-width:170px; }
.dashboard-list-table th:nth-child(6), .dashboard-list-table td:nth-child(6) { min-width:130px; }
.freight-panel { min-height:calc(100vh - 128px); }
.freight-frame-shell { display:grid; grid-template-rows:auto 1fr; min-height:calc(100vh - 230px); border:1px solid var(--line); border-radius:8px; overflow:hidden; background:#fff; }
.freight-frame-note { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:10px 14px; border-bottom:1px solid var(--line); background:#f8fafc; color:var(--muted); font-size:13px; }
.freight-frame-note strong { color:var(--ink); }
.freight-frame-shell iframe { width:100%; height:100%; min-height:660px; border:0; background:#fff; }
.freight-dashboard-panel { padding:0; overflow:hidden; background:#fbfaf7; }
.freight-dashboard-shell { display:grid; grid-template-columns:230px 1fr; min-height:calc(100vh - 132px); }
.freight-dashboard-side { display:grid; align-content:start; gap:10px; padding:18px 14px; border-right:1px solid #e5e1d8; background:#f4eee6; }
.freight-dashboard-logo { display:flex; align-items:baseline; gap:2px; min-height:42px; color:#008a22; font-weight:900; }
.freight-dashboard-logo span { font-size:21px; }
.freight-dashboard-logo small { color:#121820; font-size:20px; }
.freight-dash-menu { display:flex; align-items:center; min-height:42px; border:0; border-radius:8px; padding:10px 12px; background:transparent; color:#1f2937; font-size:14px; font-weight:700; text-align:left; cursor:pointer; }
.freight-dash-menu.active, .freight-dash-menu:hover { background:#e7e2dc; color:#008a22; }
.freight-dashboard-main { display:grid; align-content:start; gap:12px; padding:16px 18px; }
.freight-dashboard-top { display:flex; justify-content:flex-end; align-items:center; gap:10px; min-height:42px; }
.freight-dashboard-filter { display:flex; align-items:end; gap:8px; margin-right:auto; }
.freight-dashboard-filter label { display:grid; gap:4px; color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; }
.freight-dashboard-filter input { min-height:36px; border:1px solid var(--line); border-radius:8px; padding:8px 10px; background:#fff; color:var(--ink); }
.freight-recharge-button { display:flex; align-items:center; gap:12px; min-height:38px; border:1px solid var(--line); border-radius:8px; padding:0 8px; background:#fff; color:#024638; cursor:pointer; }
.freight-recharge-button span { font-size:18px; font-weight:900; }
.freight-recharge-button strong { min-width:78px; font-size:16px; text-align:right; }
.freight-recharge-button small { color:#64748b; font-size:11px; font-weight:800; text-transform:uppercase; }
.freight-recharge-button b { display:grid; place-items:center; width:30px; height:30px; border-radius:6px; background:#024638; color:#fff; font-size:20px; line-height:1; }
.freight-dashboard-metrics { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
.freight-dashboard-metrics article { min-height:92px; padding:14px 16px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.freight-dashboard-metrics span { color:#4b5563; font-size:14px; font-weight:700; }
.freight-dashboard-metrics strong { display:block; margin-top:18px; color:#08111f; font-size:26px; }
.freight-dashboard-metrics small { display:block; margin-top:6px; color:var(--muted); }
.freight-dashboard-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.freight-dashboard-card { min-height:220px; padding:16px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.freight-dashboard-card .panel-header { margin-bottom:10px; }
.freight-dashboard-card h3 { margin:0; font-size:16px; }
.freight-empty-state { display:grid; place-items:center; align-content:center; min-height:160px; color:#89938f; text-align:center; }
.freight-empty-state strong { color:#89938f; font-size:17px; }
.freight-empty-state span { max-width:280px; margin-top:6px; font-size:12px; line-height:1.4; }
.freight-period-chart { display:grid; grid-template-columns:repeat(auto-fit, minmax(82px, 1fr)); align-items:end; gap:18px; min-height:160px; padding:14px 18px 4px; }
.freight-period-bar { display:grid; grid-template-rows:auto 120px auto; justify-items:center; gap:6px; min-width:0; color:#667085; font-size:12px; }
.freight-period-bar span { font-weight:800; }
.freight-period-bar b { align-self:end; width:min(72px, 80%); height:var(--bar); border-radius:8px 8px 0 0; background:#00a900; }
.freight-period-bar small { color:var(--muted); font-weight:800; text-transform:capitalize; }
.freight-destination-list { display:grid; align-content:center; gap:16px; min-height:160px; padding:12px; }
.freight-destination-row { display:grid; grid-template-columns:minmax(120px, 180px) 1fr auto; align-items:center; gap:10px; color:#334155; font-size:13px; }
.freight-destination-row div { height:8px; overflow:hidden; border-radius:999px; background:#e5e7eb; }
.freight-destination-row b { display:block; height:100%; border-radius:999px; background:#00a900; }
.freight-destination-row strong { color:#475569; font-size:13px; }
.freight-order-list-shell { display:block; min-height:160px; color:inherit; text-align:left; }
.freight-order-list { display:grid; gap:10px; }
.freight-order-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid #edf0f4; }
.freight-order-row:last-child { border-bottom:0; }
.freight-order-row strong, .freight-order-row b { display:block; color:#0f172a; font-size:14px; }
.freight-order-row small { display:block; margin-top:2px; color:var(--muted); font-size:11px; }
.freight-status-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px; margin-bottom:16px; }
.freight-status-card { display:grid; gap:7px; min-height:96px; padding:16px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.freight-status-card span { color:var(--muted); font-size:12px; }
.freight-status-card strong { font-size:22px; color:var(--ink); }
.freight-status-card small { color:var(--muted); line-height:1.35; }
.freight-workspace { display:grid; gap:16px; }
.freight-form, .freight-results { display:grid; gap:14px; padding:16px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.freight-form-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.freight-form-head h3, .freight-results h3 { margin:0; font-size:18px; }
.freight-results .panel-header p { max-width:1100px; line-height:1.45; }
.freight-form fieldset { display:grid; grid-template-columns:repeat(3, minmax(220px, 1fr)); gap:12px; margin:0; padding:14px; border:1px solid var(--line); border-radius:8px; }
.freight-form legend { padding:0 6px; color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; }
.freight-zip-status { display:block; min-height:16px; margin-top:5px; color:var(--muted); font-size:11px; line-height:1.35; }
.freight-compact-form { grid-template-columns:repeat(4, minmax(160px, 1fr)); align-items:end; }
.freight-compact-form .freight-form-head, .freight-compact-form .freight-empty, .freight-compact-form .freight-error, .freight-compact-form .freight-response { grid-column:1 / -1; }
.freight-empty { padding:12px; border:1px dashed var(--line); border-radius:8px; color:var(--muted); background:#f8fafc; }
.freight-error { padding:12px; border:1px solid #fecdca; border-radius:8px; background:#fff7f6; color:var(--danger); font-weight:700; }
.freight-response { max-height:320px; margin:0; overflow:auto; white-space:pre-wrap; word-break:break-word; padding:12px; border:1px solid var(--line); border-radius:8px; background:#0f172a; color:#e5edf8; font-size:12px; line-height:1.5; }
.freight-table-wrap { max-height:360px; }
.freight-table { min-width:760px; }
.freight-rate-list { display:grid; gap:10px; }
.freight-rate-card { display:grid; grid-template-columns:92px 1fr auto; align-items:stretch; min-height:88px; overflow:hidden; border:1px solid var(--line); border-radius:8px; background:#fff; box-shadow:0 4px 12px rgba(15,23,42,.04); }
.freight-rate-brand { display:grid; place-items:center; min-height:88px; padding:10px; color:#fff; font-size:20px; font-weight:900; text-align:center; line-height:1; }
.freight-rate-brand-fedex { background:#4d148c; }
.freight-rate-brand-dhl { background:#ffd600; color:#d40511; font-style:italic; }
.freight-rate-brand-estafeta { background:#e30613; color:#fff; font-style:italic; }
.freight-rate-brand-paquetexpress { background:#08266f; color:#fff; font-size:11px; }
.freight-rate-brand-sendex { background:#005f61; color:#fff; font-size:15px; }
.freight-rate-brand-generic { background:#344054; color:#fff; font-size:14px; }
.freight-rate-info { display:grid; align-content:center; gap:7px; padding:12px 14px; min-width:0; }
.freight-rate-line { display:flex; flex-wrap:wrap; align-items:center; gap:18px; color:#799792; font-size:14px; }
.freight-rate-line span::before { display:inline-block; margin-right:5px; color:#64748b; font-size:10px; font-weight:900; text-transform:uppercase; }
.freight-rate-line span:nth-child(1)::before { content:"Fecha"; }
.freight-rate-line span:nth-child(2)::before { content:"Tipo"; }
.freight-rate-line span:nth-child(3)::before { content:"Entrega"; }
.freight-rate-info strong { color:var(--ink); font-size:13px; }
.freight-rate-info small { color:var(--muted); font-size:11px; overflow-wrap:anywhere; }
.freight-rate-price { color:#1f5c4f; font-size:24px; font-weight:900; text-align:right; white-space:nowrap; }
.freight-rate-side { display:grid; align-content:center; justify-items:end; gap:10px; padding:12px 12px 12px 18px; }
.freight-rate-charges { display:flex; flex-wrap:wrap; gap:5px; }
.freight-rate-charges small { padding:4px 7px; border-radius:999px; background:#eef2ff; color:#334155; font-size:10px; }
.freight-rate-action { min-width:104px; min-height:34px; padding:8px 12px; }
.freight-guide-card { display:grid; grid-template-columns:repeat(2, minmax(180px, 1fr)) auto; gap:12px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:8px; background:#f8fafc; }
.freight-guide-card span { display:block; color:var(--muted); font-size:11px; text-transform:uppercase; }
.freight-guide-card strong { display:block; margin-top:4px; color:var(--ink); font-size:20px; }
.freight-guide-card small { display:block; margin-top:3px; color:var(--muted); }
.freight-guide-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.freight-guide-actions a { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
.freight-note { grid-column:1 / -1; margin:0; padding:10px 12px; border:1px solid #fde68a; border-radius:8px; background:#fffbeb; color:#92400e; font-size:13px; }
.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; }
.inventory-filter-bar { display:flex; justify-content:flex-start; gap:10px; margin:0 0 12px; }
.inventory-filter-bar label { display:grid; gap:6px; width:min(360px, 100%); color:var(--muted); font-size:13px; }
.inventory-filter-bar .inventory-alert-filter-label { display:none; }
.inventory-search-label input { min-height:38px; }
.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; }
.inventory-print-table { font-size:8.5px; }
.inventory-print-table th, .inventory-print-table td { padding:5px 6px; }
.inventory-print-table th:nth-child(2), .inventory-print-table td:nth-child(2),
.inventory-print-table th:nth-child(3), .inventory-print-table td:nth-child(3) { max-width:150px; overflow:hidden; text-overflow:ellipsis; }
.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; scrollbar-gutter:stable; }
.table-wrap::-webkit-scrollbar,
.invoice-table-wrap::-webkit-scrollbar,
.invoice-detail-table-wrap::-webkit-scrollbar { width:12px; height:12px; }
.table-wrap::-webkit-scrollbar-thumb,
.invoice-table-wrap::-webkit-scrollbar-thumb,
.invoice-detail-table-wrap::-webkit-scrollbar-thumb { background:#9aa3af; border-radius:999px; border:3px solid #f8fafc; }
.table-wrap::-webkit-scrollbar-track,
.invoice-table-wrap::-webkit-scrollbar-track,
.invoice-detail-table-wrap::-webkit-scrollbar-track { background:#f1f5f9; border-radius:999px; }
table { width:100%; border-collapse:collapse; min-width:850px; background:white; font-size:15px; }
.compact-table { min-width:980px; }
th, td { padding:13px 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; }
.pre-cancelled-table { min-width:1180px; }
.pre-cancelled-table th, .pre-cancelled-table td { vertical-align:top; }
.pre-cancelled-filter-bar { display:grid; grid-template-columns:minmax(180px, 260px) minmax(260px, 420px); gap:12px; margin:0 0 12px; align-items:end; }
.pre-cancelled-filter-bar label { display:grid; gap:6px; color:var(--muted); font-size:13px; }
.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; }
.bank-account-list-head { width:min(270px, 100%); margin:0 0 18px; border:1px solid var(--line); border-radius:3px; background:#fff; padding:7px 8px 9px; }
.bank-account-view-button { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:24px; padding:0; border:0; background:transparent; color:var(--ink); font-size:13px; font-weight:600; text-align:left; }
.bank-account-view-button span:first-child { color:var(--muted); font-size:13px; }
.bank-account-view-button span:last-child { margin-left:auto; color:var(--muted); font-size:11px; }
.bank-account-list-head small { display:block; margin-top:4px; color:var(--muted); font-size:11px; }
.bank-account-table-wrap { border-radius:0; max-width:780px; overflow:visible; }
.bank-account-table { width:100%; min-width:640px; table-layout:fixed; font-size:12px; }
.bank-account-table th { background:#fff; color:#475467; font-size:12px; font-weight:600; text-transform:none; text-align:center; }
.bank-account-table th, .bank-account-table td { padding:14px 12px; }
.bank-account-table th:first-child, .bank-account-table td:first-child { width:36px; padding-left:8px; padding-right:6px; text-align:center; }
.bank-account-table td { font-size:12px; font-weight:600; color:#1f2937; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bank-account-table tr.is-inactive td { color:#98a2b3; }
.bank-account-actions-cell { overflow:visible; }
.row-action-menu { position:relative; display:inline-block; }
.row-action-menu summary { list-style:none; cursor:pointer; width:22px; height:24px; display:grid; place-items:center; border-radius:4px; color:#121820; font-size:18px; line-height:1; }
.row-action-menu summary::-webkit-details-marker { display:none; }
.row-action-menu summary:hover { background:#f2f4f7; }
.row-action-menu div { position:absolute; top:26px; left:0; z-index:20; display:grid; gap:2px; min-width:96px; padding:6px; border:1px solid var(--line); border-radius:6px; background:#fff; box-shadow:0 10px 24px rgba(15, 23, 42, .14); }
.row-action-menu:not([open]) div { display:none; }
.row-action-menu button { width:100%; border:0; border-radius:4px; background:transparent; padding:7px 8px; color:var(--ink); font-size:12px; font-weight:700; text-align:left; }
.row-action-menu button:hover { background:#f2f4f7; }
.row-action-menu button.danger { color:#b42318; }
.cfdi-system-toolbar { display:grid; grid-template-columns:minmax(280px, 385px) minmax(260px, 420px) minmax(140px, 170px) minmax(140px, 170px); gap:14px; align-items:end; margin-bottom:18px; }
.cfdi-system-toolbar label { display:grid; gap:6px; color:var(--muted); font-size:13px; }
.cfdi-system-list-head { border:1px solid var(--line); border-radius:3px; background:#fff; padding:8px 10px 10px; }
.cfdi-system-view-button { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; min-height:24px; padding:0; border:0; background:transparent; color:var(--ink); font-size:13px; font-weight:600; text-align:left; }
.cfdi-system-view-button span:first-child { color:var(--muted); font-size:13px; }
.cfdi-system-view-button span:last-child { margin-left:auto; color:var(--muted); font-size:11px; }
.cfdi-system-list-head small { display:block; margin-top:6px; color:var(--muted); font-size:11px; }
.cfdi-system-table-wrap { max-width:970px; border-radius:0; }
.cfdi-system-table { width:100%; min-width:970px; table-layout:fixed; font-size:12px; }
.cfdi-system-table th { background:#fff; color:#475467; font-size:12px; font-weight:600; text-transform:none; }
.cfdi-system-table th, .cfdi-system-table td { padding:13px 12px; }
.cfdi-system-table th:nth-child(1), .cfdi-system-table td:nth-child(1) { width:70px; text-align:center; }
.cfdi-system-table th:nth-child(2), .cfdi-system-table td:nth-child(2) { width:240px; }
.cfdi-system-table th:nth-child(3), .cfdi-system-table td:nth-child(3) { width:140px; }
.cfdi-system-table th:nth-child(4), .cfdi-system-table td:nth-child(4) { width:150px; }
.cfdi-system-table td { font-size:11px; font-weight:600; color:#1f2937; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; }
.cfdi-system-table td:nth-child(2) { white-space:normal; word-break:break-word; line-height:1.25; }
.catalog-pagination .active-page { background:#d9f99d; border-color:#bef264; color:#1f2937; }
.pagination-gap { display:inline-flex; align-items:center; padding:0 4px; color:var(--muted); }
.product-table { width:max-content; min-width:100%; table-layout:auto; }
.product-table th, .product-table td { white-space:nowrap; overflow:visible; text-overflow:clip; }
.product-table th:nth-child(1), .product-table td:nth-child(1) { min-width:120px; }
.product-table th:nth-child(2), .product-table td:nth-child(2) { min-width:260px; }
.product-table th:nth-child(3), .product-table td:nth-child(3) { min-width:180px; }
.product-table th:nth-child(4), .product-table td:nth-child(4) { min-width:130px; }
.product-table th:nth-child(5), .product-table td:nth-child(5) { min-width:125px; }
.product-table th:nth-child(6), .product-table td:nth-child(6) { min-width:105px; }
.product-table th:nth-child(9), .product-table td:nth-child(9),
.product-table th:nth-child(10), .product-table td:nth-child(10),
.product-table th:nth-child(11), .product-table td:nth-child(11) { min-width:135px; }
.product-table th:nth-child(12), .product-table td:nth-child(12) { min-width:140px; }
.product-table th:nth-child(13), .product-table td:nth-child(13) { min-width:180px; }
.product-table th:nth-child(14), .product-table td:nth-child(14) { min-width:170px; }
.inventory-table { width:max-content; min-width:100%; table-layout:auto; }
.inventory-table th, .inventory-table td { white-space:nowrap; }
.inventory-table th:nth-child(1), .inventory-table td:nth-child(1) { min-width:82px; width:82px; }
.inventory-table th:nth-child(2), .inventory-table td:nth-child(2) { min-width:120px; }
.inventory-table th:nth-child(3), .inventory-table td:nth-child(3) { min-width:260px; }
.inventory-table th:nth-child(4), .inventory-table td:nth-child(4) { min-width:170px; }
.inventory-table th:nth-child(5), .inventory-table td:nth-child(5) { min-width:150px; }
.inventory-table th:nth-child(12), .inventory-table td:nth-child(12) { min-width:96px; width:96px; text-align:center; }
.inventory-order-controls { display:flex; align-items:center; gap:5px; }
.inventory-order-button { width:32px; min-width:32px; height:32px; min-height:32px; padding:0; justify-content:center; font-size:16px; line-height:1; }
.inventory-add-assignment-button { width:34px; min-width:34px; height:34px; min-height:34px; padding:0; justify-content:center; font-size:20px; line-height:1; }
.inventory-assignment-table { width:max-content; min-width:1320px; table-layout:auto; }
.inventory-assignment-table th, .inventory-assignment-table td { white-space:nowrap; overflow:visible; text-overflow:clip; }
.inventory-assignment-table th:nth-child(1), .inventory-assignment-table td:nth-child(1) { min-width:140px; }
.inventory-assignment-table th:nth-child(2), .inventory-assignment-table td:nth-child(2) { min-width:280px; }
.inventory-assignment-table th:nth-child(3), .inventory-assignment-table td:nth-child(3) { min-width:220px; }
.inventory-assignment-table th:nth-child(4), .inventory-assignment-table td:nth-child(4) { min-width:150px; }
.inventory-assignment-table th:nth-child(8), .inventory-assignment-table td:nth-child(8) { min-width:170px; }
.inventory-assignment-table th:nth-child(9), .inventory-assignment-table td:nth-child(9) { min-width:220px; }
.inventory-assignment-table th:nth-child(10), .inventory-assignment-table td:nth-child(10) { min-width:170px; }
.product-assignment-editor { display:grid; gap:10px; }
.assignment-builder { display:grid; grid-template-columns:repeat(5, minmax(110px, 1fr)) auto; gap:10px; align-items:end; }
.assignment-builder label { min-width:0; }
.product-assignment-draft-wrap { max-height:220px; overflow:auto; }
.product-assignment-draft-table { width:max-content; min-width:760px; }
.product-assignment-draft-table th,
.product-assignment-draft-table td,
.quote-draft-table th,
.quote-draft-table td { white-space:nowrap; }
.quote-draft-table { width:max-content; min-width:100%; }
.customer-catalog, .supplier-catalog { display:grid; gap:12px; }
.catalog-toolbar { display:grid; grid-template-columns:minmax(260px, 420px) auto minmax(120px, 150px) auto; align-items:end; gap:10px; }
.catalog-toolbar label { display:grid; gap:6px; color:var(--muted); font-size:13px; }
.customer-table-wrap { width:100%; overflow-x:auto; overflow-y:hidden; scrollbar-gutter:stable; padding-bottom:6px; }
.customer-table { width:max-content; min-width:100%; table-layout:auto; }
.customer-table th, .customer-table td { white-space:nowrap; overflow:visible; text-overflow:clip; }
.customer-table td { vertical-align:middle; font-size:15px; line-height:1.35; }
.customer-table th:nth-child(1), .customer-table td:nth-child(1) { min-width:260px; }
.customer-table th:nth-child(2), .customer-table td:nth-child(2) { min-width:130px; }
.customer-table th:nth-child(3), .customer-table td:nth-child(3) { min-width:120px; }
.customer-table th:nth-child(4), .customer-table td:nth-child(4) { min-width:260px; }
.customer-table th:nth-child(5), .customer-table td:nth-child(5) { min-width:140px; }
.customer-table th:nth-child(6), .customer-table td:nth-child(6) { min-width:150px; }
.customer-table th:nth-child(7), .customer-table td:nth-child(7) { min-width:170px; }
.customer-table th:nth-child(8), .customer-table td:nth-child(8) { min-width:360px; }
.customer-table th:nth-child(9), .customer-table td:nth-child(9) { min-width:190px; }
.customer-table td strong, .customer-table td small { display:block; }
.customer-table td small { margin-top:5px; color:var(--muted); }
.supplier-table-wrap { width:100%; overflow-x:auto; overflow-y:hidden; scrollbar-gutter:stable; padding-bottom:6px; }
.supplier-table { min-width:1180px; table-layout:auto; }
.supplier-table th, .supplier-table td { white-space:nowrap; }
.supplier-table td { vertical-align:middle; font-size:15px; line-height:1.35; }
.supplier-table td:nth-child(1) { min-width:230px; }
.supplier-table td:nth-child(4) { min-width:240px; }
.supplier-table td:nth-child(5) { min-width:210px; }
.table-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.customer-payment-invoices-panel { margin-top:16px; }
.customer-payment-invoices-table { min-width:1180px; }
.customer-payment-invoices-table td { vertical-align:top; }
.customer-payments-table { min-width:1280px; }
.customer-payments-table th:nth-child(5), .customer-payments-table td:nth-child(5) { width:110px; max-width:130px; white-space:normal; }
.customer-payments-table th:nth-child(10), .customer-payments-table td:nth-child(10) { min-width:170px; }
.customer-payments-table td:nth-child(10) .table-actions { flex-wrap:nowrap; align-items:center; }
.customer-payments-table td:nth-child(11) { min-width:126px; }
.catalog-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-size:13px; }
.catalog-pagination .ghost-button:disabled { opacity:.45; cursor:not-allowed; }
.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; }
.quotes-stack { display:grid; gap:16px; }
.quote-generation-panel,
.open-quotes-panel,
.quote-history-panel { width:100%; min-width:0; }
.quote-horizontal-form { grid-template-columns:repeat(5, minmax(150px, 1fr)); align-items:end; }
.quote-horizontal-form .quote-product-field { grid-column:span 2; }
.quote-horizontal-form .quote-add-button { align-self:end; min-height:46px; }
.quote-history-panel { margin-top:0; display:flex; flex-direction:column; }
.quote-history-filters { grid-template-columns:repeat(2, minmax(180px, 240px)) auto auto minmax(0, 1fr); margin-bottom:14px; }
.quote-history-list { display:grid; gap:10px; align-content:start; }
.quote-history-item { border:1px solid var(--line); border-radius:8px; padding:12px; background:#fbfcfe; display:grid; gap:10px; }
.quote-history-item-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.quote-history-item-head strong { color:var(--ink); overflow-wrap:anywhere; }
.quote-history-item-head .badge { flex:none; }
.quote-history-actions { display:flex; flex-wrap:wrap; gap:8px; }
.quote-history-actions .icon-button { min-height:34px; padding:7px 11px; border-radius:7px; }
.open-quotes-panel { margin-top:0; }
.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:1120px; width:100%; }
.quote-items tfoot td { font-weight:800; background:#f8fafc; }
.quote-items tfoot td:first-child { text-align:right; }
.open-quotes-table, .quote-history-table { min-width:1180px; table-layout:fixed; }
.open-quotes-table th, .open-quotes-table td,
.quote-history-table th, .quote-history-table td { padding:9px 7px; vertical-align:top; }
.open-quotes-table th:nth-child(1), .open-quotes-table td:nth-child(1),
.quote-history-table th:nth-child(1), .quote-history-table td:nth-child(1) { width:88px; }
.open-quotes-table th:nth-child(2), .open-quotes-table td:nth-child(2),
.quote-history-table th:nth-child(2), .quote-history-table td:nth-child(2) { width:150px; }
.open-quotes-table th:nth-child(3), .open-quotes-table td:nth-child(3),
.quote-history-table th:nth-child(3), .quote-history-table td:nth-child(3) { width:92px; }
.open-quotes-table th:nth-child(4), .open-quotes-table td:nth-child(4),
.quote-history-table th:nth-child(4), .quote-history-table td:nth-child(4) { width:130px; min-width:130px; white-space:nowrap; }
.open-quotes-table th:nth-child(5), .open-quotes-table td:nth-child(5),
.quote-history-table th:nth-child(5), .quote-history-table td:nth-child(5) { width:110px; }
.open-quotes-table th:nth-child(6), .open-quotes-table td:nth-child(6),
.quote-history-table th:nth-child(6), .quote-history-table td:nth-child(6) { width:118px; }
.open-quotes-table th:nth-child(7), .open-quotes-table td:nth-child(7),
.quote-history-table th:nth-child(7), .quote-history-table td:nth-child(7) { width:285px; }
.open-quote-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:0; }
.open-quote-actions .icon-button { min-height:34px; padding:7px 10px; border-radius:7px; font-size:12px; line-height:1; }
.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; }
.purchase-order-workspace { display:grid; grid-template-columns:minmax(0, 1fr) minmax(360px, 1fr); gap:16px; align-items:start; }
.purchase-order-workspace .panel { min-width:0; }
.po-inline-form { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
.po-inline-form label { display:grid; gap:6px; color:var(--muted); font-size:13px; }
.po-draft-wrap, .po-inline-actions { grid-column:1 / -1; }
.po-draft-table { min-width:560px; }
.po-draft-table th, .po-draft-table td { padding:10px 8px; white-space:nowrap; }
.po-draft-table th:nth-child(2), .po-draft-table td:nth-child(2) { min-width:220px; }
.po-draft-table .table-number-input { width:92px; min-width:92px; }
.po-inline-actions { justify-content:flex-end; }
.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-table { width:max-content; min-width:1180px; table-layout:auto; }
.open-item-table th, .open-item-table td { padding:10px 8px; white-space:nowrap !important; overflow:visible; text-overflow:clip; }
.open-item-table th:nth-child(1), .open-item-table td:nth-child(1) { min-width:128px; }
.open-item-table th:nth-child(2), .open-item-table td:nth-child(2) { min-width:360px; width:auto; }
.open-item-table th:nth-child(3), .open-item-table td:nth-child(3) { min-width:120px; }
.open-item-table th:nth-child(4), .open-item-table td:nth-child(4) { min-width:126px; }
.open-item-table th:nth-child(5), .open-item-table td:nth-child(5),
.open-item-table th:nth-child(6), .open-item-table td:nth-child(6),
.open-item-table th:nth-child(7), .open-item-table td:nth-child(7),
.open-item-table th:nth-child(8), .open-item-table td:nth-child(8) { min-width:74px; }
.open-item-table th:nth-child(9), .open-item-table td:nth-child(9) { min-width:116px; }
.open-item-table th:nth-child(10), .open-item-table td:nth-child(10) { min-width:118px; }
.open-item-table .table-number-input { min-width:92px; width:96px; }
.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; }
.muted { color:var(--muted); }
.users-panel-header { align-items:flex-start; }
.users-panel-header p { margin:5px 0 0; color:var(--muted); font-size:13px; line-height:1.45; }
.users-summary { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
.users-summary span { display:inline-flex; align-items:center; gap:6px; min-height:32px; padding:7px 10px; border:1px solid #e5e9f0; border-radius:999px; background:#f8fafc; color:var(--muted); font-size:12px; }
.users-summary strong { color:var(--ink); font-size:14px; }
.users-toolbar { max-width:460px; }
.users-table-wrap { border:1px solid var(--line); border-radius:8px; overflow:auto; }
.users-table { width:100%; min-width:980px; table-layout:fixed; }
.users-table th, .users-table td { padding:12px 14px; vertical-align:top; }
.users-table th { position:sticky; top:0; z-index:1; }
.users-table th:nth-child(1), .users-table td:nth-child(1) { width:220px; }
.users-table th:nth-child(2), .users-table td:nth-child(2) { width:230px; }
.users-table th:nth-child(3), .users-table td:nth-child(3) { width:135px; }
.users-table th:nth-child(4), .users-table td:nth-child(4) { width:110px; }
.users-table th:nth-child(5), .users-table td:nth-child(5) { width:190px; }
.users-table th:nth-child(6), .users-table td:nth-child(6) { width:170px; }
.users-table td > strong { display:block; color:var(--ink); line-height:1.25; overflow-wrap:anywhere; }
.users-table td > small { display:block; margin-top:4px; color:var(--muted); line-height:1.35; overflow-wrap:anywhere; }
.users-table code { display:inline-block; max-width:100%; padding:4px 7px; border:1px solid #e5e9f0; border-radius:6px; background:#f8fafc; color:#475569; font-family:inherit; font-size:12px; overflow-wrap:anywhere; }
.user-role-admin { background:#e5f6ff; color:#05699f; }
.user-row-actions { flex-wrap:nowrap; }
.user-row-actions .icon-button { min-height:34px; padding:7px 11px; border-radius:7px; }
.users-pagination { margin-top:12px; }
.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; }
.formats-layout { display:grid; grid-template-columns:minmax(360px, 560px) minmax(520px, 1fr); gap:16px; align-items:start; }
.format-editor-panel { min-width:0; }
.format-preview-panel { position:sticky; top:16px; min-width:0; }
.format-settings-form { grid-template-columns:1fr; }
.format-section { border:1px solid var(--line); border-radius:8px; padding:14px; margin:0; display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; background:#fbfcfe; }
.format-section legend { color:var(--muted); font-size:12px; font-weight:800; padding:0 6px; text-transform:uppercase; letter-spacing:.04em; }
.format-scope-hidden { display:none !important; }
.format-upload { display:grid; gap:12px; grid-column:1 / -1; }
.format-upload label { display:grid; gap:7px; color:var(--muted); font-size:13px; }
.quote-format-controls { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.quote-format-controls input[type="range"] { padding:0; accent-color:var(--primary); }
.format-actions { display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; }
.format-actions .primary-button, .format-actions .ghost-button { width:auto; }
.segmented-control { display:inline-flex; gap:4px; padding:4px; border:1px solid var(--line); border-radius:8px; background:#f8fafc; }
.segmented-control button { border:0; border-radius:6px; background:transparent; color:var(--muted); font-weight:800; padding:8px 12px; cursor:pointer; }
.segmented-control button.active { background:var(--primary); color:#08111f; }
.quote-preview-panel { margin-top:0; }
.quote-format-preview { max-width:100%; height:calc(100vh - 210px); min-height:560px; overflow:auto; padding:18px; border:1px solid var(--line); border-radius:8px; background:#e9edf3; }
.quote-format-preview .print-page { margin:0 auto; transform:scale(.72); transform-origin:top center; box-shadow:0 16px 42px rgba(15,23,42,.18); }
.quote-format-preview .print-page-format-invoice { transform:scale(.68); transform-origin:top left; }
.preview-error { display:grid; gap:8px; width:min(420px, 100%); margin:24px auto; padding:16px; border:1px solid #fecaca; border-radius:8px; background:#fff5f5; color:#991b1b; }
.preview-error span { color:#7f1d1d; overflow-wrap:anywhere; }
.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:#121820; position:relative; overflow:hidden; }
.print-page, .print-page * { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
.print-bg { display:none; }
.print-background { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; pointer-events:none; }
.print-content { position:relative; z-index:2; 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; background:
  linear-gradient(90deg, rgba(183,137,22,.08) 0 7px, transparent 7px),
  linear-gradient(135deg, transparent 0 58%, rgba(16,24,39,.035) 58% 59.5%, transparent 59.5%),
  radial-gradient(circle at 88% 10%, rgba(183,137,22,.1) 0 0.72in, transparent 0.74in),
  radial-gradient(circle at 18% 86%, rgba(16,24,39,.045) 0 1.18in, transparent 1.2in),
  #fff; }
.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:-.62in; bottom:.42in; width:2.25in; height:5.85in; background:linear-gradient(180deg, rgba(183,137,22,.1), rgba(16,24,39,.045)); transform:skewX(-13deg); z-index:0; }
.print-page-quote.print-page-with-template { background:#fff; }
.print-page-quote.print-page-with-template::before,
.print-page-quote.print-page-with-template::after,
.print-page-quote.print-page-with-template .print-header::after { display:none; }
.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%; display:grid; align-items:start; gap:6px; }
.print-page-quote .print-brand > div { display:grid; gap:2px; font-size:10.5px; line-height:1.35; color:#536078; margin-left:4px; }
.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:min(var(--quote-table-font-size, 10.5px), 9.6px); overflow:hidden; table-layout:auto; }
.print-page-quote .print-table th { padding:7px 8px; background:#101827; color:white; border-color:#101827; font-size:8.4px; letter-spacing:.04em; text-transform:uppercase; }
.print-page-quote .print-table th:first-child { border-left:6px solid #b78916; }
.print-page-quote .print-table td { padding:7px 8px; border-color:#dce3ed; line-height:1.25; }
.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-format-quote .print-table th:first-child,
.print-page-format-quote .print-table td:first-child { width:34px; text-align:center; color:#536078; font-weight:700; }
.print-page-format-quote .print-table th:nth-child(2),
.print-page-format-quote .print-table td:nth-child(2) { width:104px; color:#536078; font-weight:700; }
.print-page-format-quote .print-table th:nth-child(3),
.print-page-format-quote .print-table td:nth-child(3) { text-align:left; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; width:auto; max-width:270px; }
.print-page-format-quote .print-table th:nth-child(4),
.print-page-format-quote .print-table th:nth-child(5),
.print-page-format-quote .print-table th:nth-child(6),
.print-page-format-quote .print-table td:nth-child(4),
.print-page-format-quote .print-table td:nth-child(5),
.print-page-format-quote .print-table td:nth-child(6) { text-align:right; white-space:nowrap; }
.print-page-format-quote .print-table th:nth-child(4),
.print-page-format-quote .print-table td:nth-child(4) { width:44px; }
.print-page-format-quote .print-table th:nth-child(5),
.print-page-format-quote .print-table td:nth-child(5),
.print-page-format-quote .print-table th:nth-child(6),
.print-page-format-quote .print-table td:nth-child(6) { width:92px; }
.print-page-single-line .print-table th:first-child,
.print-page-single-line .print-table td:first-child { width:118px; }
.print-page-format-quote.print-page-single-line .print-table th:first-child,
.print-page-format-quote.print-page-single-line .print-table td:first-child { width:42px; }
.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:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px; margin-top:8px; padding-top:9px; border-top:1px solid #b8c2d1; color:#536078; font-size:10.5px; }
.quote-print-footer span { display:block; }
.quote-footer-slogan { text-align:left; font-weight:700; color:#101827; }
.quote-footer-web { text-align:center; justify-self:center; }
.quote-footer-page { text-align:right; justify-self:end; }
.invoice-fiscal-page { width:8.5in; min-height:11in; padding:.42in .46in; color:#182234; background:white; box-sizing:border-box; font-family:Arial, Helvetica, sans-serif; }
.invoice-fiscal-page::before,
.invoice-fiscal-page::after { display:none; }
.invoice-fiscal-page *,
.invoice-fiscal-page *::before,
.invoice-fiscal-page *::after { box-sizing:border-box; }
.invoice-fiscal-shell { border:1px solid #aeb7c2; font-size:calc(8.6px * var(--quote-font-scale, 1)); line-height:1.24; width:100%; max-width:100%; margin:0 auto; background:#fff; overflow:hidden; }
.invoice-fiscal-page h1,
.invoice-fiscal-page h2,
.invoice-fiscal-page p { margin:0; }
.invoice-fiscal-header { display:grid; grid-template-columns:28% minmax(0,72%); border-bottom:1px solid #aeb7c2; }
.invoice-fiscal-logo { display:grid; place-items:center; min-height:.92in; border-right:1px solid #aeb7c2; padding:10px 12px; }
.invoice-fiscal-logo img { width:min(var(--quote-logo-width, 140px), 158px); max-width:92%; max-height:.62in; object-fit:contain; }
.invoice-fiscal-main h1 { background:#1f2a38; color:#fff; text-align:center; font-size:14px; padding:6px 8px; letter-spacing:0; font-weight:800; box-shadow:inset 0 -3px 0 #0784c7; }
.invoice-fiscal-meta-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); min-height:.64in; }
.invoice-fiscal-meta-grid > div { padding:7px 10px; border-right:1px solid #c5ccd4; overflow-wrap:anywhere; word-break:normal; display:grid; align-content:start; gap:2px; }
.invoice-fiscal-meta-grid > div:last-child { border-right:0; }
.invoice-fiscal-meta-row { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:4px; align-items:start; }
.invoice-fiscal-meta-row strong { color:#0f172a; font-weight:800; white-space:nowrap; }
.invoice-fiscal-meta-row span { min-width:0; overflow-wrap:anywhere; word-break:normal; }
.invoice-fiscal-parties { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); border-bottom:1px solid #aeb7c2; }
.invoice-fiscal-parties h2 { background:#e2e6eb; color:#121820; text-align:center; font-size:9.5px; padding:5px 6px; border-bottom:1px solid #aeb7c2; font-weight:800; }
.invoice-fiscal-parties div { min-height:.82in; padding:7px 9px; border-right:1px solid #c5ccd4; display:grid; align-content:start; gap:2px; overflow-wrap:anywhere; word-break:normal; }
.invoice-fiscal-parties div:last-child { border-right:0; }
.invoice-fiscal-parties strong { font-size:9.5px; color:#0f172a; font-weight:800; }
.invoice-fiscal-parties span { color:#263241; }
.invoice-fiscal-items-wrap { border-bottom:1px solid #aeb7c2; overflow:visible; }
.invoice-fiscal-items { width:100%; max-width:100%; font-size:calc(var(--quote-table-font-size, 10.5px) * .74); }
.invoice-fiscal-item-head,
.invoice-fiscal-item-row { display:grid; grid-template-columns:7% 7% 5% 10% minmax(0, 1fr) 10% 11% 12%; width:100%; }
.invoice-fiscal-item-head span { background:#d7dce2; color:#121820; border-right:1px solid #aeb7c2; border-bottom:1px solid #aeb7c2; padding:5px 3px; font-size:calc(var(--quote-table-font-size, 10.5px) * .69); font-weight:800; line-height:1.08; overflow-wrap:anywhere; word-break:break-word; min-width:0; text-align:center; text-transform:uppercase; }
.invoice-fiscal-item-row span { border-right:1px solid #c5ccd4; border-bottom:1px solid #c5ccd4; padding:4px 3px; color:#1f2937; line-height:1.18; overflow-wrap:anywhere; word-break:break-word; min-width:0; text-align:center; }
.invoice-fiscal-item-head span:last-child,
.invoice-fiscal-item-row span:last-child { border-right:0; }
.invoice-fiscal-item-head span:nth-child(2),
.invoice-fiscal-item-head span:nth-child(6),
.invoice-fiscal-item-head span:nth-child(7),
.invoice-fiscal-item-head span:nth-child(8),
.invoice-fiscal-item-row span:nth-child(2),
.invoice-fiscal-item-row span:nth-child(6),
.invoice-fiscal-item-row span:nth-child(7),
.invoice-fiscal-item-row span:nth-child(8) { white-space:nowrap; }
.invoice-fiscal-empty-row { padding:8px; border-bottom:1px solid #c5ccd4; color:#667085; }
.invoice-fiscal-items-count-4 .invoice-fiscal-items,
.invoice-fiscal-items-count-5 .invoice-fiscal-items,
.invoice-fiscal-items-count-6 .invoice-fiscal-items { font-size:calc(var(--quote-table-font-size, 10.5px) * .70); }
.invoice-fiscal-items-count-4 .invoice-fiscal-item-head span,
.invoice-fiscal-items-count-4 .invoice-fiscal-item-row span,
.invoice-fiscal-items-count-5 .invoice-fiscal-item-head span,
.invoice-fiscal-items-count-5 .invoice-fiscal-item-row span,
.invoice-fiscal-items-count-6 .invoice-fiscal-item-head span,
.invoice-fiscal-items-count-6 .invoice-fiscal-item-row span { padding:3px 3px; }
.invoice-fiscal-items-count-7 .invoice-fiscal-items,
.invoice-fiscal-items-count-8 .invoice-fiscal-items,
.invoice-fiscal-items-count-9 .invoice-fiscal-items,
.invoice-fiscal-items-count-10 .invoice-fiscal-items,
.invoice-fiscal-items-count-11 .invoice-fiscal-items,
.invoice-fiscal-items-count-12 .invoice-fiscal-items { font-size:calc(var(--quote-table-font-size, 10.5px) * .66); }
.invoice-fiscal-items-count-7 .invoice-fiscal-item-head span,
.invoice-fiscal-items-count-7 .invoice-fiscal-item-row span,
.invoice-fiscal-items-count-8 .invoice-fiscal-item-head span,
.invoice-fiscal-items-count-8 .invoice-fiscal-item-row span,
.invoice-fiscal-items-count-9 .invoice-fiscal-item-head span,
.invoice-fiscal-items-count-9 .invoice-fiscal-item-row span,
.invoice-fiscal-items-count-10 .invoice-fiscal-item-head span,
.invoice-fiscal-items-count-10 .invoice-fiscal-item-row span,
.invoice-fiscal-items-count-11 .invoice-fiscal-item-head span,
.invoice-fiscal-items-count-11 .invoice-fiscal-item-row span,
.invoice-fiscal-items-count-12 .invoice-fiscal-item-head span,
.invoice-fiscal-items-count-12 .invoice-fiscal-item-row span { padding:2px 2px; line-height:1.1; }
.invoice-fiscal-summary { display:grid; grid-template-columns:minmax(0, 1fr) 2.15in; column-gap:.34in; align-items:start; min-height:.72in; padding:.16in .12in .18in; border-bottom:1px solid #aeb7c2; background:#fff; }
.invoice-fiscal-summary > div { padding:0; border-right:0; min-width:0; }
.invoice-fiscal-summary table { border-collapse:collapse; }
.invoice-fiscal-summary th,
.invoice-fiscal-summary td { border:1px solid #c5ccd4; padding:5px 6px; overflow-wrap:anywhere; }
.invoice-fiscal-tax-note { display:block; justify-self:stretch; min-width:0; }
.invoice-fiscal-tax-box { display:grid; grid-template-columns:1fr 1fr; width:1.85in !important; max-width:1.85in !important; margin:0 0 8px 0 !important; border:1px solid #c5ccd4 !important; background:#fff !important; }
.invoice-fiscal-tax-box div { padding:5px 6px; border-right:1px solid #d8dee8; border-bottom:1px solid #d8dee8; color:#667085; font-size:9px; font-weight:800; text-transform:uppercase; }
.invoice-fiscal-tax-box div:nth-child(2) { border-right:0; }
.invoice-fiscal-tax-box span { padding:5px 6px; border-right:1px solid #d8dee8; color:#182234; font-size:11px; }
.invoice-fiscal-tax-box span:last-child { border-right:0; }
.invoice-fiscal-tax-table { width:1.85in !important; max-width:1.85in !important; margin:0 0 8px 0 !important; border:1px solid #c5ccd4 !important; table-layout:fixed !important; background:#fff !important; }
.invoice-fiscal-tax-note table { width:1.85in !important; max-width:1.85in; margin:0 0 8px 0; border:1px solid #c5ccd4; border-collapse:collapse; table-layout:fixed; background:#fff; }
.invoice-fiscal-tax-note th { background:#fff; color:#667085; text-align:left; font-size:9px; border-color:#d8dee8; }
.invoice-fiscal-tax-note td { font-size:11px; color:#182234; }
.invoice-fiscal-tax-note td { border-color:#d8dee8; }
.invoice-fiscal-tax-note table th:first-child,
.invoice-fiscal-tax-note table td:first-child { width:50%; }
.invoice-fiscal-tax-note p { width:100%; max-width:100%; border:0; background:#fff; }
.invoice-fiscal-summary p { padding:5px 1px 0; overflow-wrap:anywhere; color:#667085; }
.invoice-fiscal-totals { align-self:start; justify-self:end; margin:0; width:2.15in !important; min-width:2.15in; border:1px solid #c5ccd4; border-collapse:collapse; table-layout:fixed; background:#fff; }
.invoice-fiscal-totals th { text-align:right; width:58%; color:#667085; font-size:9px; text-transform:uppercase; }
.invoice-fiscal-totals td { text-align:right; color:#182234; font-size:11px; white-space:nowrap; }
.invoice-fiscal-totals tr:last-child th,
.invoice-fiscal-totals tr:last-child td { background:#263241; color:white; font-weight:800; }
.invoice-fiscal-seals h2 { background:#e2e6eb; color:#121820; text-align:center; font-size:8.5px; padding:5px 6px; border-bottom:1px solid #aeb7c2; font-weight:800; }
.invoice-fiscal-seals p { min-height:.24in; padding:5px 8px; border-bottom:1px solid #c5ccd4; font-size:6.4px; line-height:1.18; overflow-wrap:anywhere; word-break:break-all; text-align:left; color:#40516f; }
.invoice-fiscal-certificates { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); border-bottom:1px solid #aeb7c2; }
.invoice-fiscal-certificates div { padding:7px 8px; border-right:1px solid #c5ccd4; font-size:8px; overflow-wrap:anywhere; color:#182234; }
.invoice-fiscal-certificates div:last-child { border-right:0; }
.invoice-fiscal-footer { display:grid; grid-template-columns:.92in 1fr; min-height:.88in; }
.invoice-fiscal-qr { display:grid; place-items:center; border-right:1px solid #c5ccd4; font-weight:800; color:#555; padding:7px; text-align:center; }
.invoice-fiscal-qr img { width:.74in; height:.74in; object-fit:contain; }
.invoice-fiscal-footer > div:last-child { padding:8px 10px; display:grid; align-content:start; gap:5px; color:#667085; }
.invoice-fiscal-bar { background:#d7d9dc; padding:5px 6px; font-weight:800; color:#40516f; }
.invoice-fiscal-kordata { text-align:right; border-top:1px solid #c5ccd4; padding-top:4px; color:#667085; }
.invoice-detail-dialog { width:min(1180px, calc(100vw - 36px)); max-height:calc(100vh - 36px); overflow:hidden; }
.invoice-detail-dialog-shell { display:grid; grid-template-rows:auto minmax(0,1fr); max-height:calc(100vh - 36px); padding:0; }
.invoice-detail-dialog-shell > header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:16px 18px; border-bottom:1px solid var(--line); background:#fff; }
.invoice-detail-dialog-shell > header h2 { margin:0; }
.invoice-detail-dialog-shell > header p { margin:4px 0 0; color:var(--muted); }
.invoice-detail-dialog .invoice-detail-panel { margin:0; border-top:0; overflow:auto; max-height:calc(100vh - 120px); }
.invoice-comments-panel { padding:12px 18px 4px; border-bottom:1px solid var(--line); display:grid; gap:8px; }
.invoice-comments-panel h3 { padding:0; }
.invoice-comments-panel textarea { width:100%; min-height:78px; resize:vertical; border:1px solid var(--line); border-radius:8px; padding:10px 12px; font:inherit; color:var(--ink); }
.invoice-comments-panel .hint { margin:0; }
.invoice-fiscal-edit-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:10px 12px; }
.invoice-fiscal-edit-grid label { display:grid; gap:4px; color:var(--muted); font-size:12px; }
.invoice-fiscal-edit-grid input,
.invoice-fiscal-edit-grid select { width:100%; min-height:38px; border:1px solid var(--line); border-radius:8px; padding:8px 10px; font:inherit; color:var(--ink); background:#fff; }
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; }
.modal-form fieldset.wide { border:1px solid var(--line); border-radius:8px; padding:12px; margin:0; display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.modal-form fieldset.wide legend { color:var(--muted); font-size:12px; font-weight:700; padding:0 6px; text-transform:uppercase; }
.invoice-cancellation-form select, .invoice-cancellation-form input { min-height:40px; }
.invoice-cancellation-form menu { display:flex; justify-content:flex-end; gap:10px; margin:4px 0 0; padding:0; }
#productModal { width:min(1120px, calc(100vw - 36px)); height:min(760px, calc(100vh - 24px)); max-height:calc(100vh - 24px); overflow:hidden; }
#productForm { grid-template-columns:repeat(3, minmax(180px, 1fr)); gap:14px 16px; align-items:start; height:100%; max-height:none; overflow-x:hidden; overflow-y:auto; scrollbar-gutter:stable; padding:22px 26px 22px 22px; }
#productForm h2,
#productForm .wide,
#productForm menu { grid-column:1 / -1; }
#productForm h2 { position:sticky; top:0; z-index:2; margin:-22px -22px 2px; padding:20px 22px 14px; background:white; border-bottom:1px solid var(--line); }
#productForm menu { margin:8px -26px -22px -22px; padding:14px 26px 18px 22px; background:white; border-top:1px solid var(--line); }
#productForm fieldset.wide { grid-template-columns:repeat(4, minmax(150px, 1fr)); gap:12px; }
#productForm fieldset.product-assignment-editor { grid-template-columns:1fr; }
#productForm .assignment-builder { grid-template-columns:minmax(190px, 1.35fr) minmax(170px, 1.15fr) repeat(3, minmax(96px, .7fr)) auto; }
#productForm .assignment-builder .ghost-button { width:100%; }
#productForm .product-assignment-draft-wrap { max-height:180px; }
#productForm [data-product-cost-factors] { grid-template-columns:repeat(4, minmax(150px, 1fr)); }
#productForm fieldset:not(.product-assignment-editor) label { min-width:0; }
@media (max-width: 980px) {
  #productForm { grid-template-columns:repeat(2, minmax(160px, 1fr)); }
  #productForm fieldset.wide,
  #productForm [data-product-cost-factors] { grid-template-columns:repeat(2, minmax(150px, 1fr)); }
  #productForm .assignment-builder { grid-template-columns:repeat(2, minmax(150px, 1fr)); }
  #productForm .assignment-builder .ghost-button { grid-column:1 / -1; }
}
@media (max-width: 640px) {
  #productModal { width:calc(100vw - 20px); height:calc(100vh - 20px); max-height:calc(100vh - 20px); }
  #productForm { grid-template-columns:1fr; height:100%; max-height:none; padding:16px 20px 16px 16px; overflow-y:auto; }
  #productForm h2 { margin:-16px -16px 2px; padding:16px; }
  #productForm menu { margin:8px -20px -16px -16px; padding:12px 20px 16px 16px; }
  #productForm fieldset.wide,
  #productForm [data-product-cost-factors],
  #productForm .assignment-builder { grid-template-columns:1fr; }
}
.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; }
#poModal { width:min(980px, calc(100vw - 32px)); }
#poForm { grid-template-columns:repeat(4, minmax(150px, 1fr)); max-height:calc(100vh - 32px); overflow:auto; }
.po-open-item-picker { border:1px solid var(--line); border-radius:8px; padding:12px; margin:0; display:grid; gap:12px; }
.po-open-item-picker legend { color:var(--muted); font-size:12px; font-weight:700; padding:0 6px; text-transform:uppercase; }
.po-open-item-table { min-width:1040px; }
.po-open-item-table th, .po-open-item-table td { padding:10px 8px; white-space:nowrap; }
.po-open-item-table th:nth-child(3), .po-open-item-table td:nth-child(3) { min-width:260px; }
.po-open-item-table .table-number-input { width:88px; min-width:88px; }
.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: 1180px) { .formats-layout { grid-template-columns:1fr; } .format-preview-panel { position:static; } .quote-format-preview { height:720px; } }
@media (max-width: 1200px) { .freight-dashboard-shell { grid-template-columns:1fr; } .freight-dashboard-side { display:none; } .freight-dashboard-top { flex-wrap:wrap; justify-content:flex-start; } .freight-dashboard-filter { flex-wrap:wrap; width:100%; margin-right: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, .purchase-order-workspace { display:grid; grid-template-columns:1fr; } .metrics, .freight-status-grid, .freight-dashboard-metrics, .freight-dashboard-grid { grid-template-columns:repeat(2, 1fr); } .freight-form fieldset, .freight-compact-form { grid-template-columns:repeat(2, minmax(0, 1fr)); } .freight-rate-card { grid-template-columns:86px 1fr; } .freight-rate-side { grid-column:1 / -1; grid-template-columns:1fr auto; align-items:center; } .freight-guide-card { grid-template-columns: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, .format-section, .quote-format-controls, .catalog-toolbar, .pre-cancelled-filter-bar, .cfdi-system-toolbar, .freight-status-grid, .freight-form fieldset, .freight-compact-form, .freight-dashboard-metrics, .freight-dashboard-grid { grid-template-columns:1fr; } h1 { font-size:24px; } .panel-header { align-items:flex-start; flex-direction:column; } .dashboard-panel .panel-header { flex-direction:row; } .freight-frame-note, .freight-dashboard-top, .freight-dashboard-filter { align-items:stretch; flex-direction:column; } .freight-rate-card { grid-template-columns:1fr; } .freight-rate-brand { min-height:58px; } .freight-rate-side { grid-template-columns:1fr; justify-items:stretch; padding:12px 14px; } .freight-rate-price { text-align:left; } .freight-rate-action { justify-self:stretch; } .freight-destination-row { grid-template-columns:1fr auto; } .freight-destination-row div { grid-column:1 / -1; } .report-actions, .format-actions { flex-wrap:wrap; justify-content:flex-start; } .report-chart-header, .report-chart-row { grid-template-columns:1fr; align-items:start; } .report-chart-total, .report-chart-value { text-align:left; } .segmented-control { width:100%; } .segmented-control button { flex:1; } .catalog-pagination { align-items:flex-start; flex-direction:column; } .quote-format-preview { min-height:480px; padding:10px; } .quote-format-preview .print-page { transform:scale(.58); transform-origin:top 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; }
  .invoice-fiscal-page { width:8.5in !important; min-height:11in !important; padding:.42in .46in !important; overflow:hidden; }
  @page { size: letter; margin:0; }
}

:root {
  --ink:#121820;
  --bg:#f4f7fb;
  --primary:#0784c7;
  --primary-dark:#05699f;
  --primary-soft:#e5f6ff;
  --accent:#00aeef;
}

.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:transparent; border-radius:0; }
.brand-logo-login { width:300px; max-width:100%; max-height:110px; margin:0 auto; }
.brand-subtitle { display:block; color:var(--muted); font-size:11px; font-weight:400; line-height:1.35; letter-spacing:0; text-align:center; }
.sidebar .brand { flex-direction:column; align-items:center; gap:7px; }
.sidebar .brand-logo,
.brand-logo-sidebar { background:transparent !important; border-radius:0 !important; box-shadow:none !important; }
.brand-logo-sidebar { width:190px; height:92px; max-height:92px; padding:0; object-fit:contain; }
.sidebar .brand > div { width:220px; }
.sidebar .brand .brand-subtitle { color:#667085; font-size:11px; }

.nav-group.open .nav-group-title,
.nav-group-title:hover,
.nav-item:hover {
  background:#eef7fc;
  color:#034d77;
}

.nav-item.active {
  background:var(--primary);
  color:#fff;
}

.primary-button,
.ghost-button,
.import-button,
.icon-button {
  border-color:var(--primary);
  background:var(--primary);
  color:#fff;
  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:#fff;
}

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

body {
  background:#f4f7fb;
}

.login-screen {
  background:#07111f;
}

.sidebar {
  background:#fff;
  color:var(--ink);
  border-right:1px solid var(--line);
}

.nav-group-title,
.nav-item {
  color:#263241;
}

.nav-group-title::after {
  color:#6b7788;
}

.dashboard-welcome {
  background:linear-gradient(125deg, #07111f 0%, #0d2438 58%, #05699f 100%);
}

.dashboard-eyebrow {
  background:rgba(0,174,239,.18);
  color:#b9edff;
}

.dashboard-action.primary {
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
}

.dashboard-action.primary:hover {
  background:var(--primary-dark);
  border-color:var(--primary-dark);
  color:#fff;
}

.dashboard-metrics .metric-link::after {
  color:var(--primary-dark);
}

.metric-icon,
.metric-overstock .metric-icon,
.metric-sales .metric-icon {
  background:var(--primary-soft);
  color:var(--primary-dark);
}

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

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

