:root{color-scheme:light;--bg:#f4f6f5;--surface:#fff;--ink:#17211e;--muted:#697570;--line:#dfe5e2;--brand:#173f36;--brand-2:#246b59;--green:#147a56;--red:#c23b34;--gold:#a86f18;--blue:#316da0}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}
.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:#edf2f0}.login-box{width:min(420px,100%);display:grid;gap:18px;background:#fff;border:1px solid var(--line);padding:34px;border-radius:8px;box-shadow:0 20px 60px rgba(23,63,54,.12)}.login-box h1{margin:0 0 5px;font-size:26px}.login-box p{margin:0;color:var(--muted)}.login-link{border:0;background:transparent;color:var(--brand-2);font-weight:750;padding:3px}.login-link:hover{text-decoration:underline}.login-box label small{display:block;margin-top:5px;color:var(--muted);font-weight:500;font-size:11px}
.brand-mark{display:grid;place-items:center;width:48px;height:48px;background:var(--brand);color:#fff;font-weight:800;border-radius:7px}.brand-mark.small{width:36px;height:36px;font-size:12px}
.business-unit-switcher{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin:16px 6px 0;padding:4px;border:1px solid #365b53;border-radius:7px;background:#102d27}.business-unit-switcher button{border:0;border-radius:5px;background:transparent;color:#9fb6af;padding:8px 6px;font-size:11px;font-weight:800}.business-unit-switcher button.active{background:#fff;color:var(--brand)}
body[data-business-unit="pho"]{--brand:#6a351f;--brand-2:#a45b32;--green:#8a4c2c;--gold:#b57a24}body[data-business-unit="pho"] .sidebar{background:#512818}body[data-business-unit="pho"] .nav-item:hover,body[data-business-unit="pho"] .nav-item.active{background:#75442e}body[data-business-unit="pho"] .business-unit-switcher{background:#3d1c11;border-color:#81513b}
.unit-permissions{display:flex;gap:10px;align-items:center}.unit-permissions label{display:flex;grid-gap:5px;align-items:center;font-size:12px}.unit-permissions input{width:15px;height:15px}
label{display:grid;gap:7px;color:#36443f;font-weight:650}input,select,textarea{min-width:0;width:100%;border:1px solid #cfd8d4;border-radius:6px;background:#fff;color:var(--ink);padding:11px 12px;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--brand-2);box-shadow:0 0 0 3px rgba(36,107,89,.11)}textarea{resize:vertical}.primary{border:1px solid var(--brand);background:var(--brand);color:#fff;border-radius:6px;padding:11px 16px;font-weight:750}.primary:hover{background:#102f29}.primary:disabled{opacity:.55;cursor:wait}.full{width:100%}
.app{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:232px;background:#17352f;color:#fff;display:flex;flex-direction:column;padding:20px 14px;z-index:20}.brand{display:flex;align-items:center;gap:11px;padding:0 8px}.brand span:last-child{display:grid;gap:2px}.brand small{color:#9fb6af;font-size:11px}.sidebar nav{display:grid;gap:5px;margin-top:35px}.nav-item{display:flex;align-items:center;gap:12px;width:100%;border:0;background:transparent;color:#c6d5d0;border-radius:6px;padding:11px 12px;text-align:left;font-weight:650}.nav-item span{width:20px;text-align:center;font-size:18px}.nav-item:hover,.nav-item.active{background:#285047;color:#fff}.sidebar-user{margin-top:auto;border-top:1px solid #34564f;padding:16px 7px 0;display:grid;grid-template-columns:34px 1fr 30px;align-items:center;gap:9px}.sidebar-user span:nth-child(2){display:grid}.sidebar-user small{color:#9fb6af;font-size:11px;margin-top:2px}.avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#e5efeb;color:var(--brand);font-weight:800}.icon-button{display:grid;place-items:center;border:0;background:transparent;color:inherit;width:34px;height:34px;font-size:20px;border-radius:5px}.icon-button:hover{background:rgba(255,255,255,.1)}
.workspace{margin-left:232px;width:calc(100% - 232px);padding:30px 34px 60px}.mobile-header{display:none}.view{display:none}.view.active{display:block}.page-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:24px}.page-head h1{font-size:25px;line-height:1.2;margin:2px 0 0;letter-spacing:0}.page-head p{margin:5px 0 0;color:var(--muted)}.eyebrow{font-size:11px!important;text-transform:uppercase;color:var(--brand-2)!important;font-weight:800;letter-spacing:.08em}.sync-status{color:var(--green);font-size:12px}.surface{background:var(--surface);border:1px solid var(--line);border-radius:7px}.section-head{display:flex;justify-content:space-between;align-items:start;gap:16px;padding:19px 20px;border-bottom:1px solid var(--line)}.section-head h2{font-size:16px;margin:0}.section-head p{font-size:12px;color:var(--muted);margin:4px 0 0}.text-button{border:0;background:transparent;color:var(--brand-2);font-weight:700;padding:4px}
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.metric{min-height:116px;background:#fff;border:1px solid var(--line);border-radius:7px;padding:18px;display:flex;gap:14px;align-items:flex-start}.metric-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:6px;font-size:17px;font-weight:800}.metric-icon.danger{background:#fbe9e7;color:var(--red)}.metric-icon.green{background:#e5f3ec;color:var(--green)}.metric-icon.gold{background:#fbf1dc;color:var(--gold)}.metric-icon.blue{background:#e7f0f7;color:var(--blue)}.metric div{display:grid;min-width:0}.metric p{margin:0;color:var(--muted);font-size:12px}.metric strong{font-size:21px;margin:5px 0 3px;white-space:nowrap}.metric small{font-size:11px;color:var(--muted)}
.dashboard-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:16px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap}th{padding:11px 16px;text-align:left;font-size:11px;text-transform:uppercase;color:#78847f;background:#f8faf9;border-bottom:1px solid var(--line)}td{padding:14px 16px;border-bottom:1px solid #edf0ee;color:#4b5954}tbody tr:last-child td{border-bottom:0}td strong{color:var(--ink)}.amount,.status{display:inline-flex;padding:4px 8px;border-radius:4px;font-size:11px;font-weight:750}.amount.overdue{background:#fbe9e7;color:var(--red)}.amount.paid{background:#e8f4ee;color:var(--green)}.empty-row{text-align:center!important;color:var(--muted);padding:35px!important}.sort-button{display:inline-flex;align-items:center;gap:5px;border:0;background:transparent;padding:0;color:inherit;text-transform:inherit;font:inherit;font-weight:800}.sort-button span{font-size:13px;color:#a1ada8}.sort-button:hover,.sort-button.active{color:var(--brand-2)}.sort-button.active span{color:var(--brand-2)}
.attention-list{padding:7px 14px}.attention-list button{width:100%;border:0;border-bottom:1px solid #edf0ee;background:#fff;padding:13px 4px;display:grid;grid-template-columns:34px 1fr 16px;gap:10px;text-align:left;align-items:center}.attention-list button:last-child{border:0}.attention-list span:nth-child(2){display:grid;gap:3px}.attention-list small{color:var(--muted)}.attention-icon{width:32px;height:32px;border-radius:5px;display:grid;place-items:center;font-weight:800}.attention-icon.debt{background:#fbe9e7;color:var(--red)}.attention-icon.ai{background:#e6f0ed;color:var(--brand-2)}.empty-state{text-align:center;color:var(--muted);padding:25px}
.order-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,.75fr);gap:16px;align-items:start}.form-surface{min-width:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:18px 20px}.form-grid .wide{grid-column:1/-1}.customer-picker{display:grid;grid-template-columns:minmax(0,1fr) 130px auto;gap:10px;align-items:end}.customer-picker .secondary-button{height:42px;white-space:nowrap}.customer-sort-field{min-width:0}.customer-sort-select{width:130px}.customer-context{margin:0 20px 18px;border-left:3px solid var(--brand-2);background:#f1f6f4;padding:12px 14px;display:grid;grid-template-columns:1fr 1.2fr;gap:16px}.customer-context.empty{display:block;color:var(--muted);border-left-color:#bfc9c5}.customer-context>div{display:grid;gap:4px}.customer-context span{color:var(--muted);font-size:12px}.ai-hint{border-left:1px solid #d3dfda;padding-left:16px}.ai-hint b{color:var(--brand-2);font-size:12px}
.product-lines{margin:0 20px 18px;border:1px solid var(--line);border-radius:6px;overflow:hidden}.product-header,.product-row{display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr;gap:12px;align-items:center;padding:11px 14px}.product-header{background:#f7f9f8;text-transform:uppercase;color:var(--muted);font-size:10px;font-weight:750}.product-row{border-top:1px solid var(--line)}.product-row label{position:relative}.product-row input{padding-right:32px}.product-row label small{position:absolute;right:10px;top:12px;color:var(--muted);font-weight:500}.unit-price{color:var(--muted)}details{border-top:1px solid var(--line)}summary{padding:15px 20px;font-weight:700;color:var(--brand-2);cursor:pointer}.details-grid{padding-top:4px}
.quantity-unit,.edit-quantity-unit{display:grid!important;grid-template-columns:minmax(0,1fr) 72px;gap:6px}.quantity-unit input{padding-right:12px}.quantity-unit select,.edit-quantity-unit select{padding-left:8px;padding-right:6px}.product-row .pho-conversion{grid-column:2/-1;color:var(--muted);font-size:10px;margin-top:-8px}.edit-quantity-unit+small{color:var(--muted);font-weight:500}
.rest-toggle{display:flex;align-items:center;gap:10px;background:#f8faf9;border:1px solid var(--line);border-radius:6px;padding:11px 12px}.rest-toggle input{width:18px;height:18px;flex:0 0 auto}.rest-toggle span{display:grid;gap:2px}.rest-toggle small{color:var(--muted);font-weight:500}.product-lines.resting{opacity:.5}.product-lines.resting input{background:#eef1ef}.rest-mark{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:4px;background:#fbf1dc;color:var(--gold);font-weight:800}
.truck-suggestions{display:grid;gap:8px;padding:11px 12px;border:1px solid #cfe0da;border-radius:6px;background:#f5faf8}.truck-suggestion-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.truck-suggestion-head strong{font-size:12px;color:var(--brand)}.truck-suggestion-head small{color:var(--muted)}.truck-suggestion-list{display:flex;gap:8px;flex-wrap:wrap}.truck-suggestion{display:grid;gap:2px;min-width:160px;border:1px solid var(--line);border-radius:6px;background:#fff;padding:9px 11px;text-align:left}.truck-suggestion:hover{border-color:var(--brand-2);background:#f0f8f5}.truck-suggestion strong{color:var(--brand-2)}.truck-suggestion span{font-size:11px;color:var(--muted)}.truck-suggestion b{font-size:11px;color:var(--ink)}
.checkout{position:sticky;top:20px;padding-bottom:18px}.checkout>label,.checkout>fieldset,.checkout>.totals,.checkout>.primary,.checkout>.notice{margin-left:20px;margin-right:20px}.checkout>label{margin-top:15px}.checkout fieldset{border:0;padding:0;margin-top:17px}.checkout legend{font-weight:700;margin-bottom:8px}.radio{display:flex;align-items:center;gap:9px;font-weight:500;margin:8px 0}.radio input{width:16px;height:16px}.totals{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:18px;margin-bottom:18px;padding:13px 0}.totals div{display:flex;justify-content:space-between;padding:6px 0;color:var(--muted)}.totals .grand-total{margin-top:7px;padding-top:13px;border-top:1px dashed #cfd8d4;color:var(--ink)}.grand-total strong{font-size:20px;color:var(--brand)}
.notice{display:none;border-radius:5px;padding:10px 12px;font-size:12px}.notice.show{display:block;margin-top:12px}.notice.ok{background:#e8f4ee;color:#086744}.notice.error{background:#fbe9e7;color:#a42d28}.search{width:260px}.customer-cell{display:flex;align-items:center;gap:10px}.customer-cell span:last-child{display:grid;gap:2px}.customer-cell small,.block{font-size:11px;color:var(--muted)}.block{display:block;margin-top:3px}.small-button{border:1px solid var(--line);background:#fff;border-radius:5px;padding:6px 9px;color:var(--brand-2);font-weight:700}.row-actions{display:flex;gap:6px}.customer-link{border:0;background:transparent;padding:0;color:var(--brand-2);font-weight:750;text-align:left}.customer-link:hover{text-decoration:underline}.note-cell{max-width:260px;white-space:normal;line-height:1.35}.debt-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:16px}.debt-summary>div{background:#fff;border:1px solid var(--line);padding:17px;border-radius:7px;display:grid;gap:5px}.debt-summary span{color:var(--muted);font-size:12px}.debt-summary strong{font-size:20px}.debt-value{color:var(--red)}.status.high{background:#fbe9e7;color:var(--red)}.status.watch{background:#fbf1dc;color:var(--gold)}.status.ok{background:#e8f4ee;color:var(--green)}.status.pending{background:#fbf1dc;color:var(--gold)}.status.disabled{background:#edf0ee;color:#697570}.user-identity{display:grid;gap:3px;min-width:210px}.user-identity small{color:var(--muted)}.user-role-select,.user-status-select{min-width:140px;height:36px;padding:5px 9px}.user-save{white-space:nowrap}.user-management-table{table-layout:fixed;min-width:980px}.user-management-table th:nth-child(1){width:22%}.user-management-table th:nth-child(2){width:16%}.user-management-table th:nth-child(3){width:22%}.user-management-table th:nth-child(4){width:13%}.user-management-table th:nth-child(5){width:17%}.user-management-table th:nth-child(6){width:10%}.user-management-table td{vertical-align:middle}.user-management-table select{max-width:100%}
.audit-filters{display:grid;grid-template-columns:minmax(280px,1.5fr) minmax(220px,.7fr);gap:12px;padding:15px;margin-bottom:10px}.audit-count{margin:0 2px 11px;color:var(--muted);font-size:12px}.audit-table{table-layout:fixed;min-width:980px;white-space:normal}.audit-table th:nth-child(1){width:16%}.audit-table th:nth-child(2){width:22%}.audit-table th:nth-child(3){width:15%}.audit-table th:nth-child(4){width:47%}.audit-table td{vertical-align:top}.audit-action{display:inline-flex;padding:5px 8px;border-radius:5px;background:#edf5f2;color:var(--brand-2);font-size:11px;font-weight:800}.audit-description{line-height:1.4}.audit-description>strong,.audit-description>small{display:block}.audit-description>small{margin-top:4px;color:var(--muted)}.audit-details{margin-top:7px;border:0}.audit-details summary{display:inline-block;padding:0;color:var(--brand-2);font-size:11px}.audit-details pre{max-height:250px;overflow:auto;margin:8px 0 0;padding:11px;border-radius:5px;background:#f5f7f6;color:#44524d;font:11px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;white-space:pre-wrap;word-break:break-word}
.action-menu{position:relative;width:max-content}.action-menu summary{list-style:none;width:34px;height:28px;display:grid;place-items:center;border:1px solid var(--line);border-radius:5px;background:#fff;color:var(--brand);font-weight:900;cursor:pointer}.action-menu summary::-webkit-details-marker{display:none}.action-menu[open] summary{background:#edf5f2}.action-menu>div{position:absolute;right:0;top:34px;z-index:8;min-width:130px;display:grid;padding:5px;background:#fff;border:1px solid var(--line);border-radius:6px;box-shadow:0 10px 28px rgba(12,35,29,.16)}.action-menu button{border:0;background:#fff;padding:9px 10px;text-align:left;color:var(--brand);font-weight:700;border-radius:4px;white-space:nowrap}.action-menu button:hover{background:#edf5f2}.action-menu .delete-order{color:var(--red)}.action-menu .delete-order:hover{background:#fbe9e7}
.secondary-button{border:1px solid var(--line);background:#fff;color:var(--brand);border-radius:6px;padding:10px 14px;font-weight:750}.ledger-filters{display:grid;grid-template-columns:1.5fr 1.2fr repeat(3,1fr) auto;gap:12px;align-items:end;padding:15px;margin-bottom:14px}.ledger-filters button{height:42px;border:1px solid var(--line);background:#fff;border-radius:6px;padding:0 13px;font-weight:700;color:var(--muted)}.ledger-totals{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-bottom:14px}.ledger-totals>div{display:grid;gap:4px;background:#fff;border:1px solid var(--line);border-radius:6px;padding:12px 14px}.ledger-totals span{font-size:11px;color:var(--muted)}.ledger-totals strong{font-size:16px}.pagination{display:flex;align-items:center;justify-content:center;gap:15px;padding:14px;border-top:1px solid var(--line)}.pagination button{border:1px solid var(--line);background:#fff;border-radius:5px;padding:7px 11px;font-weight:700}.pagination button:disabled{opacity:.4}.pagination span{color:var(--muted);font-size:12px}
.order-payment-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 20px 0}.order-payment-actions button{min-height:42px;border-radius:6px;padding:10px 12px;font-weight:800}.debt-order-button{grid-column:1/-1;border:0;background:var(--brand);color:#fff}.payment-method-button{border:1px solid #a9c9be;background:#f2faf7;color:var(--green)}.transfer-order-button{border-color:#b7c7df;background:#f3f7fc;color:#315b8a}.order-payment-actions button:disabled{cursor:wait;opacity:.6}
.profile-dialog{width:min(1180px,calc(100% - 24px));max-height:calc(100vh - 30px)}.profile-shell{display:grid;max-height:calc(100vh - 30px);overflow:auto}.profile-dialog .section-head{position:sticky;top:0;background:#fff;z-index:2}.profile-dialog .icon-button{color:var(--ink)}.profile-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:16px 20px 0}.profile-metrics>div,.profile-prices>div{display:grid;gap:4px;padding:13px;border:1px solid var(--line);border-radius:6px}.profile-metrics span,.profile-prices span{font-size:11px;color:var(--muted)}.profile-metrics strong{font-size:17px}.profile-metrics>div:last-child{border-color:#efb1ad;background:#fff8f7}.profile-metrics>div:last-child strong{color:var(--red)}.profile-prices{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:10px 20px 18px}.profile-history-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-top:1px solid var(--line)}.profile-history-head h3{margin:0}.profile-history-head p{margin:3px 0 0;color:var(--muted);font-size:12px}.profile-table{margin:0 20px 20px;border:1px solid var(--line);border-radius:6px;max-height:390px}.profile-payments{display:grid;gap:7px;margin:0 20px 20px}.profile-payments h3{font-size:13px;margin:0 0 3px}.profile-payments div{display:flex;justify-content:space-between;gap:20px;padding:9px 11px;border:1px solid var(--line);border-radius:5px;background:#f8faf9}.profile-payments span{color:var(--muted);font-size:12px}.payment-button{background:#e8f4ee;color:var(--green);border-color:#b8daca}.primary.payment-button{background:var(--green);color:#fff;border-color:var(--green)}.payment-explain{margin:0 20px 14px;padding:11px 13px;border-left:3px solid var(--green);background:#f0f8f4;color:#496159;font-size:12px}.edit-totals{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:0 20px 14px}.edit-totals div{display:grid;gap:3px;border:1px solid var(--line);border-radius:6px;padding:11px}.edit-totals span{font-size:11px;color:var(--muted)}.edit-totals strong{font-size:16px}.edit-order{white-space:nowrap}
.customer-profile-dialog{width:calc(100vw - 36px);max-width:none;height:calc(100vh - 36px);max-height:none}.customer-profile-dialog .profile-shell{height:calc(100vh - 36px);max-height:none;grid-template-rows:auto auto auto auto minmax(300px,1fr) auto;overflow:hidden}.customer-profile-dialog .profile-table{margin-bottom:14px;max-height:none;height:100%;overflow:auto}.customer-profile-dialog .profile-payments{max-height:150px;overflow:auto}.customer-profile-dialog .section-head{padding:18px 22px}.customer-profile-dialog .section-head h2{font-size:22px}.customer-profile-dialog .profile-history-head{position:sticky;top:0;background:#fff;z-index:1}
.page-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.production-filters{display:grid;grid-template-columns:minmax(260px,1.5fr) minmax(220px,.7fr);gap:12px;padding:15px;margin-bottom:10px}.production-summary{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:0 2px 12px;color:var(--muted)}.production-summary>span{font-weight:750;color:var(--ink)}.production-summary small{font-size:11px}.production-sync-counts{display:flex;gap:8px;margin-left:auto}.production-sync-counts strong{padding:6px 9px;border-radius:5px;background:#e8f4ee;color:var(--green);font-size:11px}.production-sync-counts strong:last-child{background:#fbf1dc;color:var(--gold)}.production-table{table-layout:fixed;white-space:normal}.production-table th:nth-child(1){width:15%}.production-table th:nth-child(2){width:12%}.production-table th:nth-child(3){width:20%}.production-table th:nth-child(4){width:24%}.production-table th:nth-child(5){width:23%}.production-table th:nth-child(6){width:130px}.production-table td{vertical-align:top;line-height:1.45}.production-text{white-space:pre-line;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.production-link-status{display:inline-grid;gap:2px;padding:5px 7px;border-radius:5px;background:#edf1ef;color:var(--muted);font-size:10px;font-weight:750}.production-link-status.linked{background:#e8f4ee;color:var(--green)}.production-actions{display:flex;gap:6px;flex-wrap:wrap}.production-detail{display:grid;grid-template-columns:1fr 1fr;gap:0;padding:0 20px 20px}.production-detail section{padding:18px 0;border-bottom:1px solid var(--line)}.production-detail section:nth-child(odd){padding-right:20px}.production-detail section:nth-child(even){padding-left:20px;border-left:1px solid var(--line)}.production-detail h3{font-size:12px;text-transform:uppercase;color:var(--brand-2);margin:0 0 9px}.production-detail p{margin:0;white-space:pre-wrap;line-height:1.6;color:#44524d}.production-detail .empty-detail{color:var(--muted)}
.production-stats-filters{display:grid;grid-template-columns:repeat(2,minmax(180px,260px)) auto;gap:12px;align-items:end;padding:15px;margin-bottom:14px}.production-stats-filters button{height:42px;border:1px solid var(--line);background:#fff;border-radius:6px;padding:0 14px;color:var(--muted);font-weight:700}.production-stats-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:14px}.production-stats-metrics>div{display:grid;gap:5px;padding:14px;background:#fff;border:1px solid var(--line);border-radius:6px}.production-stats-metrics>div:first-child{background:#f2faf7;border-color:#9fc7ba}.production-stats-metrics span{font-size:11px;color:var(--muted)}.production-stats-metrics strong{font-size:18px;white-space:nowrap}.production-stats-metrics small{font-size:10px;color:var(--muted)}.production-stats-table th,.production-stats-table td{text-align:right}.production-stats-table th:first-child,.production-stats-table th:nth-child(2),.production-stats-table td:first-child,.production-stats-table td:nth-child(2){text-align:left}.production-stats-table .daily-total{color:var(--brand-2)}
.insight-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.insight-card{background:#fff;border:1px solid var(--line);border-radius:7px;padding:18px;display:grid;gap:15px}.insight-top{display:flex;justify-content:space-between;align-items:start;gap:10px}.confidence{font-size:10px;font-weight:750;padding:4px 7px;border-radius:4px;background:#edf1ef;color:var(--muted)}.confidence.high{background:#e8f4ee;color:var(--green)}.confidence.medium{background:#fbf1dc;color:var(--gold)}.insight-card>p{margin:0;color:#55635e;line-height:1.55;min-height:44px}.next-order{display:flex;justify-content:space-between;background:#f4f7f6;padding:10px;border-radius:5px}.next-order span{color:var(--muted);font-size:11px}.product-predictions{display:grid;gap:7px}.product-predictions span{display:flex;justify-content:space-between;border-bottom:1px solid #edf0ee;padding-bottom:6px}.product-predictions small{color:var(--muted)}
.report-filters{display:grid;grid-template-columns:1.4fr 1fr 1fr 1.4fr auto;gap:12px;align-items:end;padding:15px;margin-bottom:14px}.report-filters>button{height:42px;border:1px solid var(--line);background:#fff;border-radius:6px;padding:0 13px;font-weight:700;color:var(--muted)}.report-period{border:0;padding:0;margin:0}.report-period legend{margin-bottom:7px;color:#36443f;font-weight:650}.report-period>div{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #cfd8d4;border-radius:6px;overflow:hidden;height:42px}.report-period label{display:block}.report-period input{position:absolute;opacity:0;pointer-events:none}.report-period span{height:100%;display:grid;place-items:center;border-right:1px solid var(--line);color:var(--muted);font-weight:700;cursor:pointer}.report-period label:last-child span{border-right:0}.report-period input:checked+span{background:var(--brand);color:#fff}.report-metrics{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;margin-bottom:14px}.report-metrics>div{display:grid;gap:5px;background:#fff;border:1px solid var(--line);border-radius:6px;padding:13px}.report-metrics>div:first-child{border-color:#9fc7ba;background:#f2faf7}.report-metrics span{font-size:11px;color:var(--muted)}.report-metrics strong{font-size:17px;white-space:nowrap}.report-metrics small{font-size:10px;color:var(--muted)}.report-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(300px,.8fr);gap:14px;margin-bottom:14px}.report-chart-panel,.report-customer-panel{min-width:0}.line-chart{position:relative;height:360px;padding:12px 16px 18px}.line-chart svg{display:block;width:100%;height:100%;overflow:visible}.chart-grid-line{stroke:#e4e9e7;stroke-width:1}.chart-axis-label{fill:#78847f;font-size:10px}.chart-line{fill:none;stroke:var(--brand-2);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.chart-area{fill:rgba(36,107,89,.08)}.chart-point{fill:#fff;stroke:var(--brand-2);stroke-width:2;pointer-events:none}.chart-point.active{fill:var(--brand-2)}.chart-hit{fill:transparent;pointer-events:all;cursor:crosshair}.chart-tooltip{position:absolute;z-index:3;display:grid;gap:3px;min-width:132px;padding:9px 11px;background:var(--brand);color:#fff;border-radius:6px;box-shadow:0 8px 22px rgba(12,35,29,.22);pointer-events:none;opacity:0;transform:translate(-50%,-100%);transition:opacity .1s}.chart-tooltip.show{opacity:1}.chart-tooltip span{font-size:11px;color:#c8d9d4}.chart-tooltip strong{font-size:14px;white-space:nowrap}.chart-empty{height:100%;display:grid;place-items:center;color:var(--muted)}.revenue-share{padding:20px;display:grid;gap:8px}.revenue-share strong{font-size:36px;color:var(--brand)}.revenue-share span,.revenue-share small{color:var(--muted)}.share-track,.mix-track,.ranking-track{height:8px;background:#e8eeeb;border-radius:4px;overflow:hidden}.share-track i,.mix-track i,.ranking-track i{display:block;height:100%;background:var(--brand-2);border-radius:4px}.product-mix{display:grid;gap:14px;padding:0 20px 20px}.product-mix>div{display:grid;grid-template-columns:90px 1fr auto;gap:9px;align-items:center}.product-mix span{font-size:12px}.product-mix strong{font-size:12px}.product-mix .mix-cao i{background:var(--gold)}.product-mix .mix-hoanh i{background:var(--blue)}.report-ranking{margin-bottom:20px}.ranking-share{display:grid;grid-template-columns:minmax(90px,1fr) 48px;align-items:center;gap:8px}.ranking-share span{font-size:11px;font-weight:700;color:var(--brand-2);text-align:right}
dialog{border:0;border-radius:8px;padding:0;width:min(620px,calc(100% - 24px));box-shadow:0 25px 80px rgba(12,35,29,.24)}dialog::backdrop{background:rgba(12,28,24,.55)}dialog form{padding-bottom:18px}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;padding:4px 20px 0}.dialog-actions button{border:1px solid var(--line);background:#fff;border-radius:5px;padding:9px 14px;font-weight:700}.dialog-actions .primary{background:var(--brand);color:#fff;border-color:var(--brand)}
.match-suggestions{margin:0 20px 16px;border:1px solid #b9d7ce;border-radius:7px;background:#f3faf7;overflow:hidden}.match-suggestion-head{display:flex;justify-content:space-between;align-items:start;gap:14px;padding:13px 14px;border-bottom:1px solid #d7e8e2}.match-suggestion-head>div{display:grid;gap:3px}.match-suggestion-head strong{color:var(--brand)}.match-suggestion-head small{color:var(--muted)}.match-suggestion-list{display:grid;gap:8px;padding:10px}.match-card{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:10px;align-items:start;padding:11px;border:1px solid var(--line);border-radius:6px;background:#fff;cursor:pointer}.match-card:hover,.match-card.selected{border-color:var(--brand-2);box-shadow:0 0 0 2px rgba(36,107,89,.09)}.match-card input{width:16px;height:16px;margin-top:3px}.match-card-main{display:grid;gap:4px}.match-card-main small{color:var(--muted);line-height:1.4}.match-score{padding:4px 7px;border-radius:4px;background:#fbf1dc;color:var(--gold);font-size:10px;font-weight:800;white-space:nowrap}.match-score.high{background:#e8f4ee;color:var(--green)}.match-empty{padding:10px;color:var(--muted);font-size:12px}
.ai-chat-button{position:fixed;right:22px;bottom:22px;z-index:40;border:0;border-radius:7px;background:var(--brand);color:#fff;padding:12px 16px;display:flex;align-items:center;gap:8px;box-shadow:0 12px 30px rgba(23,63,54,.28)}.ai-chat-button span{font-size:18px}.ai-chat-panel{position:fixed;right:22px;bottom:78px;z-index:45;width:min(390px,calc(100vw - 24px));height:min(590px,calc(100vh - 110px));display:none;grid-template-rows:auto 1fr auto;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:0 24px 70px rgba(12,35,29,.25);overflow:hidden}.ai-chat-panel.open{display:grid}.ai-chat-panel header{display:flex;justify-content:space-between;align-items:center;padding:14px 15px;background:var(--brand);color:#fff}.ai-chat-panel header>div{display:flex;align-items:center;gap:10px}.ai-chat-panel header span:nth-child(2){display:grid;gap:2px}.ai-chat-panel header small{font-size:10px;color:#bcd0ca}.ai-chat-symbol{display:grid;place-items:center;width:32px;height:32px;border-radius:5px;background:#2b594e}.ai-chat-messages{overflow:auto;padding:15px;background:#f4f7f6;display:flex;flex-direction:column;gap:11px}.chat-message{max-width:88%;padding:10px 12px;border-radius:7px;line-height:1.45}.chat-message p{margin:0;color:inherit}.chat-message small{display:block;margin-top:6px;color:inherit;opacity:.75}.chat-message.assistant{align-self:flex-start;background:#fff;border:1px solid var(--line)}.chat-message.user{align-self:flex-end;background:var(--brand-2);color:#fff}.chat-order-preview{display:grid;gap:7px;margin-top:9px;padding-top:9px;border-top:1px solid var(--line)}.chat-order-preview div{display:flex;justify-content:space-between;gap:12px}.chat-actions{display:flex;gap:8px;margin-top:10px}.chat-actions button{flex:1;border:1px solid var(--line);border-radius:5px;padding:8px;font-weight:700;background:#fff}.chat-actions.customer-choices{flex-wrap:wrap}.chat-actions.customer-choices button{flex:1 1 100%;text-align:left}.chat-actions .confirm-chat-order{background:var(--brand);border-color:var(--brand);color:#fff}.chat-message.success{background:#e8f4ee;color:#086744}.chat-message.error{background:#fbe9e7;color:#a42d28}.ai-chat-form{display:grid;grid-template-columns:1fr 46px;gap:8px;padding:11px;border-top:1px solid var(--line);background:#fff}.ai-chat-form textarea{resize:none}.ai-chat-form button{padding:0;font-size:18px}
@media(max-width:1100px){.metrics{grid-template-columns:repeat(2,1fr)}.insight-grid{grid-template-columns:repeat(2,1fr)}.order-layout{grid-template-columns:1fr}.checkout{position:static}.dashboard-grid{grid-template-columns:1fr}.span-2{grid-column:auto}.ledger-filters{grid-template-columns:repeat(3,1fr)}.ledger-totals{grid-template-columns:repeat(3,1fr)}.report-filters{grid-template-columns:repeat(2,1fr)}.report-metrics,.production-stats-metrics{grid-template-columns:repeat(3,1fr)}.report-grid{grid-template-columns:1fr}}
@media(max-width:760px){.sidebar{transform:translateX(-100%);transition:transform .2s;width:250px}.sidebar.open{transform:translateX(0)}.workspace{margin:0;width:100%;padding:14px 12px 50px}.mobile-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:23px}.mobile-header .icon-button{color:var(--ink)}.page-head{align-items:start}.page-head h1{font-size:22px}.metrics{grid-template-columns:1fr 1fr;gap:9px}.metric{min-height:112px;padding:13px;display:grid;gap:8px}.metric-icon{width:32px;height:32px}.dashboard-grid{gap:10px}.surface{border-radius:6px}.order-layout{gap:10px}.form-grid{grid-template-columns:1fr;padding:14px}.form-grid .wide{grid-column:auto}.customer-picker{grid-template-columns:1fr}.customer-picker .secondary-button{width:100%}.customer-context{margin:0 14px 14px;grid-template-columns:1fr}.ai-hint{border-left:0;border-top:1px solid #d3dfda;padding:10px 0 0}.product-lines{margin:0 8px 14px}.product-header{display:none}.product-row{grid-template-columns:1fr 90px;padding:11px 10px}.product-row .unit-price,.product-row>strong:last-child{font-size:11px;text-align:right}.product-row .unit-price:before{content:"Giá: "}.product-row>strong:last-child:before{content:"Tiền: ";color:var(--muted);font-weight:500}.checkout>label,.checkout>fieldset,.checkout>.totals,.checkout>.primary,.checkout>.notice{margin-left:14px;margin-right:14px}.order-payment-actions{grid-template-columns:1fr;margin-left:14px;margin-right:14px}.debt-order-button{grid-column:auto}.search{width:150px}.insight-grid{grid-template-columns:1fr}.debt-summary{grid-template-columns:1fr}.section-head{padding:15px}.table-wrap{width:100%}th,td{padding:11px 13px}.login-box{padding:25px}.page-head .primary{padding:9px 11px}.ai-chat-button{right:12px;bottom:12px}.ai-chat-panel{right:12px;bottom:66px;height:calc(100vh - 82px)}.ledger-filters{grid-template-columns:1fr 1fr}.ledger-totals{grid-template-columns:1fr 1fr}.profile-metrics,.profile-prices{grid-template-columns:1fr 1fr;padding-left:12px;padding-right:12px}.profile-history-head{padding:13px 12px}.profile-table{margin:0 12px 12px}.customer-profile-dialog{width:100vw;height:100vh;max-height:none;border-radius:0}.customer-profile-dialog .profile-shell{height:100vh;grid-template-rows:auto auto auto auto minmax(240px,1fr) auto}.customer-profile-dialog .profile-history-head{align-items:flex-start;gap:10px}.customer-profile-dialog .row-actions{flex-wrap:wrap}.report-filters,.production-stats-filters{grid-template-columns:1fr}.report-metrics,.production-stats-metrics{grid-template-columns:1fr 1fr}.line-chart{height:300px;padding:8px}.revenue-share strong{font-size:29px}.product-mix>div{grid-template-columns:74px 1fr auto}.production-filters,.audit-filters{grid-template-columns:1fr}.production-summary{align-items:start;gap:8px;flex-direction:column}.production-sync-counts{margin-left:0;flex-wrap:wrap}.production-detail{grid-template-columns:1fr;padding:0 14px 14px}.production-detail section,.production-detail section:nth-child(odd),.production-detail section:nth-child(even){padding:15px 0;border-left:0}}
