:root{--navy:#092d4d;--navy-dark:#062239;--yellow:#ffd400;--ink:#172e43;--muted:#65788a;--bg:#f3f6f9;--line:#e2e8ee;--white:#fff;--green:#167052;--red:#b63940;--orange:#946100;--shadow:0 14px 50px #08274412;--radius:12px;font-family:Inter,"Segoe UI",Arial,sans-serif;font-size:16px;color:var(--ink)}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-size:.938rem;line-height:1.5}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{cursor:pointer}button:disabled{cursor:wait;opacity:.65}svg{flex-shrink:0;vertical-align:middle}h1,h2,h3,p{margin:0}h1{font-size:2rem;line-height:1.2;letter-spacing:-.8px;font-weight:720}h2{font-size:1.1rem;letter-spacing:-.25px}h3{font-size:1rem}p{color:var(--muted)}small,.small-text{font-size:.8125rem;color:var(--muted)}strong{font-weight:650}.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.8125rem}.right{text-align:right!important}.nowrap{white-space:nowrap}.muted{color:var(--muted)}.required{color:#a84718}.stack{display:grid;gap:20px}.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #d5dfe7;border-radius:7px;background:white;color:var(--ink);padding:10px 15px;font-weight:600;line-height:1.4;white-space:nowrap;font-size:.875rem;transition:background .15s,transform .15s}.btn:hover{background:#eaf0f5}.btn.primary{background:var(--yellow);border-color:var(--yellow);color:var(--navy-dark)}.btn.primary:hover{background:#edc600}.btn.navy{background:var(--navy);border-color:var(--navy);color:white}.btn.danger{color:var(--red);border-color:#f0d7d9}.btn.ghost{background:transparent;border-color:transparent}.btn.small{padding:6px 10px;font-size:.8125rem}.btn.icon{padding:8px}.btn.disabled{opacity:.4;cursor:default}.text-link{color:#196898;font-size:.875rem;font-weight:600}.text-link:hover{text-decoration:underline}.shell{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100vh}.sidebar{background:var(--navy-dark);color:#aec0cf;display:flex;flex-direction:column;position:fixed;width:244px;height:100dvh;z-index:40}.brand{padding:32px 28px 28px;border-bottom:1px solid #ffffff12}.wordmark{font-size:2rem;color:var(--yellow);font-weight:850;letter-spacing:-1.8px;line-height:1.15}.brand small{display:block;font-size:.69rem;letter-spacing:3.6px;margin-top:9px;color:#c9d4df}.workspace-tag{margin:21px 20px 12px;padding:12px;border:1px solid #ffffff1b;border-radius:8px;display:flex;gap:12px;align-items:center}.workspace-tag strong{display:block;color:#eef5fa;font-size:.8125rem}.workspace-tag small{font-size:.75rem;color:#96adbf}.nav-caption{padding:13px 28px 8px;text-transform:uppercase;letter-spacing:1.8px;font-size:.6875rem;font-weight:700;color:#7590a6}.nav-list{padding:0 13px;display:grid;gap:4px;overflow:auto}.nav-list a{display:flex;align-items:center;gap:12px;padding:11px 15px;border-radius:7px;font-size:.875rem;position:relative}.nav-list a:hover{background:#ffffff08;color:white}.nav-list a.active{background:#ffffff0e;color:var(--yellow)}.nav-list a.active:before{content:"";position:absolute;left:-13px;height:24px;width:3px;background:var(--yellow);border-radius:0 2px 2px 0}.nav-list .count{margin-left:auto;background:#ffd40020;color:var(--yellow);padding:1px 6px;border-radius:5px;font-size:.75rem}.sidebar-bottom{margin-top:auto;padding:16px 18px 18px;border-top:1px solid #ffffff10}.sidebar-bottom p{color:#91aabd;font-size:.75rem}.sidebar-bottom strong{display:block;color:#c2d1dc;font-size:.8125rem;margin-bottom:5px}.sidebar-preferences{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid #ffffff10}.sidebar-preferences label{display:grid;gap:5px;color:#91aabd;font-size:.6875rem;font-weight:650}.sidebar-preferences .ui-select{width:100%;min-width:0;background:#ffffff0b;border-color:#ffffff1f;color:#eef5fa}.sidebar-preferences .ui-select option{color:#172e43;background:#fff}.sidebar-access{padding:0 6px}.stock-live-loading{opacity:.58;transition:opacity .12s}.stock-live-loading .filterbar{pointer-events:none}.body{grid-column:2;min-width:0}.topbar{height:78px;display:flex;align-items:center;justify-content:space-between;padding:0 36px;background:white;border-bottom:1px solid var(--line);gap:20px}.breadcrumb{font-size:.8125rem;color:var(--muted);display:flex;gap:12px;align-items:center}.breadcrumb strong{color:var(--ink)}.top-actions{display:flex;gap:23px;align-items:center}.top-date{font-size:.8125rem;color:var(--muted)}.user-avatar{height:37px;width:37px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#e6eef4;color:var(--navy);font-weight:700;font-size:.8125rem}.user-link{display:flex;align-items:center;gap:10px}.user-link strong{display:block;font-size:.8125rem}.user-link small{display:block;font-size:.75rem}.content{padding:32px 36px 40px;max-width:1800px;margin:auto}.eyebrow{font-size:.6875rem;letter-spacing:1.8px;color:#8495a5;font-weight:700;margin-bottom:11px}.eyebrow span{margin:0 9px;color:#b8c4ce}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:28px}.page-heading p{font-size:.875rem;margin-top:10px}.card{background:white;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.card-head{padding:20px 23px;display:flex;justify-content:space-between;align-items:center;gap:15px;border-bottom:1px solid var(--line)}.card-head p{font-size:.8125rem;margin-top:4px}.card-body{padding:23px}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:24px}.kpi{padding:21px 23px;position:relative}.kpi-top{display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:.8125rem}.kpi-icon{width:37px;height:37px;border-radius:9px;background:#edf3f8;color:var(--navy);display:flex;align-items:center;justify-content:center}.kpi-icon.warn{background:#fff5d5;color:#9a6b00}.kpi-number{font-size:2.15rem;line-height:1.2;letter-spacing:-1.2px;font-weight:700;margin:15px 0 10px;font-variant-numeric:tabular-nums}.kpi-number.currency{font-size:1.55rem;margin-top:20px}.kpi-foot{font-size:.75rem;color:var(--muted)}.kpi-foot b{color:var(--green);font-weight:600}.two-col{display:grid;grid-template-columns:minmax(0,1.75fr) minmax(290px,1fr);gap:24px}.equal-col{display:grid;grid-template-columns:1fr 1fr;gap:24px}.alert-band{display:flex;align-items:center;gap:13px;border:1px solid #eadca9;background:#fffbeb;border-radius:9px;padding:15px 19px;margin-bottom:24px;color:#755509}.alert-band p{color:#83651b;font-size:.875rem}.alert-band .btn{margin-left:auto}.table-wrap{overflow:auto;width:100%}table{width:100%;border-collapse:collapse;text-align:left}th{background:#f8fafc;color:#7a8b9a;text-transform:uppercase;letter-spacing:.6px;font-size:.6875rem;font-weight:650;padding:13px 18px;white-space:nowrap;border-bottom:1px solid var(--line)}td{padding:15px 18px;border-bottom:1px solid #edf1f4;font-size:.875rem;vertical-align:middle}tbody tr:last-child td{border-bottom:none}tbody tr:hover{background:#fafcfe}td.product-cell{min-width:230px;max-width:420px}.product-cell strong{display:block;font-size:.8125rem;color:var(--navy);line-height:1.45}.product-cell small{display:block;margin-top:5px;font-size:.75rem;color:#80919f}.product-icon{width:36px;height:36px;border-radius:8px;background:#f0f4f8;display:inline-flex;align-items:center;justify-content:center;color:#6f879c}.product-row{display:flex;gap:12px;align-items:center}.num{font-variant-numeric:tabular-nums;white-space:nowrap;font-weight:650}.stock-num{font-size:1rem}.badge{font-size:.75rem;padding:4px 9px;display:inline-flex;border-radius:5px;font-weight:600;white-space:nowrap;line-height:1.5}.badge.good{background:#eaf6ef;color:#287759}.badge.warning{background:#fff5dc;color:#94630c}.badge.danger{background:#fdecee;color:#b3424d}.badge.blue{background:#eaf2fc;color:#376ba5}.badge.neutral{background:#edf1f5;color:#71808e}.stock-progress{width:58px;height:4px;background:#edf1f5;border-radius:4px;margin-top:6px;margin-left:auto;overflow:hidden}.stock-progress span{display:block;height:100%;background:#76bda2}.stock-progress.low span{background:#e6b64f}.pagination{padding:16px 20px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;font-size:.8125rem;color:var(--muted)}.pagination>div{display:flex;gap:8px}.filterbar{padding:17px 21px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);flex-wrap:wrap}.filterbar .search{flex:1;min-width:190px}.search{position:relative}.search svg{position:absolute;left:13px;top:12px;color:#8d9caa}.search input{padding-left:40px!important;width:100%}input,select,textarea{border:1px solid #d9e1e8;border-radius:7px;padding:10px 12px;background:#fff;color:var(--ink);min-width:0;font-size:.875rem;max-width:100%}input:focus,select:focus,textarea:focus{border-color:#7e9fb9;outline:3px solid #dbe9f444}input::placeholder,textarea::placeholder{color:#9aa8b4}input[type=checkbox]{accent-color:var(--navy);width:17px;height:17px;margin:0;vertical-align:middle;flex-shrink:0}input[type=date]{min-height:42px}.tabs{display:flex;gap:25px;padding:0 22px;border-bottom:1px solid var(--line);overflow:auto}.tabs a{padding:16px 0 13px;font-size:.8125rem;font-weight:600;color:#7c8c9b;white-space:nowrap;border-bottom:3px solid transparent}.tabs a.active{color:var(--navy);border-bottom-color:var(--yellow)}.tabs a b{padding:2px 6px;background:#f0f4f7;border-radius:4px;margin-left:6px;font-size:.7rem}.field{display:flex;flex-direction:column;gap:7px;margin-bottom:17px;min-width:0}.field>span{font-weight:600;font-size:.8125rem;color:#465c70}.field input,.field select,.field textarea{width:100%}.field small{font-size:.75rem}.field textarea{resize:vertical}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.form-grid.three{grid-template-columns:repeat(3,1fr)}.full{grid-column:1/-1}.check-label{display:flex;gap:10px;align-items:flex-start;font-size:.875rem;color:#52697c;margin:12px 0 18px}.check-label input{margin-top:3px}.form-footer{border-top:1px solid var(--line);padding-top:20px;margin-top:9px;display:flex;justify-content:flex-end;gap:10px}.form-errors{padding:12px 14px;background:#fff0f0;border:1px solid #f0c4c7;color:#a12f3b;border-radius:7px;margin-bottom:17px;white-space:pre-line;font-size:.875rem}.notice{padding:16px 18px;border-radius:8px;background:#edf5fb;color:#38637d;font-size:.875rem}.notice.warn{background:#fff7df;color:#876212}.notice.success{background:#eaf7f0;color:#227155}.notice+.card,.notice+.stack{margin-top:20px}.flash{display:flex;align-items:center;gap:10px;padding:14px 18px;background:#eaf7f0;border:1px solid #c1e3d0;border-radius:9px;color:#226f4c;margin-bottom:23px}.flash button{margin-left:auto}.empty{padding:50px 24px;text-align:center;color:#9cabb7}.empty h3{color:#5e7589;margin:14px 0 5px}.empty p{font-size:.875rem;max-width:390px;margin:auto}.health{background:var(--navy);color:white;border:none}.health .card-head{border-bottom-color:#ffffff16}.health p{color:#adc0d0}.health .card-body{display:flex;align-items:center;gap:28px;justify-content:center;padding:25px}.donut{width:142px;height:142px;border-radius:50%;position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0}.donut:before{content:"";position:absolute;inset:12px;border-radius:50%;background:var(--navy)}.donut div{position:relative;text-align:center}.donut strong{display:block;font-size:1.8rem;line-height:1.2}.donut small{font-size:.7rem;color:#abc2d5}.legend{display:grid;gap:16px;font-size:.8125rem}.legend span{display:inline-block;width:7px;height:7px;border-radius:2px;margin-right:8px}.legend b{display:block;margin-top:2px;font-size:1.05rem;color:white}.health-foot{padding:16px 22px;border-top:1px solid #ffffff16;color:#b9cbd8;font-size:.75rem}.category-line{margin-bottom:23px}.category-line:last-child{margin-bottom:0}.category-info{display:flex;justify-content:space-between;font-size:.8125rem;margin-bottom:8px}.category-bar{height:7px;border-radius:5px;background:#edf2f6;overflow:hidden}.category-bar span{height:100%;display:block;background:var(--navy);border-radius:5px}.timeline-item{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}.timeline-item:first-child{padding-top:0}.timeline-item:last-child{border:0;padding-bottom:0}.timeline-item .round{width:32px;height:32px;flex-shrink:0;border-radius:8px;background:#eaf6f0;color:#337d61;display:flex;align-items:center;justify-content:center}.timeline-item p{font-size:.8125rem;color:#456076}.timeline-item small{font-size:.75rem}.timeline-item .qty{margin-left:auto;white-space:nowrap;font-weight:650;font-size:.875rem}.mobile-menu{display:none}.overlay{display:none}dialog{border:0;border-radius:14px;padding:0;width:min(680px,calc(100vw - 28px));max-height:92dvh;color:var(--ink);box-shadow:0 30px 120px #041b4266}dialog::backdrop{background:#08264088;backdrop-filter:blur(3px)}dialog .dialog-head{display:flex;justify-content:space-between;align-items:center;padding:21px 24px;border-bottom:1px solid var(--line)}dialog .dialog-body{padding:24px}dialog h2{font-size:1.2rem}.form-help{font-size:.8125rem;margin:-4px 0 19px;color:var(--muted)}.detail-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.detail-grid dt{color:var(--muted);font-size:.75rem;margin-bottom:5px}.detail-grid dd{margin:0;font-size:.875rem;font-weight:600;word-break:break-word}.po-totals{margin-left:auto;width:min(360px,100%);padding:20px 23px}.po-totals>div{display:flex;justify-content:space-between;font-size:.875rem;padding:6px 0}.po-totals .total{border-top:1px solid var(--line);margin-top:10px;padding-top:15px;font-size:1.1rem;font-weight:700}.po-steps{display:flex;gap:6px;align-items:center;font-size:.8125rem;color:#8194a4;margin:0 0 22px;flex-wrap:wrap}.po-steps span{padding:6px 13px;border-radius:5px;background:#e8eef3}.po-steps span.current{background:var(--navy);color:white}.po-edit-table input{width:100%;min-width:75px}.po-edit-table .desc{min-width:240px}.po-edit-table td{vertical-align:top;padding:13px 10px}.po-edit-table th{padding:12px 10px}.po-edit-table .note-input{font-size:.75rem;margin-top:8px;padding:6px 9px}.po-stock-info{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:6px;font-size:.75rem;color:var(--muted)}.po-stock-info span{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;border-radius:5px;background:#f2f6f9;border:1px solid var(--line);white-space:nowrap}.po-stock-info .current{color:var(--navy);font-weight:650}.po-stock-info .low{color:var(--orange);font-weight:650}.po-stock-info .negative{color:var(--red);font-weight:700}.compact-total{font-weight:650;white-space:nowrap;padding-top:11px}.account-card{max-width:680px}.login{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;background:white}.login-visual{background:var(--navy-dark);padding:54px 64px;color:white;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}.login-visual:after{content:"";position:absolute;left:-10%;right:-10%;height:2px;background:#ffffff10;bottom:31%;transform:rotate(-32deg);box-shadow:0 40px #ffffff07,0 80px #ffffff07,0 120px #ffffff07,0 160px #ffffff07}.login-visual .wordmark{font-size:2.65rem}.login-visual .tag{font-size:.69rem;letter-spacing:4px;color:#acbecd;margin-top:12px}.login-visual h1{font-size:3.2rem;line-height:1.16;letter-spacing:-1.8px;max-width:430px;margin-bottom:24px}.login-visual h1 span{color:var(--yellow)}.login-visual p{color:#aac0d1;max-width:360px;line-height:1.8;font-size:1rem}.login-caption{border-left:3px solid var(--yellow);padding-left:20px;position:relative;z-index:1}.login-caption small{color:#96adbf;letter-spacing:1px}.login-form-area{display:flex;align-items:center;justify-content:center;padding:40px}.login-form{width:100%;max-width:440px}.login-form h2{font-size:1.8rem;margin:14px 0 7px}.login-form>p{margin-bottom:30px}.login-form .btn.primary{width:100%;margin-top:6px;padding:13px}.login-form .foot{font-size:.75rem;text-align:center;color:#95a4af;margin-top:25px}.login-form .login-icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#f1f5f8;border-radius:12px;color:var(--navy)}.setup-code{display:block;padding:14px;background:#f2f5f8;border-radius:7px;margin:15px 0;font-size:.8125rem;overflow:auto;color:#284960}.footer-caption{padding-top:28px;color:#8b9ba9;font-size:.75rem;display:flex;justify-content:space-between;gap:10px}.menu-backdrop{display:none}[hidden]{display:none!important}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.ui-preferences{display:flex;gap:7px;align-items:center}.login-prefs{justify-content:flex-end;margin-bottom:18px}.ui-select{min-height:34px;padding:6px 9px;font-size:.75rem;font-weight:700;border-radius:7px;min-width:67px}.reset-confirm-box{margin-top:20px;padding:18px;border:1px solid #efc2c5;background:#fff7f7;border-radius:10px}.reset-confirm-title{display:flex;align-items:center;gap:12px;color:var(--red);margin-bottom:17px}.reset-confirm-title small{display:block;margin-top:3px}.reset-confirm-grid{margin-top:0}.reset-phrase-field input{font-weight:800;letter-spacing:1.4px;border-width:2px;border-color:#d58a90;background:#fff!important;color:#172e43!important;min-height:44px}.reset-phrase-field input:focus{border-color:#b63940;outline-color:#b6394033}
html[data-theme=dark]{color-scheme:dark;--ink:#e7eef5;--muted:#9eafbf;--bg:#0b1520;--line:#26394a;--white:#11202d;--shadow:0 14px 50px #00000055;--green:#58c89b;--red:#ff858d;--orange:#e7b454}html[data-theme=dark] body{background:var(--bg);color:var(--ink)}html[data-theme=dark] .topbar,html[data-theme=dark] .card,html[data-theme=dark] dialog,html[data-theme=dark] .btn,html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#11202d;color:var(--ink);border-color:var(--line)}html[data-theme=dark] .btn:hover,html[data-theme=dark] tbody tr:hover{background:#182b3a}html[data-theme=dark] .btn.primary{background:var(--yellow);color:#062239;border-color:var(--yellow)}html[data-theme=dark] th{background:#142432;color:#a9b8c5}html[data-theme=dark] td{border-color:#203545}html[data-theme=dark] .field>span,html[data-theme=dark] .check-label{color:#c7d3dc}html[data-theme=dark] .badge.neutral{background:#233747;color:#c4d0da}html[data-theme=dark] .badge.blue{background:#193b5d;color:#9ecbff}html[data-theme=dark] .badge.good{background:#143b31;color:#7be0b7}html[data-theme=dark] .badge.warning{background:#493a16;color:#f2cf78}html[data-theme=dark] .badge.danger{background:#4d2328;color:#ffafb5}html[data-theme=dark] .notice{background:#143246;color:#9fd2f0}html[data-theme=dark] .notice.warn{background:#40351a;color:#efd385}html[data-theme=dark] .notice.success{background:#16392e;color:#85deb9}html[data-theme=dark] .alert-band{background:#3a321a;border-color:#5a4b20;color:#f2d980}html[data-theme=dark] .alert-band p{color:#ddc56d}html[data-theme=dark] .sequence-form{background:#0f1c28}html[data-theme=dark] .sequence-preview{background:#182c3c}html[data-theme=dark] .product-icon,html[data-theme=dark] .kpi-icon{background:#1b3142}html[data-theme=dark] .search svg{color:#8097a9}html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#718596}html[data-theme=dark] .reset-confirm-box{background:#351e24;border-color:#714049}html[data-theme=dark] .reset-phrase-field input{background:#0e1923!important;color:#f3f7fa!important;border-color:#a15a63}html[data-theme=dark] .form-errors{background:#421e24;border-color:#773940;color:#ffafb5}html[data-theme=dark] .login-form-area{background:#0b1520}html[data-theme=dark] .sidebar-preferences .ui-select{background:#0b1823;color:#e7eef5;border-color:#284257}html[data-theme=dark] .sidebar-preferences .ui-select option{background:#11202d;color:#e7eef5}
@media(min-width:1500px){.content{padding:38px 48px}.topbar{padding:0 48px}.sidebar{width:260px}.shell{grid-template-columns:260px minmax(0,1fr)}}
@media(max-width:1200px){.content{padding:26px 24px}.topbar{padding:0 24px}.kpis{gap:12px}.kpi{padding:17px}.kpi-number{font-size:1.9rem}.two-col{grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:18px}.health .card-body{gap:18px;padding:24px 18px}.donut{width:112px;height:112px}.donut strong{font-size:1.5rem}.top-date{display:none}.page-heading{align-items:flex-start}.login-visual{padding:44px}.login-visual h1{font-size:2.6rem}}
@media(max-width:1000px){.shell{grid-template-columns:210px minmax(0,1fr)}.sidebar{width:210px}.brand{padding:28px 23px}.wordmark{font-size:1.8rem}.workspace-tag{margin:18px 14px 10px}.nav-list a{padding:11px;font-size:.8125rem;gap:10px}.sidebar-bottom{padding:18px}.two-col,.equal-col{grid-template-columns:1fr}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.page-heading{flex-direction:column;gap:18px}.page-heading h1{font-size:1.8rem}.health .card-body{justify-content:flex-start;gap:38px}.health .legend{display:flex;gap:30px}.form-grid.three{grid-template-columns:1fr 1fr}.detail-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.ui-preferences.compact .ui-select{min-width:58px;padding:5px 6px}.shell{display:block}.sidebar{transform:translateX(-100%);width:244px;transition:transform .2s}.sidebar.open{transform:translateX(0)}.mobile-menu{display:inline-flex}.menu-backdrop.open{display:block;position:fixed;inset:0;background:#05213b66;z-index:35}.topbar{height:66px;padding:0 17px}.breadcrumb{display:none}.top-actions{gap:12px}.user-link small{display:none}.content{padding:24px 16px}.kpis{gap:10px;margin-bottom:19px}.kpi{padding:16px 13px}.kpi-top{font-size:.75rem}.kpi-icon{width:29px;height:29px}.kpi-number{font-size:1.85rem}.kpi-number.currency{font-size:1.25rem}.kpi-foot{font-size:.7rem}.page-heading{margin-bottom:22px}.eyebrow{font-size:.625rem}.page-heading h1{font-size:1.7rem}.page-heading p{font-size:.8125rem}.actions{gap:8px}.actions .btn{padding:9px 12px;font-size:.8125rem}.alert-band{align-items:flex-start;flex-wrap:wrap}.alert-band .btn{margin-left:33px}.alert-band p{font-size:.8125rem;flex:1}.card-head{padding:17px}.card-body{padding:18px}.filterbar{padding:14px;gap:8px}.filterbar .search{flex-basis:100%}.filterbar select{flex:1;max-width:100%}.tabs{gap:20px;padding:0 16px}.detail-grid{gap:16px}.health .legend{display:grid;gap:12px}.health .card-body{justify-content:center}.pagination{font-size:.75rem;padding:13px}.pagination .btn{font-size:.75rem}.footer-caption{font-size:.6875rem}.login{display:block}.login-visual{padding:26px 30px;min-height:0}.login-visual h1,.login-visual p,.login-caption{display:none}.login-visual .wordmark{font-size:2rem}.login-visual .tag{margin-top:6px;font-size:.6rem}.login-form-area{padding:28px 23px}.form-grid,.form-grid.three{grid-template-columns:1fr}.form-grid .full{grid-column:1}dialog .dialog-body{padding:20px}dialog .dialog-head{padding:17px 20px}.po-steps{font-size:.75rem}.po-steps span{padding:5px 9px}}
@media print{.sidebar,.topbar,.actions,.btn,.filterbar,.tabs,.footer-caption,.pagination{display:none!important}.shell{display:block}.content{padding:0}.card{break-inside:avoid;box-shadow:none}.table-wrap{overflow:visible}body{background:white}.kpis{grid-template-columns:repeat(4,1fr)}.page-heading{margin-bottom:20px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.guide-filters{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;padding:20px 22px;align-items:end}.guide-filters .search{grid-column:span 4;min-width:0}.guide-filters select[name=guide_state]{grid-column:span 3}.guide-filters select[name=product]{grid-column:span 5}.guide-filters>label{grid-column:span 4;display:grid;gap:6px;font-weight:600}.guide-filters>.btn{grid-column:span 4}.guide-filters input,.guide-filters select{width:100%;min-height:42px}.guide-list th,.guide-list td{padding:18px 16px}.guide-list td:nth-child(2){min-width:170px;max-width:300px;overflow-wrap:anywhere}.guide-actions{justify-content:flex-end;flex-wrap:nowrap;gap:8px}.guide-actions .btn{padding:8px 10px;gap:6px}.guide-list .badge{line-height:1.6}.sequence-settings{margin-bottom:26px}.sequence-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.sequence-form{padding:22px;border:1px solid var(--line);border-radius:10px;background:#fbfcfe}.sequence-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.sequence-fields{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:22px}.sequence-preview{display:flex;justify-content:space-between;align-items:center;gap:14px;background:#eaf1f7;border-radius:7px;padding:13px 15px;font-size:.8125rem}.sequence-preview output{font-family:ui-monospace,Consolas,monospace;font-weight:700;color:var(--navy);font-size:1rem}.sequence-help{margin-top:22px;line-height:1.7}.sequence-form .form-footer{margin-top:20px}.sequence-form .field{margin-bottom:18px}
@media(max-width:1000px){.sequence-grid{grid-template-columns:1fr}.guide-filters .search{grid-column:span 7}.guide-filters select[name=guide_state]{grid-column:span 5}.guide-filters select[name=product]{grid-column:1/-1}}
@media(max-width:760px){.guide-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:17px}.guide-filters .search,.guide-filters select[name=guide_state],.guide-filters select[name=product],.guide-filters>.btn{grid-column:1/-1}.guide-filters>label{grid-column:span 1}.guide-actions .btn{padding:9px 10px}.sequence-form{padding:17px}.sequence-fields{gap:12px}.sequence-preview{flex-wrap:wrap}.sequence-grid{gap:18px}}
.movement-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;align-items:end}.movement-filters>.search{grid-column:span 2}.movement-filters select[name=product]{grid-column:span 2}.movement-date-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;grid-column:span 2}.movement-date-range>label{display:grid;gap:6px}.movement-filters select[name=flow]{grid-column:span 1}.movement-filters input,.movement-filters select{width:100%;min-height:42px}@media(max-width:760px){.movement-filters{grid-template-columns:1fr 1fr}.movement-filters>.search,.movement-filters select[name=product],.movement-date-range{grid-column:1/-1}.movement-filters select[name=flow]{grid-column:1}.movement-date-range{grid-template-columns:1fr 1fr}}@media(max-width:520px){.movement-date-range{grid-template-columns:1fr}.movement-filters select[name=flow],.movement-filters>button{grid-column:1/-1}}

/* ==========================================================
   ERP 2.1 — Professional corporate UI refresh
   Visual-only overrides: business logic and permissions unchanged.
   ========================================================== */
:root{
  --navy:#0b2d49;
  --navy-dark:#071d30;
  --navy-soft:#123d5f;
  --yellow:#f5c400;
  --yellow-soft:#fff7d6;
  --ink:#16283a;
  --muted:#6f8191;
  --bg:#f4f6f8;
  --line:#dde4ea;
  --white:#ffffff;
  --green:#24745d;
  --red:#b8454d;
  --orange:#a66c12;
  --shadow:0 8px 30px rgba(10,38,61,.07);
  --shadow-lg:0 20px 55px rgba(10,38,61,.12);
  --radius:14px;
  --radius-sm:9px;
  font-family:Inter,"Segoe UI Variable","Segoe UI",Roboto,Arial,sans-serif;
}
html{scrollbar-color:#bcc8d1 transparent;scrollbar-width:thin}
body{background:linear-gradient(180deg,#f8fafb 0,#f3f6f8 260px,#f3f6f8 100%);color:var(--ink);letter-spacing:-.005em}
h1{font-size:2.05rem;letter-spacing:-1.05px;font-weight:760;color:#10283d}
h2{font-size:1.05rem;font-weight:730;color:#173149}
h3{font-weight:700}.small-text,small{color:#758796}
.shell{grid-template-columns:252px minmax(0,1fr)}
.sidebar{width:252px;background:linear-gradient(180deg,#071f34 0%,#092944 48%,#071e31 100%);box-shadow:10px 0 35px rgba(5,28,47,.08);border-right:1px solid rgba(255,255,255,.04)}
.brand{padding:29px 25px 24px;border-bottom:1px solid rgba(255,255,255,.08)}
.wordmark{font-size:1.75rem;letter-spacing:-1.4px;color:#fff;font-weight:800}.wordmark::first-letter{color:var(--yellow)}
.brand small{margin-top:6px;letter-spacing:2.2px;font-size:.64rem;color:#8fa7ba;font-weight:650}
.workspace-tag{margin:18px 16px 12px;padding:12px 13px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.035);border-radius:11px}
.workspace-tag strong{font-weight:650;color:#f6f9fb}.workspace-tag small{color:#829db1}
.nav-caption{padding:16px 23px 8px;font-size:.625rem;letter-spacing:1.55px;color:#6f8da3}
.nav-list{padding:0 12px;gap:3px}.nav-list a{padding:10px 12px;border-radius:9px;color:#b9c8d3;font-weight:520;transition:background .16s,color .16s,transform .16s}.nav-list a:hover{background:rgba(255,255,255,.06);color:#fff;transform:translateX(2px)}
.nav-list a.active{background:linear-gradient(90deg,rgba(245,196,0,.16),rgba(245,196,0,.055));color:#fff;font-weight:680}.nav-list a.active svg{color:var(--yellow)}.nav-list a.active:before{left:-12px;height:30px;width:3px;background:var(--yellow);box-shadow:0 0 16px rgba(245,196,0,.35)}
.nav-list .count{background:rgba(245,196,0,.13);border:1px solid rgba(245,196,0,.14);color:#f8d747}
.sidebar-bottom{padding:17px 16px 19px;border-top:1px solid rgba(255,255,255,.07)}.sidebar-preferences{gap:7px}.sidebar-preferences .ui-select{border-radius:8px;background:rgba(255,255,255,.055);border-color:rgba(255,255,255,.09)}
.body{grid-column:2}.topbar{height:72px;padding:0 34px;background:rgba(255,255,255,.92);backdrop-filter:saturate(135%) blur(12px);position:sticky;top:0;z-index:25;border-bottom:1px solid rgba(214,223,230,.9);box-shadow:0 1px 0 rgba(255,255,255,.8)}
.breadcrumb{gap:9px;color:#81909d}.breadcrumb strong{font-weight:650;color:#30475b}.top-actions{gap:18px}.top-date{color:#8796a2}.user-link{padding:6px 8px;border-radius:10px;transition:background .15s}.user-link:hover{background:#f2f5f7}.user-avatar{height:36px;width:36px;background:#e8eef3;color:#173b58;box-shadow:inset 0 0 0 1px #dbe4ea}
.content{padding:34px 36px 46px;max-width:1760px}.eyebrow{margin-bottom:9px;color:#8a9aa7;letter-spacing:1.45px}.page-heading{margin-bottom:26px}.page-heading p{margin-top:7px;color:#738493;max-width:760px}.page-heading>.actions{gap:9px}
.card{background:rgba(255,255,255,.98);border:1px solid #dfe6ec;border-radius:14px;box-shadow:0 3px 14px rgba(9,45,77,.035);overflow:hidden}.card:hover{border-color:#d7e0e7}.card-head{padding:19px 21px;border-bottom-color:#e7ecf0;background:linear-gradient(180deg,#fff,#fcfdfe)}.card-head h2{color:#173149}.card-body{padding:22px}
.kpis{gap:15px}.kpi{padding:20px 21px;box-shadow:0 4px 18px rgba(9,45,77,.045)}.kpi-top{font-weight:600;color:#738493}.kpi-icon{width:39px;height:39px;border-radius:10px;background:#edf3f7;color:#204a68;border:1px solid #e0e9ef}.kpi-icon.warn{background:#fff7dc;border-color:#f3e7b2}.kpi-number{font-weight:760;color:#132e45}.kpi-foot{border-top:1px solid #edf1f4;padding-top:10px;margin-top:10px}
.btn{min-height:40px;border-radius:9px;padding:9px 14px;border-color:#d6e0e7;background:#fff;color:#233b50;font-weight:650;box-shadow:0 1px 2px rgba(14,42,64,.035);transition:background .15s,border-color .15s,box-shadow .15s,transform .15s}.btn:hover{background:#f7f9fb;border-color:#c7d3dc;box-shadow:0 4px 12px rgba(9,45,77,.07);transform:translateY(-1px)}.btn:active{transform:translateY(0)}
.btn.primary{background:var(--navy);border-color:var(--navy);color:#fff;box-shadow:0 5px 14px rgba(9,45,77,.16)}.btn.primary:hover{background:#0d385a;border-color:#0d385a}.btn.navy{background:#123b5c;border-color:#123b5c}.btn.danger{background:#fff;border-color:#eccfd2;color:#a93c44}.btn.danger:hover{background:#fff5f6;border-color:#e5b7bc}.btn.ghost{box-shadow:none}.btn.small{min-height:34px;border-radius:8px;padding:6px 10px}.btn.icon{border-radius:9px}
.text-link{color:#1e648f;font-weight:650}.text-link:hover{color:#0e4f7b}
.tabs{background:#fff;border-bottom:1px solid #e8edf1}.tabs a{font-weight:620;color:#6f8191}.tabs a.active{color:#173c59}.tabs a.active:after{height:2px;background:var(--yellow)}
.filterbar{background:#fbfcfd;border-bottom-color:#e5ebf0;padding:16px 18px;gap:11px}.filterbar input,.filterbar select,.field input,.field select,.field textarea,input,select,textarea{border:1px solid #d5dfe6;border-radius:9px;background:#fff;color:#20374a;box-shadow:inset 0 1px 1px rgba(15,45,68,.02);transition:border-color .15s,box-shadow .15s,background .15s}.filterbar input:focus,.filterbar select:focus,.field input:focus,.field select:focus,.field textarea:focus,input:focus,select:focus,textarea:focus{border-color:#7fa5bf;box-shadow:0 0 0 3px rgba(32,91,130,.09);outline:0}.search{position:relative}.search svg{color:#8295a4}.search input{padding-left:39px}
.table-wrap{background:#fff}table{font-size:.875rem}th{background:#f6f8fa;color:#728391;font-size:.66rem;letter-spacing:.72px;font-weight:720;padding:12px 16px;border-bottom:1px solid #dfe6eb}td{padding:14px 16px;border-bottom:1px solid #edf1f4;color:#30465a}tbody tr{transition:background .12s}tbody tr:hover{background:#f8fafb}.product-cell strong{color:#183d59;font-weight:690}.product-icon{width:34px;height:34px;border-radius:9px;background:#edf3f7;color:#628099;border:1px solid #e2e9ee}.mono{color:#2b526f;font-size:.78rem}.num{color:#173b57}
.badge{padding:4px 9px;border-radius:999px;font-size:.69rem;font-weight:680;border:1px solid transparent}.badge.good{background:#eef8f4;color:#2c735c;border-color:#d9eee6}.badge.warning{background:#fff8e8;color:#95600b;border-color:#f4e6bf}.badge.danger{background:#fff0f1;color:#b3424d;border-color:#f2d8db}.badge.blue{background:#edf5fc;color:#326b99;border-color:#d8e8f5}.badge.neutral{background:#f0f3f5;color:#667987;border-color:#e2e7eb}
.stock-progress{height:3px;background:#e8edf1}.stock-progress span{background:#4ca987}.stock-progress.low span{background:#e2ad1e}
.alert-band,.notice{border-radius:11px}.notice{border:1px solid #dceaf2;background:#f1f8fc;color:#37637d}.notice.success{background:#eff8f4;border-color:#d8eee5;color:#2d705b}.notice.warn{background:#fff8e8;border-color:#f0e2b9;color:#8c6517}.alert-band{background:#fff9e9;border-color:#f1e2ad}
.pagination{background:#fbfcfd;border-top:1px solid #e8edf1}.pagination .btn{box-shadow:none}
dialog{border-radius:16px;border:1px solid #dfe6eb;box-shadow:var(--shadow-lg);background:#fff}dialog .dialog-head{padding:18px 21px;background:#fbfcfd;border-bottom-color:#e6ebef}dialog .dialog-body{padding:22px}.form-footer{border-top-color:#e8edf1}.check-label{color:#42596c}
.po-steps span{border-radius:999px;background:#eef2f5;color:#6b7d8b}.po-steps span.current{background:#153d5b;color:#fff}.po-totals{background:#fbfcfd;border-radius:11px}.sequence-form{background:#fbfcfd;border-color:#e1e7ec;border-radius:12px}.sequence-preview{background:#eef4f8;border:1px solid #e1e9ef}
.health{background:linear-gradient(145deg,#0a2b47 0%,#103b5c 100%);box-shadow:0 12px 32px rgba(7,35,58,.16)}.health .card-head{background:transparent}.health h2{color:#fff}.health p{color:#a9bfd0}
.empty{padding:54px 22px}.empty h3{color:#536d80}.round{border:1px solid #dcebe4}
.login{background:#f4f6f8}.login-visual{background:radial-gradient(circle at 15% 18%,rgba(245,196,0,.12),transparent 30%),linear-gradient(145deg,#071d30,#0b3555)}.login-form-area{background:#fff}.login-form{max-width:420px}.login-form h2{color:#152f46}.login-form .btn.primary{min-height:46px}.login-icon{border:1px solid #e0e8ed}
.footer-caption{color:#94a1ac}

html[data-theme=dark]{--ink:#e6edf3;--muted:#97a9b7;--bg:#0b141c;--line:#253847;--white:#101e29;--shadow:0 10px 34px rgba(0,0,0,.26);--shadow-lg:0 24px 64px rgba(0,0,0,.46)}
html[data-theme=dark] body{background:linear-gradient(180deg,#0c1720,#09131b 260px,#09131b)}
html[data-theme=dark] h1,html[data-theme=dark] h2,html[data-theme=dark] h3{color:#eaf1f6}
html[data-theme=dark] .topbar{background:rgba(13,27,38,.92);border-bottom-color:#223543;box-shadow:none}
html[data-theme=dark] .user-link:hover{background:#142634}
html[data-theme=dark] .user-avatar{background:#183247;color:#d7e4ed;box-shadow:inset 0 0 0 1px #284459}
html[data-theme=dark] .card,html[data-theme=dark] dialog{background:#101f2b;border-color:#243847;box-shadow:0 5px 20px rgba(0,0,0,.16)}
html[data-theme=dark] .card-head,html[data-theme=dark] dialog .dialog-head,html[data-theme=dark] .filterbar,html[data-theme=dark] .pagination,html[data-theme=dark] .po-totals{background:#0f1d28;border-color:#253847}
html[data-theme=dark] table,html[data-theme=dark] .table-wrap{background:#101f2b}html[data-theme=dark] th{background:#132532;color:#9aacb9;border-color:#263a48}html[data-theme=dark] td{color:#c9d6df;border-color:#203441}html[data-theme=dark] tbody tr:hover{background:#142734}
html[data-theme=dark] .product-cell strong,html[data-theme=dark] .num,html[data-theme=dark] .mono{color:#dbe7ee}
html[data-theme=dark] .product-icon,html[data-theme=dark] .kpi-icon{background:#183044;border-color:#254459;color:#9db4c5}
html[data-theme=dark] .btn{background:#122532;color:#dce6ed;border-color:#2a4050;box-shadow:none}html[data-theme=dark] .btn:hover{background:#18303f;border-color:#365267}html[data-theme=dark] .btn.primary{background:#e8b900;border-color:#e8b900;color:#132433}html[data-theme=dark] .btn.primary:hover{background:#f2c40a;border-color:#f2c40a}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#0d1a24;color:#dfe8ee;border-color:#2a4050}html[data-theme=dark] input:focus,html[data-theme=dark] select:focus,html[data-theme=dark] textarea:focus{border-color:#557c98;box-shadow:0 0 0 3px rgba(76,126,160,.13)}
html[data-theme=dark] .tabs{background:#101f2b;border-color:#253847}html[data-theme=dark] .tabs a.active{color:#f0f5f8}
html[data-theme=dark] .badge.neutral{background:#1c3140;color:#b8c7d2;border-color:#294253}html[data-theme=dark] .badge.good{background:#14342c;color:#7ed0ad;border-color:#235244}html[data-theme=dark] .badge.warning{background:#3b3116;color:#ebcb72;border-color:#55461d}html[data-theme=dark] .badge.danger{background:#412126;color:#f1a5ab;border-color:#5b2e35}html[data-theme=dark] .notice{background:#112d3d;border-color:#25485b;color:#a7cee3}html[data-theme=dark] .notice.success{background:#123229;border-color:#255244;color:#8ed2b8}html[data-theme=dark] .notice.warn{background:#3a3017;border-color:#55481f;color:#ebcc78}
html[data-theme=dark] .sequence-form{background:#0d1b25;border-color:#263a48}html[data-theme=dark] .sequence-preview{background:#142835;border-color:#253e4d}
html[data-theme=dark] .login-form-area{background:#0b141c}

@media(min-width:1500px){.sidebar{width:264px}.shell{grid-template-columns:264px minmax(0,1fr)}.content{padding-left:46px;padding-right:46px}.topbar{padding-left:46px;padding-right:46px}}
@media(max-width:1000px){.shell{grid-template-columns:214px minmax(0,1fr)}.sidebar{width:214px}.nav-list a{padding-left:10px;padding-right:10px}.content{padding:28px 24px}}
@media(max-width:760px){.sidebar{width:252px}.topbar{height:64px}.content{padding:22px 15px 34px}.card{border-radius:12px}.page-heading h1{font-size:1.65rem}.filterbar{padding:13px}.btn{min-height:38px}.table-wrap{border-radius:0}.kpi{border-radius:12px}}


/* ERP 2.1.2 — Dark mode readability & consistent surface contrast.
   Scoped to the dark theme: the Light theme and ERP logic remain unchanged. */
html[data-theme="dark"]{
  --ink:#eaf2f8;
  --muted:#b1c2d0;
  --line:#304655;
  --white:#101f2b;
  --green:#83dbb9;
  --red:#ff9da4;
  --orange:#f3cf83;
  color-scheme:dark;
}
/* Previously hard-coded light-theme foregrounds on dark surfaces. */
html[data-theme="dark"] .breadcrumb{color:#acbdcb}
html[data-theme="dark"] .breadcrumb strong,
html[data-theme="dark"] .kpi-number,
html[data-theme="dark"] .sequence-preview output{color:#edf5fa}
html[data-theme="dark"] .top-date,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .page-heading p,
html[data-theme="dark"] .kpi-top,
html[data-theme="dark"] .kpi-foot,
html[data-theme="dark"] .footer-caption,
html[data-theme="dark"] .small-text,
html[data-theme="dark"] small,
html[data-theme="dark"] .po-steps{color:#b3c5d1}
html[data-theme="dark"] .card-head h2,
html[data-theme="dark"] .login-form h2,
html[data-theme="dark"] .empty h3{color:#eaf2f8}
html[data-theme="dark"] .tabs a{color:#bfd0dd}
html[data-theme="dark"] .tabs a:hover,
html[data-theme="dark"] .tabs a.active{color:#f4f9fc}
html[data-theme="dark"] .tabs a b{background:#294458;color:#eaf4fa}
html[data-theme="dark"] .text-link{color:#94d2ff}
html[data-theme="dark"] .text-link:hover{color:#c5e8ff}
html[data-theme="dark"] .required{color:#ffb27d}
html[data-theme="dark"] .field>span,
html[data-theme="dark"] .check-label,
html[data-theme="dark"] .form-help,
html[data-theme="dark"] .detail-grid dt{color:#c9d8e2}
/* Statuses, buttons, and legends need coherent colors and states. */
html[data-theme="dark"] .btn.danger{background:#37242b;border-color:#80505a;color:#ffb8bf}
html[data-theme="dark"] .btn.danger:hover{background:#4d2a32;border-color:#ad6572;color:#ffe1e5}
html[data-theme="dark"] .btn.navy{background:#234866;border-color:#37617b;color:#f4f9ff}
html[data-theme="dark"] .btn.navy:hover{background:#305875;border-color:#527e99}
html[data-theme="dark"] .btn.ghost{background:transparent;border-color:transparent;color:#d6e4ed}
html[data-theme="dark"] .btn.ghost:hover{background:#223748}
html[data-theme="dark"] .badge.blue{background:#183c57;border-color:#285471;color:#b0dfff}
html[data-theme="dark"] .alert-band{background:#38301c;border-color:#69552b;color:#f5daa0}
html[data-theme="dark"] .alert-band p{color:#e8d3a3}
html[data-theme="dark"] .po-steps span{background:#213746;color:#d3e2ec}
html[data-theme="dark"] .po-steps span.current{background:#315a75;color:#fff}
/* Borders/tracks kept bright by the legacy light theme. */
html[data-theme="dark"] .kpi-foot,
html[data-theme="dark"] .form-footer{border-color:#2b4150}
html[data-theme="dark"] .stock-progress,
html[data-theme="dark"] .category-bar{background:#253b49}
html[data-theme="dark"] .round{border-color:#335548}
html[data-theme="dark"] .sequence-preview{background:#172f3f;border-color:#365569;color:#dceaf3}
html[data-theme="dark"] .sequence-form{background:#11232f;border-color:#344b5b}
html[data-theme="dark"] .login{background:#0a141d}
html[data-theme="dark"] .login-form .login-icon{background:#193447;border-color:#2d4d62;color:#c7e0f1}
html[data-theme="dark"] .login-form .foot{color:#b1c3cf}
html[data-theme="dark"] .reset-confirm-box{background:#35242d;border-color:#955561}
html[data-theme="dark"] .reset-confirm-title{color:#ffb4bd}
html[data-theme="dark"] .reset-confirm-title small{color:#eac4c9}
html[data-theme="dark"] .form-errors{background:#3d2229;border-color:#9d5964;color:#ffd0d5}
html[data-theme="dark"] .health.card{background:linear-gradient(145deg,#12354e,#163e58);border-color:#365974}
html[data-theme="dark"] .health .card-head{background:transparent;border-color:#34546c}
html[data-theme="dark"] .health h2{color:#f2f8fd}
html[data-theme="dark"] .health p{color:#c1d4e2}
/* Native form controls and text selections in Dark mode. */
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#a9bdcb;opacity:1}
html[data-theme="dark"] input:disabled,
html[data-theme="dark"] select:disabled,
html[data-theme="dark"] textarea:disabled{background:#192a36;color:#b5c6d1;opacity:1}
html[data-theme="dark"] option{background:#122634;color:#e6f0f6}
html[data-theme="dark"] input:focus-visible,
html[data-theme="dark"] select:focus-visible,
html[data-theme="dark"] textarea:focus-visible,
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] a:focus-visible{outline:2px solid #e8b900;outline-offset:3px}
/* ERP 2.1.3 — Dashboard dark theme contrast: high-specificity final screen overrides.
   Dashboard KPIs were inheriting the corporate Light palette in some deployed layouts. */
@media screen {
  html[data-theme="dark"] body .content .kpis .card.kpi{
    background:#142632;
    border-color:#344b5a;
    color:#eaf2f8;
  }
  html[data-theme="dark"] body .content .kpis .card.kpi .kpi-number,
  html[data-theme="dark"] body .content .kpis .card.kpi .kpi-number.currency{
    color:#f5f9fc !important;
    -webkit-text-fill-color:#f5f9fc;
    opacity:1;
  }
  html[data-theme="dark"] body .content .kpis .card.kpi .kpi-top,
  html[data-theme="dark"] body .content .kpis .card.kpi .kpi-foot{
    color:#bbcedb;
    opacity:1;
  }
  html[data-theme="dark"] body .content .kpis .card.kpi .kpi-foot{
    border-top:1px solid #385161;
  }
  html[data-theme="dark"] body .content .kpis .card.kpi .kpi-foot b{
    color:#8fe1bd;
  }
  html[data-theme="dark"] body .content .page-heading h1{
    color:#f5f9fc;
  }
  html[data-theme="dark"] body .content .timeline-item p{
    color:#c9dbe7;
  }
  html[data-theme="dark"] body .content .timeline-item .round{
    background:#183d35;
    color:#9fe4c9;
  }
  html[data-theme="dark"] body .content .category-bar span{
    background:#80c2e6;
  }
}

/* Print must never inherit the screen's dark paper or pale text. */
@media print{
  html[data-theme="dark"]{color-scheme:light;--ink:#172e43;--muted:#65788a;--bg:#fff;--line:#dfe6eb;--white:#fff}
  html[data-theme="dark"] body{background:#fff!important;color:#172e43!important}
  html[data-theme="dark"] .card,
  html[data-theme="dark"] .table-wrap,
  html[data-theme="dark"] table{background:#fff!important;color:#172e43!important;box-shadow:none}
  html[data-theme="dark"] td,
  html[data-theme="dark"] .product-cell strong,
  html[data-theme="dark"] .num,
  html[data-theme="dark"] .mono,
  html[data-theme="dark"] .kpi-number,
  html[data-theme="dark"] h1,
  html[data-theme="dark"] h2,
  html[data-theme="dark"] h3{color:#172e43!important}
  html[data-theme="dark"] th{background:#eef2f6!important;color:#33495b!important}
}


/* Filtro hierárquico de produtos GRINDTECH — Light e Dark */
.po-section-row td{background:#e3edf5!important;border-top:2px solid #bdd2e2;color:#092d4d!important;padding:10px 13px!important}.po-section-row strong{font-size:.81rem;letter-spacing:.2px}.po-section-row small{margin-left:12px;font-size:.72rem;color:#526e85}.po-family-hint{margin:0 18px 12px;font-size:.78rem;color:var(--muted)}.po-family-total td{background:#f3f7fa!important;font-size:.8rem;font-weight:700;color:var(--navy);padding:9px 13px!important}.po-family-total .family-total-amount{float:right}.po-product-filter #po-family{min-width:160px}html[data-theme=dark] .po-section-row td{background:#17364d!important;color:#eff8ff!important}html[data-theme=dark] .po-family-total td{background:#152a39!important;color:#eff8ff!important}
.po-company-preview{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:2px 0 14px;padding:13px 15px;border:1px solid #dbe5ec;border-left:4px solid var(--yellow);border-radius:10px;background:#f8fafc}.po-company-preview>div{display:grid;gap:2px}.po-company-preview span{font-size:.7rem;text-transform:uppercase;letter-spacing:.8px;font-weight:750;color:#708597}.po-company-preview strong{font-size:.9rem;color:var(--navy)}.po-company-preview small{line-height:1.45}.po-product-filter{display:grid!important;grid-template-columns:160px max-content 170px minmax(185px,1fr) minmax(220px,1.25fr) max-content;align-items:center}.po-product-filter .search{min-width:0}.po-product-filter #po-product{width:100%;max-width:none}.po-gt-chips{padding:10px 18px}.po-gt-chips .gt-clear-link{border:0;background:transparent;cursor:pointer}.po-stock-info{margin-top:6px;font-size:.72rem;color:var(--muted);white-space:nowrap}.po-stock-info .negative{color:var(--red)}html[data-theme=dark] .po-company-preview{background:#122430;border-color:#345064;border-left-color:var(--yellow)}html[data-theme=dark] .po-company-preview strong{color:#eef6fb}@media(max-width:1180px){.po-product-filter{grid-template-columns:1fr max-content 1fr}.po-product-filter .search{grid-column:1/3}.po-product-filter #po-product{grid-column:1/3}.po-product-filter #po-add{grid-column:3/4}}@media(max-width:760px){.po-company-preview{align-items:flex-start;flex-direction:column}.po-product-filter{grid-template-columns:1fr 1fr}.po-product-filter .search,.po-product-filter #po-product,.po-product-filter #po-family{grid-column:1/-1}.po-product-filter #po-add{grid-column:1/-1}.po-product-filter .gt-open-btn{width:100%}}
.gt-open-btn{gap:7px;min-height:42px}.gt-open-btn.gt-active{border-color:#3a83bf;background:#edf6ff;color:#174e78}.gt-count{border-radius:5px;background:#2472ac;color:white;padding:1px 6px;font-size:.72rem}.gt-chips{display:flex;flex-wrap:wrap;gap:9px;padding:12px 20px;border-bottom:1px solid var(--line)}.gt-chip{display:inline-flex;align-items:center;gap:3px;padding:6px 10px;border:1px solid #b5d4f0;background:#eaf3fd;color:#23567d;border-radius:7px;font-size:.79rem;font-weight:650}.gt-chip small{font-size:.75rem;color:inherit;font-weight:450}.gt-clear-link{align-self:center;margin-left:auto;font-size:.8rem;color:#2b759f;text-decoration:underline}.gt-section-row td{padding:12px 17px!important;background:#eaf1f8!important;color:#264764!important;text-transform:none;letter-spacing:.02em;font-weight:750;border-top:2px solid #c5d8e9!important}.gt-dialog{width:min(900px,calc(100vw - 24px));max-height:90dvh}.gt-dialog .dialog-head{gap:16px}.gt-dialog .dialog-head p{margin-top:3px}.gt-dialog form{display:block}.gt-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;padding:21px}.gt-group{min-width:0;border:1px solid var(--line);border-radius:11px;padding:14px;background:#f5f8fb}.gt-group legend{padding:0 5px}.gt-parent{display:flex;align-items:center;gap:9px;cursor:pointer}.gt-parent strong{font-weight:750}.gt-parent input,.gt-children input{accent-color:#2d7dcd;width:16px;height:16px;flex-shrink:0}.gt-children{display:grid;gap:13px;margin-top:12px}.gt-children label{display:flex;align-items:start;gap:10px;cursor:pointer;font-size:.88rem;line-height:1.4}.gt-group input:focus-visible{outline:2px solid #4c90d6;outline-offset:2px}.gt-dialog-note{font-size:.79rem;padding:0 22px 18px;line-height:1.6}.gt-dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;border-top:1px solid var(--line);padding:14px 21px;flex-wrap:wrap}.gt-dialog-actions #gt-clear-all{margin-right:auto}.gt-selected-summary{font-size:.78rem;color:var(--muted)}
html[data-theme=dark] .gt-open-btn.gt-active{background:#163b59;color:#bddcf5;border-color:#427eac}html[data-theme=dark] .gt-count{background:#2f79ba;color:#f3f8ff}html[data-theme=dark] .gt-chip{background:#1a3d58;color:#d5edff;border-color:#376487}html[data-theme=dark] .gt-clear-link{color:#99caf2}html[data-theme=dark] .gt-section-row td{background:#193245!important;color:#d8e8f5!important;border-color:#35546b!important}html[data-theme=dark] .gt-group{background:#142837;border-color:#345064;color:#e0ebf3}html[data-theme=dark] .gt-dialog-note{color:#b0c4d3}html[data-theme=dark] .gt-dialog-actions{border-color:#345064}
@media(max-width:760px){.gt-groups{grid-template-columns:1fr;gap:16px;padding:17px}.gt-dialog-actions{padding:13px 17px}.gt-open-btn{flex:1}.gt-selected-summary{display:none}.gt-clear-link{margin-left:0}}
/* Entrada e saída: resultados instantâneos, legíveis nos dois temas. */
.batch-search-wrap{position:relative;flex:1;min-width:235px}
.batch-search-wrap .search{width:100%;min-width:0}
.batch-suggestions{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:80;max-height:320px;overflow-y:auto;background:#fff;color:#20394d;border:1px solid #cad8e4;border-radius:10px;box-shadow:0 16px 38px #051d3040}
.batch-suggestions[hidden]{display:none!important}
.batch-suggestion{width:100%;border:0;border-bottom:1px solid #e7ecf0;background:#fff;color:#20394d;display:flex;align-items:center;justify-content:space-between;gap:15px;text-align:left;padding:11px 13px;font:inherit;cursor:pointer}
.batch-suggestion:hover,.batch-suggestion:focus-visible{background:#edf5fc;outline:2px solid #70a6d3;outline-offset:-2px}
.batch-suggestion:disabled{opacity:.72;cursor:not-allowed;background:#fff9f1}
.batch-suggestion-info{display:flex;flex-direction:column;min-width:0;gap:2px;font-size:.81rem}
.batch-suggestion-info strong{color:inherit;letter-spacing:.01em}
.batch-suggestion-info span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#50687c}
.batch-suggestion small{color:#486c7a;font-size:.75rem;white-space:normal;text-align:right;max-width:39%}
.batch-suggestion .batch-suggestion-negative{color:#a8501f}
.batch-suggestions-empty,.batch-suggestions-more{padding:11px 13px;font-size:.8rem;color:#536c7d;margin:0}
html[data-theme=dark] .batch-suggestions{background:#132838;color:#eaf2f8;border-color:#385569;box-shadow:0 17px 42px #0009}
html[data-theme=dark] .batch-suggestion{background:#132838;color:#eaf2f8;border-color:#28465a}
html[data-theme=dark] .batch-suggestion:hover,html[data-theme=dark] .batch-suggestion:focus-visible{background:#244458}
html[data-theme=dark] .batch-suggestion-info span,html[data-theme=dark] .batch-suggestion small,html[data-theme=dark] .batch-suggestions-empty,html[data-theme=dark] .batch-suggestions-more{color:#b5cfdf}
html[data-theme=dark] .batch-suggestion:disabled{background:#362b27}
html[data-theme=dark] .batch-suggestion .batch-suggestion-negative{color:#ffc19d}
/* O painel de apresentação do login permanece escuro mesmo no modo Light. */
.login-visual h1,html[data-theme=light] .login-visual h1,html[data-theme=dark] .login-visual h1{color:#fff!important}
.login-visual h1 span,html[data-theme=light] .login-visual h1 span,html[data-theme=dark] .login-visual h1 span{color:#ffd400!important}
@media(max-width:580px){.batch-suggestion{align-items:flex-start;flex-direction:column;gap:5px}.batch-suggestion small{text-align:left;max-width:100%}}

/* Account recovery, password visibility and supplier purchase terms. */
.password-control{display:flex;align-items:stretch;gap:0;width:100%;min-width:0}
.password-control input{flex:1;min-width:0;width:0;border-top-right-radius:0;border-bottom-right-radius:0}
.password-toggle{flex:0 0 auto;padding:8px 12px;border:1px solid var(--line);border-left:0;border-radius:0 7px 7px 0;background:var(--bg);color:var(--ink);font-size:.8125rem;font-weight:600}
.password-toggle:hover{filter:brightness(.96)}
.recovery-feedback{margin-top:16px}
#product-dialog{width:min(1120px,calc(100vw - 32px));max-width:1120px}
.product-supplier-section{min-width:0;margin:24px 0 0;padding:20px;border:1px solid var(--line);border-radius:10px;background:var(--bg)}
.product-supplier-section legend{padding:0 8px;font-weight:700;color:var(--ink)}
.product-supplier-section>.form-help{margin:0 0 16px}
@media(min-width:960px){#product-dialog>.dialog-body>form>.form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.product-supplier-section .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){#product-dialog{width:calc(100vw - 16px)}.product-supplier-section{padding:14px}.product-supplier-section .form-grid{grid-template-columns:1fr}}