:root{--navy:#222b6c;--navy2:#303b87;--blue:#4369ff;--bg:#f2f4f8;--card:#fff;--border:#e3e7ef;--text:#1f2937;--muted:#697386;--success:#159466;--warning:#d97706;--danger:#d83a45;--shadow:0 12px 28px rgba(23,32,79,.08);--radius:16px}*{box-sizing:border-box}html,body{margin:0;font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--text);background:var(--bg);font-size:14px}a{color:var(--blue);text-decoration:none}h1,h2,h3,p{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}.app{display:flex;min-height:100vh}.sidebar{width:252px;background:linear-gradient(180deg,#202766 0%,#293276 100%);color:#fff;position:fixed;left:0;top:0;bottom:0;display:flex;flex-direction:column;z-index:10}.sidebar-brand{height:72px;border-bottom:1px solid rgba(255,255,255,.13);display:flex;align-items:center;gap:12px;padding:14px 20px}.brand-mark{width:42px;height:42px;border-radius:13px;background:linear-gradient(135deg,#4e77ff,#19c8cc);display:inline-flex;justify-content:center;align-items:center;color:#fff;font-size:24px;font-weight:800;box-shadow:0 9px 24px rgba(55,118,255,.32)}.sidebar-brand b{font-size:17px;letter-spacing:.4px;display:block}.sidebar-brand small{color:#adb7df;font-weight:600;letter-spacing:1.2px;font-size:10px}.sidebar nav{padding:14px 9px;overflow:auto;flex:1}.sidebar nav a{display:flex;align-items:center;gap:12px;padding:11px 13px;margin:3px 0;border-radius:10px;color:#c8d1f6;font-weight:500;transition:.18s}.sidebar nav a i{font-style:normal;width:23px;text-align:center;font-size:18px;color:#dbe2ff}.sidebar nav a.active,.sidebar nav a:hover{background:rgba(255,255,255,.13);color:#fff}.sidebar-foot{padding:15px 20px;border-top:1px solid rgba(255,255,255,.13);display:flex;justify-content:space-between;align-items:center;color:#b9c3ec}.sidebar-foot a{color:#fff}.layout{margin-left:252px;min-width:0;flex:1}.topbar{height:60px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 25px;position:sticky;top:0;z-index:5}.page-title{font-size:20px;font-weight:700}.top-actions{display:flex;align-items:center;gap:14px;color:#25305f}.company{height:40px;border:1px solid #d6dcea;border-radius:7px;display:flex;align-items:center;padding:0 14px;font-size:13px;max-width:340px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.icon-alert{display:flex;align-items:center;gap:5px;color:#334074}.icon-alert b{height:20px;min-width:20px;padding:0 5px;background:#ed344b;color:#fff;display:inline-flex;justify-content:center;align-items:center;border-radius:99px;font-size:11px}.avatar{height:38px;width:38px;background:#e6eaf7;color:#26327a;display:flex;align-items:center;justify-content:center;border-radius:50%;font-weight:800}.content{padding:18px 20px 80px}.alert{padding:13px 16px;border-radius:10px;margin-bottom:16px;font-weight:500;border:1px solid transparent}.alert.success{background:#ecfdf5;color:#09744f;border-color:#bcebd8}.alert.warning{background:#fff7ed;color:#9a5700;border-color:#fed7aa}.alert.danger{background:#fff1f2;color:#bb2634;border-color:#fecdd3}.hero-dashboard{min-height:110px;background:linear-gradient(105deg,#26327a,#3b51ab);color:#fff;border-radius:var(--radius);padding:22px 27px;display:flex;justify-content:space-between;align-items:center;margin-bottom:17px;box-shadow:var(--shadow)}.hero-dashboard .eyebrow{font-size:11px;font-weight:700;letter-spacing:1.3px;color:#cad8ff;margin-bottom:9px}.hero-dashboard h1{font-size:25px;margin-bottom:6px}.hero-dashboard p:not(.eyebrow){color:#dce4ff}.btn{border:1px solid transparent;height:42px;border-radius:9px;padding:0 17px;display:inline-flex;align-items:center;justify-content:center;font-weight:600;gap:7px}.btn.primary{color:#fff;background:var(--blue);box-shadow:0 8px 20px rgba(67,105,255,.23)}.hero-dashboard .btn.primary{background:#fff;color:#273580;box-shadow:none}.btn.success{background:var(--success);color:#fff}.btn.ghost{border-color:#dbe1ed;background:#fff;color:#25327a;height:38px}.btn.full{width:100%;margin-top:18px}.stats{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:14px;margin-bottom:17px}.stats article{background:#fff;border:1px solid var(--border);border-radius:13px;padding:15px 17px;border-top:3px solid #30418d;box-shadow:0 2px 4px rgba(30,41,59,.02)}.stats article.danger{border-top-color:#e25460}.stats small{display:block;color:var(--muted);font-weight:600;margin-bottom:10px}.stats b{font-size:22px;color:#273580;display:block;margin-bottom:7px}.stats article.danger b{color:#d83a45}.stats span{font-size:12px;color:#8c94a6}.stats.mini article{padding:13px 16px}.stats.mini b{font-size:20px;margin:0}.grid{display:grid;gap:15px;margin-bottom:15px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.page-grid{display:grid;grid-template-columns:minmax(0,1fr) 348px;gap:15px;align-items:start}.panel{background:#fff;border:1px solid var(--border);border-radius:12px;padding:16px;box-shadow:0 2px 5px rgba(32,45,93,.03);margin-bottom:15px;overflow:hidden}.panel h2{font-size:16px;color:#273467;margin-bottom:15px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin:-2px 0 14px}.panel-head h2{margin:0}.panel-head span{font-size:12px;color:var(--muted);padding:5px 10px;border-radius:100px;background:#f4f6fb}table{width:100%;border-collapse:collapse;font-size:13px}thead th{background:#f6f7fa;color:#4a5265;font-size:12px;font-weight:700;text-align:left;border:1px solid var(--border);padding:10px 10px;white-space:nowrap}tbody td{padding:10px 10px;border:1px solid #e9ecf2;vertical-align:middle}tbody tr:hover{background:#f8faff}td small{display:block;color:#9098a9;font-size:11px;margin-top:3px}.table-scroll{overflow:auto}.badge{padding:4px 8px;border-radius:30px;display:inline-flex;font-size:11px;font-weight:700;white-space:nowrap}.badge.success{background:#e6f7f0;color:var(--success)}.badge.warning{background:#fff4e4;color:var(--warning)}.badge.danger{background:#ffebed;color:var(--danger)}.badge.neutral{background:#eef1f7;color:#536078}.timeline{display:flex;flex-direction:column;gap:10px}.note{border-left:3px solid #ccd6ef;background:#f8f9fd;padding:9px 11px;border-radius:0 8px 8px 0}.note.danger{border-color:#d83a45}.note.success{border-color:#159466}.note b{font-size:13px;color:#243069}.note p{font-size:12px;color:#687286;line-height:1.45;margin:5px 0}.note time{font-size:11px;color:#a1a8b5}.form{display:flex;flex-direction:column;gap:8px}.form label{font-size:12px;font-weight:650;color:#556077;margin-top:4px}.form input,.form select,.form textarea,.toolbar select,.complete-form input,.payment input,.horizontal input,.horizontal select{width:100%;border:1px solid #d8dfec;border-radius:8px;background:#fff;padding:0 11px;min-height:41px;color:#283142}.form textarea{min-height:70px;padding-top:10px}.form input:focus,.form select:focus,.form textarea:focus{outline:2px solid rgba(67,105,255,.18);border-color:#5677ff}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}.form .btn{margin-top:9px}.form-panel{position:sticky;top:77px}.form-panel.wide{position:static}.toolbar{display:flex;justify-content:flex-start;padding:14px 18px}.toolbar form{display:flex;align-items:center;gap:14px}.toolbar label{font-weight:650;color:#4d576d}.toolbar select{min-width:380px}.bom-help{padding:13px 15px;margin-top:17px;background:#eef3ff;color:#33447d;border-radius:9px;font-size:13px;line-height:1.5}.empty{padding:35px 12px;text-align:center;color:#798294;background:#f7f9fd;border-radius:9px}.requirement{margin-top:20px;padding:17px;border-radius:12px;background:#f7f9fd;border:1px solid #e4e9f4}.requirement h3{font-size:15px;color:#273580;margin-bottom:13px}.complete-form{display:flex;gap:9px;margin-top:13px;align-items:center}.complete-form input{max-width:160px}.inline{display:inline-flex;align-items:center;gap:6px;margin-left:7px}.text-btn{border:0;background:none;color:var(--blue);font-weight:650;padding:0}.payment input{width:115px;min-height:32px}.horizontal{display:grid;grid-template-columns:1.7fr 1.1fr .8fr .8fr .9fr auto;gap:7px;align-items:end}.horizontal .btn{margin:0}.report-banner{background:#fff;border:1px solid var(--border);border-radius:13px;padding:21px 23px;margin-bottom:16px;display:flex;align-items:center;gap:20px;justify-content:space-between}.report-banner h1{font-size:21px;color:#25327a;margin-bottom:5px}.report-banner p{color:var(--muted)}.report-banner div{display:flex;gap:8px}.num-negative{color:#d83a45;font-weight:700}.num-positive{color:#159466;font-weight:700}.info-list{display:flex;flex-direction:column;border:1px solid var(--border);border-radius:10px;margin-bottom:17px}.info-list div{display:flex;justify-content:space-between;padding:13px 14px;border-bottom:1px solid var(--border)}.info-list div:last-child{border:none}.info-list span{color:var(--muted)}hr{border:0;border-top:1px solid var(--border);margin:22px 0}.mobile-nav{display:none}.install-page,.login-page{min-height:100vh;display:grid;place-items:center;background:#f0f3f9}.install-card{background:#fff;border-radius:24px;width:min(460px,calc(100% - 32px));padding:36px;box-shadow:0 22px 70px rgba(28,38,92,.12);text-align:center}.install-card h1{font-size:24px;margin:18px 0 8px;color:#222d6d}.install-card p{color:var(--muted);margin-bottom:22px}.install-card .brand-mark{margin:auto;width:58px;height:58px;font-size:33px}.install-check{text-align:left;line-height:2.2;background:#f6f8fc;border-radius:12px;padding:14px 22px;margin:15px 0 10px;color:#4c586c}.install-card small{display:block;color:#8d96a5;margin-top:20px}.credential{text-align:left;background:#f4f7ff;border:1px dashed #bfd0ff;border-radius:10px;padding:12px 15px;line-height:1.7;color:#313d78}.login-wrap{width:min(1080px,calc(100% - 36px));height:min(650px,calc(100vh - 40px));background:#fff;border-radius:26px;overflow:hidden;box-shadow:0 30px 80px rgba(28,37,92,.13);display:grid;grid-template-columns:1.08fr .92fr}.login-visual{background:radial-gradient(circle at 85% 18%,rgba(72,121,255,.5),transparent 28%),linear-gradient(145deg,#1f296c 0%,#293b99 100%);padding:60px 52px;color:#fff;display:flex;flex-direction:column;justify-content:center}.visual-badge{display:inline-flex;align-self:flex-start;padding:7px 12px;border:1px solid rgba(255,255,255,.32);border-radius:30px;color:#e2e9ff;font-size:11px;font-weight:700;letter-spacing:1px;margin-bottom:26px}.login-visual h1{font-size:45px;line-height:1.12;letter-spacing:-1px;margin-bottom:17px}.login-visual h1 span{color:#68cfff}.login-visual p{color:#d4dfff;font-size:15px;line-height:1.7;max-width:480px}.visual-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:38px;max-width:400px}.visual-grid div{border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);padding:13px 15px;border-radius:11px;font-weight:600}.login-form{padding:50px 48px;display:flex;justify-content:center;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;margin-bottom:38px}.brand b{display:block;color:#212c6c;font-size:18px}.brand small{display:block;color:#778196;font-size:11px;max-width:270px;margin-top:3px}.login-form h2{font-size:27px;color:#1c2648;margin-bottom:25px}.login-form form{display:flex;flex-direction:column;gap:9px}.login-form label{font-size:12px;color:#536078;font-weight:650;margin-top:8px}.login-form input{height:48px;border:1px solid #dbe2ee;border-radius:10px;padding:0 14px}.login-note{font-size:12px;color:#737f92;text-align:center;margin-top:22px}
@media(max-width:1100px){.sidebar{width:78px}.sidebar-brand{padding:14px 18px}.sidebar-brand div:last-child,.sidebar nav span,.sidebar-foot{display:none}.sidebar nav a{justify-content:center;padding:13px}.sidebar nav a i{width:auto}.layout{margin-left:78px}.page-grid{grid-template-columns:1fr 320px}.stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){body{font-size:13px}.app{display:block}.sidebar{display:none}.layout{margin-left:0}.topbar{height:58px;padding:0 14px}.page-title{font-size:17px}.top-actions .company,.top-actions strong{display:none}.top-actions{gap:9px}.content{padding:12px 10px 76px}.hero-dashboard{padding:18px 16px;display:block}.hero-dashboard h1{font-size:21px}.hero-dashboard .btn{margin-top:16px;width:100%}.stats,.stats.mini{grid-template-columns:repeat(2,1fr);gap:9px}.stats article{padding:11px 12px}.stats b{font-size:17px}.grid.two,.page-grid{display:block}.form-panel{position:static}.panel{padding:12px;border-radius:11px}.panel table{min-width:650px}.table-panel{overflow:auto}.toolbar form{display:block;width:100%}.toolbar select{min-width:0;margin-top:8px}.horizontal{display:flex;flex-direction:column}.complete-form{display:flex;flex-wrap:wrap}.complete-form input{max-width:none;flex:1}.report-banner{display:block;padding:16px}.report-banner div{margin-top:15px;overflow:auto}.mobile-nav{position:fixed;display:flex;bottom:0;left:0;right:0;height:64px;background:#fff;border-top:1px solid #e3e8f1;z-index:30;justify-content:space-around;padding-bottom:env(safe-area-inset-bottom)}.mobile-nav a{display:flex;flex-direction:column;justify-content:center;align-items:center;color:#697386;gap:4px;flex:1}.mobile-nav i{font-style:normal;font-size:19px}.mobile-nav small{font-size:10px}.mobile-nav a.active{color:#304bdb;font-weight:700}.login-wrap{width:100%;height:100vh;border-radius:0;display:block}.login-visual{display:none}.login-form{min-height:100vh;padding:30px 23px}.install-card{padding:27px 20px}.payment input{width:95px}}
.brand-mark.logo{background:transparent!important;border-radius:0;box-shadow:none;overflow:visible;display:flex;align-items:center;justify-content:center}
.brand-mark.logo img{display:block;width:46px;height:46px;object-fit:contain}
.login-form .brand-mark.logo{width:66px;height:66px}.login-form .brand-mark.logo img{width:66px;height:66px}
.install-card .brand-mark.logo{width:84px;height:84px}.install-card .brand-mark.logo img{width:84px;height:84px}
.panel-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.search-form{display:flex;gap:7px;align-items:center}.search-form input{height:38px;border:1px solid #d8dfec;border-radius:8px;padding:0 11px;width:215px}
.import-banner>div:first-child{flex:1}.import-grid{align-items:stretch}.import-card{margin-bottom:0;display:flex;flex-direction:column}.import-card p{color:var(--muted);line-height:1.55;margin:-7px 0 14px}.import-icon{width:50px;height:50px;border-radius:14px;background:#eef3ff;display:grid;place-items:center;font-size:23px;margin-bottom:14px}.upload-form{margin-top:auto}.upload-form input[type=file]{padding:10px;height:auto}.check{display:flex!important;align-items:flex-start;gap:8px;line-height:1.45;margin:8px 0}.check input{width:16px!important;min-height:auto!important;height:16px;margin-top:2px}.structure{background:#f6f8fd;border:1px dashed #d6deef;border-radius:10px;padding:12px;margin-top:14px;font-size:12px;color:#58667b}.structure code{display:block;color:#273580;white-space:normal;line-height:1.65;margin-top:7px}
@media(max-width:760px){.panel-actions{display:block}.panel-actions>*{margin-top:7px}.search-form input{width:100%}.search-form{width:100%}.search-form .btn{flex-shrink:0}.import-banner div{display:block}.import-grid{display:block}}

.search-form select{height:38px;border:1px solid #d8dfec;border-radius:8px;background:#fff;padding:0 10px;color:#283142;min-width:150px}.pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--border);padding:14px 2px 0;margin-top:14px;color:var(--muted);font-size:12px}.page-buttons{display:flex;gap:5px}.page-buttons a{height:32px;min-width:32px;border:1px solid #d9e0ec;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;color:#384571;background:#fff}.page-buttons a.active{background:#26327a;color:#fff;border-color:#26327a}.pagination label{display:flex;align-items:center;gap:6px}.pagination select{height:32px;border:1px solid #d9e0ec;border-radius:7px;background:#fff;padding:0 6px}.warehouse-rules{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:0 0 16px}.warehouse-rules article{background:#fff;border:1px solid var(--border);border-radius:12px;padding:14px}.warehouse-rules b{display:block;color:#26327a;margin-bottom:7px}.warehouse-rules small{display:block;color:var(--muted);line-height:1.45}
@media(max-width:760px){.search-form{display:flex;flex-wrap:wrap}.search-form select{flex:1;min-width:145px}.pagination{flex-wrap:wrap;justify-content:center}.warehouse-rules{grid-template-columns:1fr 1fr}}

/* Dashboard biểu đồ doanh thu kết hợp sản xuất */
.performance-panel{margin-bottom:17px;padding:18px 20px 16px}.chart-head{align-items:flex-start;margin-bottom:14px}.chart-head h2{margin-bottom:5px}.chart-subtitle{font-size:12px;color:var(--muted);line-height:1.45}.period-switch{display:inline-flex;border:1px solid #dbe2ef;background:#f5f7fc;padding:3px;border-radius:9px;gap:3px;flex-shrink:0}.period-switch a{height:34px;min-width:58px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;color:#5c6880;font-weight:650}.period-switch a.active{background:#26327a;color:#fff;box-shadow:0 5px 12px rgba(38,50,122,.16)}.chart-kpis{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;margin-bottom:12px}.chart-kpis article{background:#f7f9fe;border:1px solid #e6ebf5;border-radius:10px;padding:11px 13px}.chart-kpis small{display:block;color:var(--muted);font-size:11px;margin-bottom:6px}.chart-kpis b{font-size:18px;color:#26327a;line-height:1.1}.chart-legend{display:flex;justify-content:flex-end;gap:18px;font-size:12px;color:#58667b;font-weight:600;margin:2px 4px 9px}.chart-legend span{display:inline-flex;align-items:center;gap:6px}.chart-legend span::before{content:"";display:block;width:18px;height:9px;border-radius:3px}.chart-legend .revenue::before{background:#4369ff}.chart-legend .orders::before{height:3px;background:#f08b28;border-radius:99px}.combo-chart-wrap{position:relative;height:330px;width:100%}.combo-chart-wrap canvas{display:block;width:100%;height:100%}.chart-empty-note{position:absolute;left:52px;right:36px;top:50%;transform:translateY(-50%);text-align:center;color:#7d8798;background:rgba(255,255,255,.86);padding:18px;border:1px dashed #d9e0ed;border-radius:10px}
@media(max-width:1100px){.chart-kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.performance-panel{padding:13px;margin-bottom:12px}.chart-head{display:block}.period-switch{margin-top:12px;width:100%}.period-switch a{flex:1}.chart-kpis{grid-template-columns:repeat(2,1fr);gap:8px}.chart-kpis article{padding:9px 10px}.chart-kpis b{font-size:15px}.chart-legend{justify-content:flex-start;gap:13px}.combo-chart-wrap{height:285px}.chart-empty-note{left:26px;right:12px}}

.chart-filters{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;justify-content:flex-end}.period-picker{display:flex;align-items:flex-end;gap:7px;flex-wrap:wrap;padding-left:10px;border-left:1px solid #e3e8f2}.period-picker label{display:flex;flex-direction:column;gap:4px;font-size:11px;font-weight:650;color:#69758a}.period-picker input,.period-picker select{height:38px;border:1px solid #d8e0ef;background:#fff;border-radius:8px;padding:0 10px;color:#253278;font-family:inherit;font-weight:600}.period-picker input[type=month]{min-width:150px}.period-picker .year-input{width:86px}.period-view-btn{height:38px;padding:0 13px;white-space:nowrap}
@media(max-width:900px){.chart-filters{width:100%;justify-content:flex-start;margin-top:12px}.period-picker{width:100%;padding-left:0;border-left:0}.period-picker label{flex:1}.period-picker input[type=month],.period-picker input,.period-picker select{width:100%}.period-picker .year-input{width:100%}.period-view-btn{width:100%}}

/* V1.0.8 - Phiếu nhập/xuất kho nghiệp vụ */
.voucher-header{display:flex;justify-content:space-between;align-items:center;gap:18px;background:linear-gradient(135deg,#26327a,#3447a8);color:#fff;border-radius:14px;padding:20px 24px;margin-bottom:14px}.voucher-header h1{font-size:24px;margin:4px 0 6px}.voucher-header p:not(.eyebrow){color:#dbe3ff}.voucher-header .badge{background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.25);color:#fff}.voucher-form{padding:0;overflow:hidden;margin-bottom:18px}.voucher-common{display:grid;grid-template-columns:1fr 250px;border-bottom:1px solid var(--border)}.voucher-left{padding:19px 22px}.voucher-doc{background:#f8f9fd;border-left:1px solid var(--border);padding:19px 17px}.voucher-common h3,.voucher-lines-head h3{font-size:14px;text-transform:uppercase;letter-spacing:.3px;color:#5a6478;margin-bottom:13px}.form-grid{display:grid;gap:11px}.form-grid.three{grid-template-columns:repeat(3,minmax(160px,1fr))}.form-grid label,.voucher-doc label{display:flex;flex-direction:column;gap:6px;color:#566177;font-size:12px;font-weight:650}.form-grid input,.form-grid select,.form-grid textarea,.voucher-doc input{border:1px solid #d8dfec;border-radius:7px;min-height:39px;padding:0 11px;font-family:inherit;background:#fff;color:#253046}.form-grid textarea{padding:10px;resize:vertical}.form-grid .full{grid-column:1/-1}.form-grid small{font-weight:400;color:#778196}.voucher-doc label{margin-bottom:12px}.voucher-lines-head{padding:17px 20px 10px;display:flex;justify-content:space-between;align-items:center}.voucher-entry-table{min-width:1150px}.voucher-entry-table td,.voucher-entry-table th{padding:8px 7px}.voucher-entry-table select,.voucher-entry-table input{height:37px;border:1px solid #d8dfec;border-radius:6px;background:#fff;padding:0 8px;font-family:inherit;width:100%}.voucher-entry-table td:nth-child(2){min-width:290px}.voucher-entry-table td:nth-child(3){min-width:145px}.voucher-entry-table td:nth-child(4){min-width:145px}.voucher-entry-table td:nth-child(6),.voucher-entry-table td:nth-child(7){width:105px}.voucher-entry-table td:nth-child(8){white-space:nowrap;font-weight:700;color:#253278}.line-remove{height:34px;width:34px;background:#fff1f2;border:1px solid #fecdd3;color:#e11d48;border-radius:7px;font-size:19px;cursor:pointer}.voucher-entry-table tfoot th{background:#f5f7fc;font-weight:700;color:#26327a}.voucher-entry-table tfoot th:nth-child(2){text-align:right}.voucher-actions{padding:15px 20px 19px;display:flex;align-items:center;gap:15px;border-top:1px solid var(--border)}.voucher-actions span{font-size:12px;color:var(--muted)}.voucher-list{margin-top:18px}.voucher-topbar{display:flex;gap:8px;justify-content:flex-end;margin-bottom:12px}.voucher-view{padding:24px}.voucher-view-head{display:flex;justify-content:space-between;border-bottom:2px solid #26327a;padding-bottom:17px;margin-bottom:18px}.voucher-view-head h1{font-size:27px;color:#26327a;margin:4px 0 10px}.voucher-dates{display:grid;gap:5px;text-align:right}.voucher-dates small{color:var(--muted)}.voucher-dates b{margin-bottom:6px}.voucher-info-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;background:#f7f9fd;border:1px solid #e6ebf5;border-radius:11px;padding:15px;margin-bottom:17px}.voucher-info-grid span{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}.voucher-info-grid b{display:block}.voucher-info-grid .span-two{grid-column:span 2}.voucher-table .num{text-align:right}.voucher-table tfoot th{background:#f5f7fc;color:#26327a;text-align:right}
@media(max-width:900px){.voucher-common{display:block}.voucher-doc{border-left:0;border-top:1px solid var(--border)}.form-grid.three{grid-template-columns:1fr 1fr}.voucher-view-head{display:block}.voucher-dates{text-align:left;margin-top:14px}.voucher-info-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.voucher-header{display:block;padding:16px}.voucher-header h1{font-size:20px}.voucher-header .badge{display:inline-flex;margin-top:13px}.form-grid.three{grid-template-columns:1fr}.voucher-left{padding:15px 12px}.voucher-doc{padding:15px 12px}.voucher-lines-head{padding:14px 12px 9px}.voucher-actions{padding:13px 12px;display:block}.voucher-actions .btn{width:100%;margin-bottom:9px}.voucher-view{padding:14px}.voucher-info-grid{grid-template-columns:1fr}.voucher-info-grid .span-two{grid-column:auto}}
@media print{.sidebar,.topbar,.mobile-nav,.no-print,.voucher-topbar{display:none!important}.layout{margin:0!important}.content{padding:0!important}.voucher-view{border:0!important;box-shadow:none!important;padding:0!important}.voucher-view table{font-size:11px!important}.voucher-view-head{margin-top:0}}
.form-note{font-size:12px;color:var(--muted);line-height:1.5;margin:-6px 0 12px}.form-note a{color:#304bdb;font-weight:700}

/* V1.0.9 - báo cáo khách hàng & công nợ theo file import */
.wide-table{min-width:1480px}
.debt-filter{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.debt-filter select{min-width:210px}
td.num,th.num{text-align:right;white-space:nowrap}
.table-scroll tfoot th{background:#f1f3f9;border-top:2px solid #d7dbe8;font-weight:700;white-space:nowrap}
@media(max-width:768px){.debt-filter{width:100%}.debt-filter select,.debt-filter input{width:100%}.wide-table{min-width:1350px}}
/* v1.1.0 - Trung tâm báo cáo công nợ */
.debt-head{display:flex;align-items:center;justify-content:center;position:relative;background:#fff;border:1px solid var(--border);border-radius:12px 12px 0 0;padding:19px 20px 17px;margin-bottom:0}.debt-head h1{font-size:22px;color:#25327a;font-weight:500;letter-spacing:.2px}.debt-head-actions{position:absolute;right:18px;display:flex;gap:8px}.debt-selector{background:#fff;border:1px solid var(--border);border-top:0;margin:0 0 12px;border-radius:0 0 12px 12px;padding:0 18px 15px}.debt-selector summary{cursor:pointer;display:inline-flex;background:#27347b;color:#fff;padding:12px 24px;margin-left:-18px;margin-bottom:10px;font-weight:700;list-style:none}.debt-selector summary::-webkit-details-marker{display:none}.debt-select-form{display:flex;gap:10px;align-items:end;flex-wrap:wrap;padding-top:2px}.debt-select-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#596376;font-weight:650}.debt-select-form label b{color:#de3446}.debt-select-form select,.debt-select-form input{height:41px;border:1px solid #d3dbe9;border-radius:6px;background:#fff;padding:0 10px;font-family:inherit;min-width:176px}.debt-select-form label:first-child select{min-width:330px}.debt-select-form .btn{height:41px}.debt-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border:1px solid var(--border);border-radius:10px;padding:10px 14px;margin-bottom:12px;color:#576177}.debt-toolbar .search-form{display:flex;gap:8px}.debt-toolbar input{height:39px;min-width:260px}.debt-table{padding:0;overflow:hidden;margin-bottom:15px}.debt-table table{font-size:13px}.debt-table table th{text-align:center;white-space:nowrap}.debt-table .num{text-align:right;white-space:nowrap}.debt-table tfoot th{background:#e9edf5;color:#27347b;font-weight:700}.debt-reminder{margin-top:17px}.debt-reminder .page-grid{grid-template-columns:1fr 325px;margin:0}.debt-reminder .debt-add{padding:15px;position:static;border-left:1px solid var(--border);border-radius:0;box-shadow:none}.empty-report{padding:65px 24px;text-align:center;margin-bottom:16px}.empty-report h2{color:#25327a;margin-bottom:10px}.empty-report p{max-width:700px;margin:auto;color:var(--muted);line-height:1.7}.alert.info{background:#eef5ff;border:1px solid #c8dbff;color:#334c86}
@media(max-width:900px){.debt-head{justify-content:flex-start;display:block}.debt-head h1{font-size:18px}.debt-head-actions{position:static;margin-top:13px}.debt-select-form{display:block}.debt-select-form label{margin-bottom:10px}.debt-select-form select,.debt-select-form input,.debt-select-form label:first-child select{width:100%;min-width:0}.debt-select-form .btn{width:100%;margin-top:4px}.debt-toolbar{display:block}.debt-toolbar .search-form{margin-top:10px}.debt-toolbar input{min-width:0;width:100%}.debt-reminder .page-grid{display:block}.debt-reminder .debt-add{border:0;border-top:1px solid var(--border)}}

/* V1.1.1 - Phiếu thu nợ / phiếu chi tiền */
.cash-header{margin-bottom:12px}.cash-form{padding:0;overflow:hidden;margin-bottom:16px}.cash-purpose{display:flex;align-items:center;gap:24px;padding:15px 20px;border-bottom:1px solid var(--border);font-size:14px}.cash-purpose label{display:flex;align-items:center;gap:6px}.cash-purpose input{accent-color:#29367f}.voucher-doc .check{display:flex;flex-direction:row;align-items:center;gap:7px;margin:14px 0}.voucher-doc .check input{min-height:auto;width:auto}.voucher-doc select{height:39px;border:1px solid #d8dfec;border-radius:7px;background:#fff;padding:0 10px;width:100%}.cash-debt-pick{border-top:1px solid var(--border);padding:16px 20px}.cash-debt-pick .panel-head{padding:0 0 12px;margin:0;border:0}.cash-debt-pick h3{font-size:14px;text-transform:uppercase;color:#5a6478}.cash-debt-pick small{display:block;color:var(--muted);max-width:720px;margin-top:5px;line-height:1.5}.cash-partner-filter select{height:39px;min-width:260px;border:1px solid #d8dfec;border-radius:7px;padding:0 10px;background:#fff}.cash-debt-table{min-width:1040px}.cash-debt-table td small{display:block;color:var(--muted);font-size:11px}.cash-debt-table input[type=number]{height:36px;width:135px;border:1px solid #d8dfec;border-radius:6px;text-align:right;padding:0 8px}.cash-debt-table input[type=checkbox]{width:17px;height:17px;accent-color:#29367f}.cash-debt-table tfoot th{background:#f1f3f9;text-align:right}.cash-entry-table{min-width:700px}.cash-entry-table input{height:39px;border:1px solid #d8dfec;border-radius:6px;width:100%;padding:0 10px}.cash-entry-table td:nth-child(2){width:215px}.cash-entry-table td:nth-child(3){width:230px}.cash-entry-table td:last-child{width:48px}.cash-entry-table tfoot th{background:#f1f3f9;text-align:right}.cash-doc-title{font-size:14px;text-transform:uppercase;color:#5a6478;margin:22px 0 10px}.cash-view .voucher-table{margin-bottom:8px}.cash-view .voucher-info-grid{grid-template-columns:repeat(4,1fr)}
@media(max-width:900px){.cash-purpose{flex-wrap:wrap;gap:12px}.cash-debt-pick{padding:14px 12px}.cash-debt-pick .panel-head{display:block}.cash-partner-filter select{width:100%;min-width:0;margin-top:12px}.cash-view .voucher-info-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.cash-purpose{display:block}.cash-purpose b,.cash-purpose label{margin-bottom:11px}.cash-view .voucher-info-grid{grid-template-columns:1fr}}


/* V1.1.2 - BOM theo màu/size, thêm bớt định mức linh hoạt */
.bom-top{padding:15px 18px;margin-bottom:14px}.bom-product-select{display:flex;align-items:center;gap:14px;margin-bottom:13px}.bom-product-select label{font-size:13px;font-weight:700;color:#4d576d;white-space:nowrap}.bom-product-select select{height:43px;flex:1;min-width:0;border:1px solid #d8dfec;border-radius:8px;background:#fff;padding:0 11px;color:#283142}.bom-variant-summary{display:grid;grid-template-columns:2.2fr repeat(4,1fr);gap:8px;padding:10px;background:#f6f8fd;border:1px solid #e6ebf5;border-radius:10px}.bom-variant-summary div{padding:4px 9px;border-right:1px solid #e3e8f2}.bom-variant-summary div:last-child{border:0}.bom-variant-summary small{display:block;color:#7a8495;font-size:11px;margin-bottom:5px}.bom-variant-summary b{display:block;color:#26327a;font-size:15px}.bom-variant-summary span{font-size:11px;color:#7b8496}.bom-layout{display:grid;grid-template-columns:minmax(0,1fr) 392px;gap:15px;align-items:start}.bom-table-panel{padding:16px}.bom-table-head p{font-size:12px;color:var(--muted);line-height:1.45;margin-top:5px}.bom-edit-table{min-width:900px}.bom-edit-table input,.bom-edit-table select{height:36px;border:1px solid #d8dfec;border-radius:6px;padding:0 7px;background:#fff;color:#283142;width:100%}.bom-edit-table td:nth-child(1){min-width:230px}.bom-edit-table td:nth-child(3),.bom-edit-table td:nth-child(4){width:104px}.bom-edit-table td:nth-child(5){width:120px;font-weight:700;color:#29367f}.bom-edit-table td:nth-child(6){min-width:150px}.bom-actions{display:flex;gap:5px;white-space:nowrap}.bom-actions form{margin:0}.btn.tiny{height:34px;border-radius:6px;padding:0 10px;font-size:12px}.btn.danger{background:#fff1f2;border-color:#fecdd3;color:#d83a45}.bom-copy{border-top:1px solid var(--border);margin:15px -16px -16px;padding:0 16px}.bom-copy summary{color:#304bdb;cursor:pointer;font-weight:650;padding:14px 0}.bom-copy form{display:grid;grid-template-columns:minmax(220px,1fr) auto auto;gap:9px;align-items:center;padding:0 0 14px}.bom-copy select{height:39px;border:1px solid #d8dfec;border-radius:7px;padding:0 9px}.bom-copy .check{font-size:12px;color:#5d677b;display:flex;align-items:center;gap:5px;white-space:nowrap}.bom-builder{position:sticky;top:77px;padding:14px}.bom-builder .panel-head{margin-bottom:11px}.bom-builder .panel-head h2{margin:0 0 5px}.bom-builder .panel-head p{font-size:12px;color:var(--muted)}.bom-draft-lines{display:flex;flex-direction:column;gap:9px}.bom-draft-row{border:1px solid #e2e8f2;background:#f9faff;border-radius:10px;padding:10px;display:flex;flex-direction:column;gap:7px}.bom-draft-row label{font-size:11px;color:#536078;font-weight:700;display:flex;flex-direction:column;gap:4px}.bom-draft-row input,.bom-draft-row select{width:100%;height:36px;border:1px solid #d8dfec;background:#fff;border-radius:7px;padding:0 8px;color:#283142}.bom-inline-fields{display:grid;grid-template-columns:1fr 1fr;gap:7px}.bom-remove-row{align-self:flex-end;background:none;border:0;color:#d83a45;font-size:12px;font-weight:650;padding:2px 0}.bom-add-row{width:100%;height:38px;margin-top:10px;border:1px dashed #8fa8ff;background:#f5f8ff;color:#304bdb}.bom-builder .btn.full{margin-top:10px}
@media(max-width:1180px){.bom-layout{grid-template-columns:minmax(0,1fr) 350px}.bom-variant-summary{grid-template-columns:repeat(5,1fr)}.bom-variant-summary div:first-child{grid-column:1/-1;border-right:0;border-bottom:1px solid #e3e8f2;padding-bottom:10px}}
@media(max-width:900px){.bom-product-select{display:block}.bom-product-select select{margin-top:7px;width:100%}.bom-layout{display:block}.bom-builder{position:static}.bom-variant-summary{grid-template-columns:repeat(2,1fr)}.bom-variant-summary div{border:0;border-bottom:1px solid #e3e8f2}.bom-variant-summary div:first-child{grid-column:1/-1}.bom-copy form{display:block}.bom-copy select{width:100%;margin-bottom:10px}.bom-copy .check{margin-bottom:10px}}
/* V1.1.3 - BOM lập theo mã hàng + màu và ma trận size */
.bom-family-head{padding:17px 18px;margin-bottom:14px}.bom-family-head .panel-head{margin-bottom:13px}.bom-family-head .panel-head p{font-size:13px;color:var(--muted);margin-top:5px}.bom-fast-search{display:grid;grid-template-columns:190px minmax(220px,1fr) 126px;align-items:center;gap:10px;margin-bottom:14px}.bom-fast-search label{font-size:13px;font-weight:700;color:#4d576d}.bom-fast-search input{height:43px;border:1px solid #d8dfec;border-radius:8px;padding:0 12px;background:#fff}.bom-model-results{display:none}.bom-model-card{display:flex;flex-direction:column;gap:5px;border:1px solid #e2e8f2;border-radius:10px;padding:11px 13px;background:#fafbfe;text-decoration:none;color:#27357e}.bom-model-card small{color:#69758a;font-size:11px}.bom-model-card:hover,.bom-model-card.active{border-color:#4369ff;background:#eef3ff}.bom-context{padding:15px 18px;margin-bottom:14px}.bom-color-form{display:flex;gap:25px;justify-content:space-between;align-items:end;margin-bottom:13px}.bom-color-form small{display:block;font-size:11px;color:#738096;margin-bottom:5px}.bom-color-form h2{color:#23317a;margin:0;font-size:20px}.bom-color-form label{font-size:12px;font-weight:700;color:#536078;min-width:270px}.bom-color-form select{display:block;width:100%;height:41px;border:1px solid #d8dfec;border-radius:8px;background:#fff;margin-top:5px;padding:0 10px}.bom-size-overview{display:flex;gap:7px;flex-wrap:wrap}.bom-size-overview span{min-width:72px;border-radius:8px;padding:8px 10px;display:flex;flex-direction:column;gap:3px;border:1px solid #e1e7f2}.bom-size-overview span b{font-size:13px;color:#28357b}.bom-size-overview span em{font-style:normal;font-size:11px}.bom-size-overview .ready{background:#ecf8f2;border-color:#b8ebd3}.bom-size-overview .ready em{color:#159466}.bom-size-overview .missing{background:#fff7ed;border-color:#fed7aa}.bom-size-overview .missing em{color:#c66a0b}.bom-matrix-panel{padding:17px 18px;margin-bottom:15px}.bom-matrix-panel .panel-head p{font-size:12px;color:var(--muted);line-height:1.5;margin-top:5px}.bom-select-sizes{display:flex;gap:12px;flex-wrap:wrap;align-items:center;background:#f7f9fd;border:1px solid #e8ecf4;border-radius:9px;padding:10px 13px;margin:13px 0}.bom-select-sizes label{font-size:13px;color:#3e4860;display:flex;align-items:center;gap:5px}.bom-select-sizes input{accent-color:#4369ff}.bom-matrix{min-width:max-content;border-collapse:separate;border-spacing:0}.bom-matrix th,.bom-matrix td{vertical-align:top;border-right:1px solid #ebeff5}.bom-matrix th{min-width:216px;text-align:center}.bom-matrix th small{display:block;font-size:10px;color:#8b95a6;margin-top:3px}.bom-matrix .material-col{position:sticky;left:0;z-index:2;background:#f7f9fd;min-width:180px;max-width:180px}.bom-matrix td.material-col{background:#fff;z-index:1;padding-top:18px}.bom-matrix .material-col small{display:block;margin-top:6px;font-size:11px;color:#768297;line-height:1.45}.bom-matrix td:not(.material-col){padding:8px;min-width:216px}.bom-matrix select,.bom-matrix input{width:100%;height:34px;border:1px solid #d8dfec;border-radius:6px;padding:0 6px;background:#fff;font-size:12px}.bom-cell-fields{display:grid;grid-template-columns:1fr 70px;gap:5px;margin:5px 0}.bom-matrix td:last-child{min-width:68px;padding-top:14px}.bom-matrix-actions{display:flex;justify-content:flex-end;gap:9px;border-top:1px solid #e8edf5;margin-top:12px;padding-top:13px}.bom-saved-panel{padding:17px 18px}.bom-saved-panel .panel-head p{font-size:12px;color:var(--muted);margin-top:5px}.bom-variant-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.bom-size-card{border:1px solid #e4e9f3;border-radius:10px;background:#fff;overflow:hidden}.bom-size-card summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:#fafbfe}.bom-size-card summary::-webkit-details-marker{display:none}.bom-size-card summary b{display:block;color:#26327a;font-size:14px}.bom-size-card summary small{font-size:11px;color:#778196}.bom-size-card summary span{font-size:11px;font-weight:700;border-radius:20px;padding:5px 9px}.bom-size-card summary span.success{background:#e6f7f0;color:#159466}.bom-size-card summary span.warning{background:#fff3e3;color:#c7700e}.bom-size-card[open]{grid-column:1/-1}.bom-size-card[open] summary{border-bottom:1px solid #e8edf5}.bom-size-card .bom-edit-table{min-width:900px;margin:0}.empty.compact{padding:18px}
@media(max-width:900px){.bom-fast-search{grid-template-columns:1fr}.bom-model-results{grid-template-columns:1fr}.bom-color-form{display:block}.bom-color-form label{margin-top:13px;display:block;min-width:0}.bom-matrix-panel,.bom-saved-panel,.bom-family-head,.bom-context{padding:13px}.bom-matrix .material-col{min-width:140px;max-width:140px}.bom-matrix th,.bom-matrix td:not(.material-col){min-width:205px}.bom-matrix-actions{display:grid;grid-template-columns:1fr}.bom-matrix-actions .btn{width:100%}}
.bom-matrix .disabled-col{opacity:.38;background:#f4f6fa}.bom-matrix td.disabled-col{pointer-events:none}

/* V1.1.4 - BOM gọn: ẩn cards gợi ý và chia size theo lưới */
.bom-search-note{padding:11px 13px;border-radius:9px;border:1px dashed #dce4f2;background:#f8faff;color:#66758e;font-size:13px}
.bom-size-card summary{min-height:64px;padding:11px 10px;gap:7px}
.bom-size-card summary b{font-size:13px}.bom-size-card summary small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:122px}
.bom-size-card summary span{padding:4px 7px;font-size:10px;white-space:nowrap}
@media(max-width:1300px){.bom-variant-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:900px){.bom-variant-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bom-size-card[open]{grid-column:1/-1}}
@media(max-width:520px){.bom-variant-grid{grid-template-columns:1fr}}
/* V1.1.5 - Chỉnh sửa công thức BOM đã lưu */
.bom-card-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.bom-edit-link{display:inline-flex;align-items:center;height:27px;border:1px solid #cdd9ff;background:#eef3ff;color:#2f50d8;border-radius:16px;padding:0 9px;font-size:11px;font-weight:700;text-decoration:none}
.bom-edit-link:hover{background:#dde7ff}
.bom-edit-note{padding:10px 13px;background:#eef4ff;border-bottom:1px solid #dbe6ff;color:#46546d;font-size:12px}
.bom-edit-table td:first-child{min-width:310px}.bom-edit-table td:first-child select{height:37px;min-width:300px}
.bom-actions .btn{white-space:nowrap}
.bom-add-saved-line{border-top:1px solid #e8edf5;background:#fbfcff;padding:0 13px 13px}
.bom-add-saved-line summary{display:block!important;background:none!important;border:0!important;color:#304bdb;font-size:12px;font-weight:700;padding:12px 0 7px!important;min-height:0!important}
.bom-add-line-form{display:grid;grid-template-columns:minmax(260px,2.1fr) 100px 95px minmax(150px,1fr) auto;gap:8px;align-items:end;padding:8px;border:1px dashed #d5e0fb;border-radius:9px;background:#fff}
.bom-add-line-form label{font-size:11px;color:#536078;font-weight:700;display:flex;flex-direction:column;gap:4px}
.bom-add-line-form input,.bom-add-line-form select{height:36px;border:1px solid #d8dfec;border-radius:7px;background:#fff;padding:0 8px;color:#283142;width:100%}
@media(max-width:900px){.bom-card-meta{gap:5px}.bom-add-line-form{grid-template-columns:1fr 1fr}.bom-add-line-form label:first-of-type,.bom-add-line-form label:nth-of-type(4),.bom-add-line-form .btn{grid-column:1/-1}.bom-edit-table td:first-child{min-width:260px}}

/* V1.1.6 - Form lệnh sản xuất theo mã hàng, nhiều màu/size */
.production-builder{padding:18px;margin-bottom:15px}.production-builder .panel-head p{margin-top:5px;color:var(--muted);font-size:13px}.production-fast-search{display:grid;grid-template-columns:180px minmax(300px,1fr) 150px;gap:10px;align-items:center;border:1px solid #e8edf5;background:#f8faff;border-radius:11px;padding:12px;margin-top:14px}.production-fast-search label{font-size:13px;font-weight:700;color:#536078}.production-fast-search input{height:42px;border:1px solid #d4ddec;background:#fff;border-radius:8px;padding:0 12px}.production-order-form{margin-top:16px;border:1px solid #e5eaf4;border-radius:12px;overflow:hidden;background:#fff}.production-model-head{padding:14px 16px;background:#f7f9fe;border-bottom:1px solid #e8edf5;display:flex;justify-content:space-between;align-items:center;gap:15px}.production-model-head small{display:block;color:#718097;font-size:11px;font-weight:700}.production-model-head h3{color:#24327a;margin:4px 0;font-size:19px}.production-model-head p{font-size:12px;color:#647187}.production-select-actions{display:flex;gap:8px}.production-info-grid{display:grid;grid-template-columns:repeat(3,minmax(190px,1fr));gap:11px;padding:15px 16px;border-bottom:1px solid #e8edf5}.production-info-grid label{font-size:12px;color:#536078;font-weight:700;display:flex;flex-direction:column;gap:5px}.production-info-grid select,.production-info-grid input,.production-info-grid textarea{width:100%;border:1px solid #d7dfed;border-radius:8px;background:#fff;padding:0 10px;color:#273142}.production-info-grid input,.production-info-grid select{height:40px}.production-info-grid textarea{padding:10px;resize:vertical}.production-info-grid .span-two{grid-column:span 2}.search-select input{margin:0}.production-colors{padding:14px 16px;display:flex;flex-direction:column;gap:12px}.production-color-block{border:1px solid #e5eaf4;border-radius:10px;overflow:hidden}.production-color-head{padding:10px 13px;background:#f8faff;border-bottom:1px solid #edf1f7;display:flex;justify-content:space-between;align-items:center}.production-color-head b{color:#26347b;font-size:14px}.production-color-head small{color:#718097;margin-left:8px}.production-color-head div:last-child{display:flex;gap:13px}.production-variant-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;padding:10px}.production-variant-card{border:1px solid #e2e8f3;border-radius:9px;background:#fff;padding:9px;display:flex;flex-direction:column;gap:8px;transition:.15s}.production-variant-card.selected{border-color:#4369ff;background:#f4f7ff}.variant-ident{display:flex;align-items:flex-start;gap:7px}.variant-ident input{margin-top:4px;accent-color:#4369ff}.variant-ident b{display:block;font-size:13px;color:#27357c}.variant-ident small{font-size:10px;color:#738095}.variant-ident span{margin-left:auto;padding:3px 6px;border-radius:12px;white-space:nowrap;font-size:10px;font-weight:700}.variant-ident span.ready{background:#e7f7f1;color:#13885d}.variant-ident span.missing{background:#fff2e2;color:#bf6c0e}.variant-qty small{display:block;font-size:10px;color:#738095;margin-bottom:4px}.variant-qty input{height:34px;width:100%;border:1px solid #d8dfec;border-radius:7px;padding:0 7px;background:#fff}.variant-qty input:disabled{background:#f1f3f7;color:#9aa4b5}.production-submit{padding:14px 16px;background:#f8faff;border-top:1px solid #e8edf5;display:flex;justify-content:space-between;align-items:center;gap:12px}.production-submit b{color:#25337b;font-size:14px}.production-submit small{display:block;color:#738095;margin-top:4px}.production-page-grid{grid-template-columns:minmax(0,1fr) 270px;margin-top:15px}.production-guide{padding:16px;height:max-content}.production-guide h2{margin-bottom:13px}.guide-step{display:flex;gap:9px;align-items:center;margin:9px 0;color:#536078;font-size:13px}.guide-step b{height:25px;width:25px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#eef3ff;color:#3150db}.production-detail{margin-top:16px}.production-detail .panel-head p{font-size:12px;color:#718097;margin-top:4px}.material-title{margin:18px 0 10px}.production-complete-grid{border-top:1px solid #e8edf5;margin-top:15px;padding-top:15px}.production-complete-grid h3{margin-bottom:10px}.complete-variants{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:9px;margin-bottom:13px}.complete-card{border:1px solid #e3e9f3;background:#fafbfe;border-radius:9px;padding:9px;display:grid;grid-template-columns:1fr 1fr;gap:6px}.complete-card>b,.complete-card>small{grid-column:1/-1}.complete-card>b{color:#26347c}.complete-card>small{color:#728096;font-size:11px}.complete-card label{font-size:10px;font-weight:700;color:#63718a}.complete-card input{width:100%;height:33px;margin-top:4px;border:1px solid #d8dfec;border-radius:6px;padding:0 6px;background:#fff}.muted{color:var(--muted);font-size:12px;line-height:1.55;margin-top:16px}
@media(max-width:1350px){.production-variant-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.complete-variants{grid-template-columns:repeat(3,minmax(170px,1fr))}}
@media(max-width:1000px){.production-fast-search{grid-template-columns:1fr}.production-info-grid{grid-template-columns:1fr 1fr}.production-page-grid{display:block}.production-guide{margin-top:14px}.production-variant-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.complete-variants{grid-template-columns:repeat(2,minmax(160px,1fr))}}
@media(max-width:680px){.production-model-head,.production-submit{display:block}.production-select-actions{margin-top:10px}.production-info-grid{grid-template-columns:1fr}.production-info-grid .span-two{grid-column:auto}.production-color-head{align-items:flex-start}.production-variant-grid{grid-template-columns:repeat(2,minmax(0,1fr));padding:8px}.complete-variants{grid-template-columns:1fr}.production-submit .btn{width:100%;margin-top:12px}}

/* V1.1.7 - Thao tác sửa/xóa lệnh sản xuất */
.row-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;white-space:nowrap}.row-actions .inline{margin:0}.danger-text{color:#e34757!important}.danger-text:hover{color:#c5283d!important}.production-builder .panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}


/* V1.1.8 - Đơn gia công/OEM theo mã hàng nhiều màu/size */
.oem-builder{margin-bottom:15px}.oem-info-grid{grid-template-columns:repeat(3,minmax(180px,1fr))}.oem-builder .empty{margin-top:14px}.oem-builder strong{color:#24327a}.oem-builder .search-select input{height:40px;width:100%;border:1px solid #d7dfed;border-radius:8px;padding:0 10px;background:#fff}
@media(max-width:1000px){.oem-info-grid{grid-template-columns:1fr 1fr}}
@media(max-width:680px){.oem-info-grid{grid-template-columns:1fr}}

/* V1.1.9 - Danh mục khách hàng: bộ lọc, danh mục và địa chỉ hành chính */
.customer-filter-form{display:flex;gap:7px;flex-wrap:wrap;align-items:center}
.customer-filter-form input{min-width:235px}
.customer-filter-form select{height:40px;min-width:136px;border:1px solid #d7dfed;border-radius:8px;background:#fff;padding:0 9px;color:#263142}
.customer-form-panel select{height:40px;width:100%;border:1px solid #d7dfed;border-radius:8px;background:#fff;padding:0 9px;color:#263142}
.customer-form-panel label small{font-weight:500;color:#8290a6}
.customer-form-panel .form-note{font-size:11px;line-height:1.45;color:#65738b;background:#f7f9fe;border:1px solid #e5eaf4;border-radius:8px;padding:8px 10px;margin:-3px 0 8px}
@media(max-width:680px){.customer-filter-form input,.customer-filter-form select{min-width:100%;width:100%}.customer-filter-form .btn{width:100%}}

/* V1.2.0 - Form hàng hóa theo mã hàng, nhiều màu/size và kho */
.product-create-panel{margin-bottom:15px;padding:18px}.product-create-head{align-items:flex-start;gap:15px}.product-create-head small{display:block;margin-top:5px;color:var(--muted);font-size:12px}.variant-summary{display:flex;gap:8px;flex-wrap:wrap}.variant-summary span{background:#f2f6ff;border:1px solid #dfe8ff;border-radius:18px;padding:7px 12px;color:#66758d;font-size:12px;font-weight:700}.variant-summary b{color:#2943c8;font-size:14px}.product-master-form{margin-top:15px;border:1px solid #e4eaf5;border-radius:12px;overflow:hidden}.product-master-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:11px;padding:14px 15px;background:#fbfcff;border-bottom:1px solid #e8edf5}.product-master-grid label{display:flex;flex-direction:column;gap:5px;color:#536078;font-size:12px;font-weight:700}.product-master-grid .span-two{grid-column:span 2}.product-master-grid input,.product-master-grid select{height:40px;border:1px solid #d7dfed;border-radius:8px;background:#fff;padding:0 10px;color:#273142;width:100%}.variant-builder{padding:14px 15px}.variant-builder-head{display:flex;justify-content:space-between;align-items:end;gap:15px;margin-bottom:12px}.variant-builder-head h3{font-size:15px;color:#26357d;margin:0 0 4px}.variant-builder-head small{color:#728096;font-size:11px}.quick-size-builder{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.quick-size-builder input{height:38px;border:1px solid #d7dfed;border-radius:8px;background:#fff;padding:0 9px;width:112px}.quick-size-builder input[type=number]{width:86px}.btn.soft{background:#edf3ff;color:#2e4cda;border-color:#d7e2ff}.variant-table-wrap{overflow:auto;border:1px solid #e4eaf5;border-radius:9px}.variant-input-table{min-width:1000px;margin:0}.variant-input-table th{height:39px;background:#f6f8fc;color:#59677e;font-size:11px}.variant-input-table td{padding:6px;background:#fff}.variant-input-table input,.variant-input-table select{height:36px;border:1px solid #d8e0ef;border-radius:7px;padding:0 8px;background:#fff;width:100%;font-size:12px}.variant-input-table td:nth-child(1){width:42px;text-align:center;color:#708099;font-weight:700}.variant-input-table td:nth-child(2){width:130px}.variant-input-table td:nth-child(3){width:84px}.variant-input-table td:nth-child(4){width:180px}.variant-input-table td:nth-child(5){width:125px}.variant-input-table td:nth-child(6){width:180px}.variant-input-table td:nth-child(7){width:225px}.remove-variant{height:32px;width:32px;border:0;border-radius:7px;background:#fff0f1;color:#d73245;font-weight:700;font-size:18px;cursor:pointer}.product-submit{padding:13px 15px;background:#f8faff;border-top:1px solid #e8edf5;display:flex;justify-content:space-between;align-items:center;gap:12px}.product-submit b{display:block;color:#26357d;font-size:13px}.product-submit small{color:#728096;font-size:11px}.product-list-panel{margin-top:15px}.product-list-panel .table-scroll table{min-width:1150px}
@media(max-width:1250px){.product-master-grid{grid-template-columns:repeat(3,minmax(160px,1fr))}.variant-builder-head{display:block}.quick-size-builder{justify-content:flex-start;margin-top:11px}}
@media(max-width:720px){.product-create-panel{padding:12px}.product-create-head,.product-submit{display:block}.variant-summary{margin-top:11px}.product-master-grid{grid-template-columns:1fr 1fr;padding:11px}.product-master-grid .span-two{grid-column:1/-1}.variant-builder{padding:11px}.quick-size-builder input{width:100%;flex:1 1 100%}.quick-size-builder .btn{flex:1}.product-submit .btn{width:100%;margin-top:12px}}

/* V1.2.1 - Danh mục kho và vị trí vật lý */
.warehouse-location-panel{margin-bottom:15px;padding:17px}.warehouse-location-panel .panel-head{align-items:flex-start;gap:18px}.warehouse-location-panel .panel-head small{display:block;max-width:820px;line-height:1.55;color:#66748a;margin-top:5px}.warehouse-admin-grid{display:grid;grid-template-columns:minmax(0,1fr) 294px;gap:15px;margin-top:14px}.warehouse-cards{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr));gap:9px;margin-bottom:17px}.warehouse-cards article{border:1px solid #e1e8f4;background:#f8faff;border-radius:10px;padding:10px 11px}.warehouse-cards b{display:block;font-size:13px;color:#27367d}.warehouse-cards small{display:block;font-size:10px;color:#728096;margin:4px 0 9px}.warehouse-cards div{display:flex;gap:8px;flex-wrap:wrap}.warehouse-cards span{font-size:10px;background:#fff;border:1px solid #e5ebf5;border-radius:12px;padding:4px 7px;color:#536078}.warehouse-catalog h3,.warehouse-forms h3{font-size:14px;color:#28377e;margin:0 0 10px}.location-table{min-width:690px}.location-table td,.location-table th{height:40px}.warehouse-forms{display:flex;flex-direction:column;gap:11px}.location-create-form{border:1px solid #e3eaf5;background:#fbfcff;border-radius:11px;padding:13px;display:flex;flex-direction:column;gap:7px}.location-create-form.secondary{background:#fff}.location-create-form label{font-size:11px;font-weight:700;color:#59677f}.location-create-form input,.location-create-form select{height:38px;width:100%;border:1px solid #d7dfed;background:#fff;border-radius:8px;padding:0 9px;color:#273142}.location-create-form .form-row{gap:7px}.import-locations{margin-top:14px;border:1px dashed #d9e2f1;border-radius:9px;background:#fcfdff;padding:9px 11px}.import-locations summary{cursor:pointer;font-size:12px;font-weight:700;color:#2d46c9}.import-locations p{font-size:11px;color:#66748a;line-height:1.45;margin:8px 0}.inventory-content-grid{margin-top:15px}.stock-adjust-form .stock-location option[disabled]{display:none}
@media(max-width:1280px){.warehouse-cards{grid-template-columns:repeat(2,minmax(150px,1fr))}.warehouse-admin-grid{grid-template-columns:minmax(0,1fr) 270px}}
@media(max-width:900px){.warehouse-admin-grid{display:block}.warehouse-forms{margin-top:14px}.warehouse-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.warehouse-location-panel{padding:12px}.warehouse-cards{grid-template-columns:1fr}.warehouse-location-panel .panel-head{display:block}.warehouse-location-panel .panel-head form{margin-top:10px}}


/* V1.2.2 - Cập nhật khách hàng từ danh sách */
.customer-table td:nth-child(3),.customer-table th:nth-child(3){position:sticky;left:0;background:#fff;z-index:1}
.customer-table thead th:nth-child(3){background:#f6f7fa;z-index:2}
.customer-table tbody tr:hover td:nth-child(3){background:#f8faff}
.customer-edit-btn{height:31px!important;padding:0 10px!important;font-size:11px!important;white-space:nowrap}
.customer-form-title{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:10px}
.customer-form-title h2{margin:0 0 4px}
.customer-form-title small{display:block;color:#6d7890;font-size:11px;line-height:1.35}
.customer-cancel-edit{font-size:12px;white-space:nowrap}
.customer-form-panel input[readonly]{background:#f1f4fa;color:#647189;cursor:not-allowed}

/* V1.2.3 - Nhập nhanh phiếu nhập/xuất theo mã hàng, màu và size */
.voucher-quick-entry{margin:16px 20px 8px;border:1px solid #dfe6f5;background:#f8faff;border-radius:12px;padding:14px 15px}
.voucher-quick-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.voucher-quick-title h3{font-size:14px;color:#29377d;margin:0 0 4px;text-transform:none;letter-spacing:0}
.voucher-quick-title p{font-size:12px;color:#69778d;line-height:1.45}
.voucher-quick-controls{display:grid;grid-template-columns:minmax(230px,2fr) minmax(150px,1fr) minmax(185px,1.3fr) 120px auto;gap:8px;align-items:end}
.voucher-quick-controls label{display:flex;flex-direction:column;gap:5px;color:#566177;font-size:11px;font-weight:700}
.voucher-quick-controls input,.voucher-quick-controls select{height:39px;border:1px solid #d5deef;background:#fff;border-radius:8px;padding:0 9px;width:100%;color:#273142}
.voucher-quick-controls .btn{height:39px}
.voucher-variant-summary{display:inline-flex;background:#eaf0ff;color:#2943c8;border-radius:20px;padding:6px 11px;font-size:12px;font-weight:700;margin:14px 0 10px}
.voucher-variant-picker{display:flex;gap:9px;flex-wrap:wrap;max-height:330px;overflow:auto}
.voucher-variant-picker .quick-empty{width:100%;padding:17px;text-align:center;color:#748197;border:1px dashed #dce4f2;background:#fff;border-radius:9px;font-size:12px}
.voucher-color-box{border:1px solid #e1e7f2;background:#fff;border-radius:10px;padding:9px;flex:1 1 250px;min-width:235px}
.voucher-color-box h4{font-size:12px;color:#25347d;margin:0 0 8px;padding-bottom:7px;border-bottom:1px solid #edf1f7;text-transform:uppercase}
.voucher-size-grid{display:grid;grid-template-columns:repeat(2,minmax(100px,1fr));gap:6px}
.voucher-size-card{border:1px solid #e3e9f4;border-radius:8px;background:#fbfcff;padding:7px;display:grid;grid-template-columns:auto 1fr;grid-template-areas:'check size' 'check sku' 'qty qty';gap:2px 7px;cursor:pointer;transition:.15s}
.voucher-size-card.selected{background:#eef3ff;border-color:#96b0ff;box-shadow:0 0 0 1px rgba(67,105,255,.08)}
.voucher-size-card .quick-variant-check{grid-area:check;width:15px;height:15px;margin:4px 0 0}
.voucher-size-card .quick-size-name{grid-area:size;font-size:12px;font-weight:700;color:#26357d}
.voucher-size-card small{grid-area:sku;color:#7c879a;margin:0;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.voucher-size-card .quick-variant-qty{grid-area:qty;margin-top:5px;height:32px;border:1px solid #d7dfef;border-radius:6px;background:#fff;padding:0 8px;font-size:12px;width:100%}
.voucher-quick-actions{display:flex;align-items:center;gap:8px;justify-content:flex-end;margin-top:12px;padding-top:11px;border-top:1px solid #e5ebf5}
@media(max-width:1260px){.voucher-quick-controls{grid-template-columns:repeat(2,minmax(190px,1fr))}.voucher-quick-controls .btn{grid-column:1/-1}.voucher-size-grid{grid-template-columns:repeat(2,minmax(95px,1fr))}}
@media(max-width:680px){.voucher-quick-entry{margin:12px;padding:11px}.voucher-quick-title{display:block}.voucher-quick-title .badge{margin-top:8px}.voucher-quick-controls{grid-template-columns:1fr}.voucher-quick-controls .btn{width:100%}.voucher-variant-picker{max-height:none;display:block}.voucher-color-box{margin-top:8px}.voucher-quick-actions{display:grid;grid-template-columns:1fr 1fr}.voucher-quick-actions .btn.primary{grid-column:1/-1}}


/* V1.2.4 - Mua nguyên liệu: danh mục NCC, tạo nhanh nguyên liệu và form nhập kho chuẩn */
.purchase-layout{display:grid;grid-template-columns:minmax(0,1fr) 405px;gap:15px;align-items:start}
.purchase-history{min-height:360px}.purchase-history .panel-head small{display:block;color:#69768d;margin-top:5px;line-height:1.45}
.purchase-table{min-width:920px}.purchase-table td small{display:block;color:#748197;font-size:10px;margin-top:3px}.purchase-table td.num{text-align:right;white-space:nowrap}
.purchase-aside{display:flex;flex-direction:column;gap:12px}.purchase-receive-panel{padding:15px}.purchase-panel-head{border-bottom:1px solid #e7ecf5;padding-bottom:12px;margin-bottom:12px}.purchase-panel-head h2{font-size:16px;margin:0 0 5px;color:#28377e}.purchase-panel-head p{font-size:11px;color:#69768c;line-height:1.45;margin:0}
.purchase-section{border:1px solid #e5ebf5;border-radius:10px;background:#fbfcff;padding:10px 10px;margin-bottom:9px}.purchase-section h3{font-size:11px;color:#354698;margin:0 0 8px;letter-spacing:.03em}.purchase-section label{font-size:11px}
.selector-with-action{display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:6px}.selector-with-action select{min-width:0}.mini-plus{height:40px;border-radius:8px;border:1px solid #bfcdf1;background:#edf3ff;color:#2e4cda;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;text-decoration:none}
.purchase-submit-btn{width:100%;height:45px;margin-top:3px}.purchase-create-panel{padding:0;overflow:hidden}.purchase-create-panel summary{list-style:none;cursor:pointer;background:#f7f9fd;padding:14px 15px;font-size:14px;font-weight:700;color:#28377e;border-bottom:1px solid transparent}.purchase-create-panel summary::-webkit-details-marker{display:none}.purchase-create-panel[open] summary{border-color:#e4eaf4}.purchase-create-panel .form{padding:0 14px 14px}.purchase-create-panel .form-note{margin:12px 14px 9px;background:#f1f5ff;border-radius:8px;padding:8px;color:#67748a;font-size:11px;line-height:1.45}.purchase-create-panel textarea{min-height:58px}
.purchase-receive-form .purchase-location option[disabled]{display:none}
@media(max-width:1240px){.purchase-layout{grid-template-columns:minmax(0,1fr) 365px}}
@media(max-width:980px){.purchase-layout{display:block}.purchase-aside{margin-top:14px}.purchase-receive-panel{padding:12px}}


/* V1.2.5 - Popup tạo nhanh NCC / nguyên liệu tại màn hình mua nguyên liệu */
.mini-plus{cursor:pointer;font-family:inherit}
body.purchase-modal-open{overflow:hidden}
.purchase-modal{position:fixed;inset:0;z-index:1200;display:none;align-items:center;justify-content:center;padding:20px}
.purchase-modal.is-open{display:flex}
.purchase-modal-backdrop{position:absolute;inset:0;background:rgba(13,20,49,.48);backdrop-filter:blur(2px)}
.purchase-modal-card{position:relative;z-index:1;width:min(620px,100%);max-height:min(92vh,840px);overflow:auto;background:#fff;border-radius:15px;box-shadow:0 24px 65px rgba(14,24,61,.26)}
.purchase-modal-card.purchase-modal-wide{width:min(790px,100%)}
.purchase-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid #e7ecf5;padding:18px 20px 15px;background:#fbfcff;position:sticky;top:0;z-index:2}
.purchase-modal-header h2{margin:0 0 4px;font-size:18px;color:#25357a}.purchase-modal-header p{font-size:12px;line-height:1.45;color:#6b778d;margin:0}
.purchase-modal-close{display:flex;align-items:center;justify-content:center;flex:none;border:1px solid #d9e1ef;background:#fff;color:#66758e;border-radius:8px;width:36px;height:36px;font-size:24px;line-height:1;cursor:pointer}
.purchase-modal-close:hover{background:#f2f5fb;color:#24377f}
.purchase-modal-form{padding:17px 20px 20px}.purchase-modal-form label{font-size:12px;margin-bottom:11px}.purchase-modal-form textarea{min-height:62px}
.modal-form-grid{display:grid;gap:10px}.modal-form-grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.modal-form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.purchase-modal-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid #e9eef6;padding-top:15px;margin-top:6px}
@media(max-width:700px){.purchase-modal{padding:10px;align-items:flex-end}.purchase-modal-card{border-radius:15px 15px 0 0;max-height:94vh}.purchase-modal-header{padding:14px 14px 12px}.purchase-modal-form{padding:13px 14px 16px}.modal-form-grid.two,.modal-form-grid.three{grid-template-columns:1fr}.purchase-modal-actions .btn{flex:1}}


/* V1.2.6 - Form bán hàng chọn nhanh khách hàng, mã sản phẩm và nhiều màu/size */
.sales-layout{display:grid;grid-template-columns:minmax(650px,1fr) 400px;gap:15px;align-items:start}
.sales-history .panel-head{align-items:flex-start}
.sales-table{min-width:730px}
.sales-table td small{display:block;color:#7b8598;font-size:11px;margin-top:3px}
.sales-table .num{text-align:right}
.sales-aside{position:sticky;top:14px}
.sale-entry-panel{padding:0;overflow:hidden}
.sale-batch-form{padding:0}
.sale-section{padding:15px 16px;border-top:1px solid #e7edf6}
.sale-section:first-of-type{border-top:0}
.sale-section h3{font-size:12px;color:#29377d;margin:0 0 10px;text-transform:uppercase;letter-spacing:.03em}
.sale-section input,.sale-section select{height:40px;border:1px solid #d5deef;border-radius:8px;padding:0 10px;background:#fff;width:100%;color:#273142}
.sale-helper{display:block;color:#718097;font-size:11px;line-height:1.45;margin-top:7px}
.sale-product-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px}
.sale-product-search-row .btn{height:40px;white-space:nowrap}
.sale-variant-summary{display:inline-flex;background:#eaf0ff;color:#2943c8;border-radius:20px;padding:6px 11px;font-size:12px;font-weight:700;margin:12px 0 9px}
.sale-variant-picker{display:flex;flex-wrap:wrap;gap:8px;max-height:460px;overflow:auto}
.sale-variant-picker .quick-empty{width:100%;border:1px dashed #d9e1f2;border-radius:9px;padding:15px;text-align:center;color:#748197;background:#fbfcff;font-size:12px}
.sale-color-box{flex:1 1 100%;border:1px solid #e2e8f4;border-radius:10px;background:#fff;padding:9px}
.sale-color-box h4{margin:0 0 8px;padding-bottom:7px;border-bottom:1px solid #edf1f7;color:#25347d;font-size:12px;text-transform:uppercase}
.sale-size-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.sale-variant-card{border:1px solid #e1e8f4;background:#fbfcff;border-radius:9px;padding:8px;transition:.15s}
.sale-variant-card.selected{border-color:#81a2ff;background:#eff4ff;box-shadow:0 0 0 1px rgba(67,105,255,.10)}
.sale-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:5px;margin-bottom:3px}
.sale-card-top b{font-size:12px;color:#28367c}
.sale-card-top small{font-size:10px;color:#5e7190;text-align:right}
.sale-card-sku{display:block;color:#8390a3;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:7px}
.sale-card-fields{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.sale-card-fields label{font-size:10px;color:#66758c;font-weight:700;margin:0;display:flex;flex-direction:column;gap:3px}
.sale-card-fields input{height:32px;padding:0 7px;font-size:12px}
.sale-total{display:grid;grid-template-columns:1fr auto;gap:7px 15px;background:#f5f8fe;border-top:1px solid #e3eaf6;padding:13px 16px;color:#66748b;font-size:12px}
.sale-total b{text-align:right;color:#27357c;font-size:15px}
.sale-submit-btn{display:block;margin:13px 16px 16px;width:calc(100% - 32px)}
@media(max-width:1280px){.sales-layout{grid-template-columns:minmax(0,1fr) 370px}.sale-size-grid{grid-template-columns:1fr}}
@media(max-width:980px){.sales-layout{display:block}.sales-aside{position:static;margin-top:14px}.sale-size-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.sale-product-search-row,.sale-size-grid{grid-template-columns:1fr}.sale-section{padding:13px 12px}.sale-submit-btn{margin-left:12px;margin-right:12px;width:calc(100% - 24px)}}
.sales-layout-wide{grid-template-columns:minmax(0,1fr) 420px}
.sales-orders-table{min-width:1400px}
.sales-orders-table td,.sales-orders-table th{vertical-align:top}
.sales-orders-table tr.is-selected{background:#eef2ff}
.sales-orders-table td a{font-weight:700}
.sales-detail-panel{margin-top:14px;border-top:1px solid var(--line);padding-top:14px}
.sales-detail-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 14px;margin-bottom:10px;font-size:13px;color:#42506b}
.sales-detail-totals{margin-top:12px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.sales-detail-totals>div,.invoice-stat{background:#f8faff;border:1px solid #dbe3ff;border-radius:12px;padding:10px 12px;display:flex;justify-content:space-between;gap:12px}
.sale-entry-panel .modal-form-grid{margin-bottom:8px}
.sale-entry-panel textarea{min-height:70px}
.sale-invoice-modal-card{max-width:min(1100px,calc(100vw - 40px))}
.sale-invoice-head-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:12px;color:#3c465d}
.sale-invoice-head-grid p{margin:0 0 8px}
.sale-invoice-footer-grid{display:grid;grid-template-columns:1.4fr .8fr;gap:20px;margin-top:12px;align-items:start}
.sale-invoice-footer-grid .total{font-size:18px;background:#eef3ff}
@media(max-width:1280px){.sales-layout-wide{grid-template-columns:minmax(0,1fr) 380px}.sales-orders-table{min-width:1200px}}
@media(max-width:980px){.sales-layout-wide{display:block}.sales-detail-meta,.sales-detail-totals,.sale-invoice-head-grid,.sale-invoice-footer-grid{grid-template-columns:1fr}.sales-orders-table{min-width:980px}}
.sales-head-bar{align-items:flex-start;gap:12px}
.sales-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.sales-head-actions .badge{height:38px;padding:0 12px;align-items:center;font-size:12px}
.sale-entry-modal-card{max-width:min(980px,calc(100vw - 40px));max-height:min(92vh,960px);overflow:auto}
.sale-entry-modal-card .sale-submit-btn{width:100%}
@media(max-width:980px){.sales-head-bar{display:block}.sales-head-actions{margin-top:10px;justify-content:flex-start}}
.purchase-entry-modal-card{max-width:min(760px,calc(100vw - 40px));max-height:min(92vh,920px);overflow:auto}
.purchase-entry-modal-card .purchase-submit-btn{width:100%}
.cash-head-bar{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}.cash-head-bar h1{margin:0 0 6px}.cash-head-links{display:flex;gap:18px;color:#506080;font-weight:700}.cash-head-links .active{color:#22307a}.cash-head-actions{display:flex;gap:10px;flex-wrap:wrap}.cash-filter-bar{display:flex;gap:10px;flex-wrap:wrap;align-items:end;padding:12px 14px;border-bottom:1px solid #e6eaf2}.cash-filter-bar label{display:grid;gap:6px;font-size:13px;color:#5f6b85}.cash-filter-bar input,.cash-filter-bar select{min-width:140px}.cash-voucher-table td a{font-weight:700}.cash-voucher-table tr.is-selected{background:#f5f7ff}.cash-modal-card{max-width:min(980px,calc(100vw - 36px));max-height:92vh;overflow:auto}.cash-modal-grid{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:18px}.cash-main-col,.cash-side-col,.cash-detail-block{background:#f9fbff;border:1px solid #e4ebfb;border-radius:14px;padding:16px}.cash-main-col h3,.cash-side-col h3,.cash-detail-head h3{margin:0 0 12px;color:#24336d}.cash-purpose-row{display:flex;gap:18px;align-items:center;flex-wrap:wrap;padding:0 2px 10px}.cash-detail-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.compact-table input,.compact-table select{width:100%}.compact-table tfoot th{background:#f4f6fb}.debt-pick-scroll{max-height:320px;overflow:auto}.cash-debt-summary{font-weight:700;color:#22307a}.btn-sm{padding:8px 12px;font-size:13px}.btn-icon{border:1px solid #f0c8c8;background:#fff;border-radius:10px;padding:7px 10px;cursor:pointer}.btn-icon.danger{color:#c13d3d}.cash-detail-block[hidden]{display:none !important}.cash-partner-row label:last-child input{background:#f6f8fc}@media (max-width:900px){.cash-modal-grid{grid-template-columns:1fr}.cash-head-bar{flex-direction:column}.cash-filter-bar input,.cash-filter-bar select{min-width:unset;width:100%}}

.cash-purpose-row .js-open-debt-picker{margin-left:6px}.cash-partner-row .js-partner-search{width:100%;margin-bottom:8px}

/* V1.3.2 - Nhân sự, chấm công, lương và phân quyền */
.hr-head-bar{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:15px}
.hr-head-bar h1{font-size:22px;margin:0 0 6px;color:#25347b}
.hr-head-bar p{color:#6b7790}
.hr-head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.hr-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:12px;margin-bottom:15px}
.hr-stat-grid article{background:#fff;border:1px solid #e2e8f3;border-radius:12px;padding:13px 15px;border-top:3px solid #30418d}
.hr-stat-grid small{display:block;color:#68758e;font-weight:650;margin-bottom:7px}
.hr-stat-grid b{display:block;font-size:21px;color:#26347d}
.hr-layout{display:grid;grid-template-columns:minmax(0,1fr) 370px;gap:15px}
.attendance-card .table-scroll{margin-top:15px}
.punch-buttons{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:8px}
.punch-buttons .btn{width:100%}
.payroll-panel{margin-top:15px}
.account-permission-panel{margin-top:15px}
.permission-grid{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:15px;align-items:start}
.permission-form{padding:14px;border:1px solid #e4e9f3;background:#fafbfe;border-radius:11px;display:flex;flex-direction:column;gap:10px}
.permission-form h3{font-size:15px;color:#25347b}
.permission-table{border:1px solid #e3e8f2;border-radius:9px;overflow:hidden;background:#fff;max-height:420px;overflow-y:auto}
.permission-row{display:grid;grid-template-columns:1fr 54px 65px;gap:6px;align-items:center;padding:8px 10px;border-bottom:1px solid #edf0f6;font-size:12px}
.permission-row:last-child{border-bottom:0}
.permission-row.header{background:#f4f6fb;font-weight:700}
.permission-row input{width:17px;height:17px;margin:auto}
.employee-modal-card{width:min(1220px,calc(100vw - 36px));max-height:93vh;overflow:auto}
.employee-tab-nav{display:grid;grid-template-columns:1fr 1fr;border-bottom:1px solid #dfe5f0;margin:0 0 15px}
.employee-tab-nav button{height:46px;border:0;background:#fff;color:#5d6880;font-weight:700;border-bottom:2px solid transparent}
.employee-tab-nav button.active{color:#26347d;border-bottom-color:#ef4568}
.employee-tab-panel{display:none}
.employee-tab-panel.active{display:block}
.employee-tab-panel h3{font-size:15px;color:#28377e;margin:0 0 13px}
.employee-role-box{border:1px solid #e5ebf5;border-radius:10px;background:#fbfcff;padding:12px;margin-bottom:12px}
.role-checkboxes{display:flex;flex-wrap:wrap;gap:16px;margin-top:10px}
.salary-policy-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.salary-policy-columns fieldset,.insurance-box{border:1px solid #dde5f1;border-radius:10px;padding:12px}
.salary-policy-columns legend,.insurance-box legend{padding:0 7px;color:#27367c;font-weight:700}
.salary-policy-columns label{display:grid;gap:5px;font-size:11px;margin-bottom:8px}
.insurance-box{margin-top:12px}
.system-account-fields{margin-top:10px;background:#f4f7ff;border:1px solid #dfe7fb;border-radius:10px;padding:11px}
.payroll-slip-card{width:min(1220px,calc(100vw - 36px));max-height:94vh;overflow:auto}
.slip-title{text-align:center;color:#25347b;border:1px solid #dfe5ee;padding:13px;margin:12px 0 0}
.slip-meta{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid #e1e7f1;border-top:0}
.slip-meta span{padding:10px;border-right:1px solid #e1e7f1}
.slip-columns{display:grid;grid-template-columns:1fr 1fr;margin-top:12px;gap:10px}
.slip-columns table td,.slip-columns table th{padding:8px 10px}
.slip-columns tr.total td{font-weight:700;background:#f4f6fb}
.slip-net{display:flex;justify-content:center;gap:25px;align-items:center;border:1px solid #dee5f1;background:#f6f8fd;padding:16px;font-weight:700;margin-top:12px}
.slip-net b{font-size:19px;color:#26347d}
@media(max-width:1100px){.hr-layout,.permission-grid{grid-template-columns:1fr}.hr-stat-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.hr-head-bar{display:block}.hr-head-actions{margin-top:12px}.hr-stat-grid,.salary-policy-columns,.slip-meta,.slip-columns{grid-template-columns:1fr}.employee-modal-card{width:calc(100vw - 18px)}}


/* V1.3.5 - Menu 3 gạch mở toàn bộ tính năng trên mobile */
.mobile-menu-btn,.mobile-menu-backdrop{display:none}
@media(max-width:760px){
  .topbar{gap:11px;position:sticky;top:0;z-index:40}
  .mobile-menu-btn{
    display:inline-flex;flex-direction:column;justify-content:center;gap:4px;
    width:39px;height:39px;flex:0 0 39px;border:1px solid #d8e0f0;
    border-radius:10px;background:#fff;padding:0 10px;cursor:pointer
  }
  .mobile-menu-btn span{display:block;height:2px;width:18px;border-radius:4px;background:#27367e}
  .page-title{flex:1}
  .sidebar{
    display:flex;flex-direction:column;position:fixed;left:0;top:0;bottom:0;
    width:min(295px,84vw);height:100dvh;z-index:120;
    transform:translateX(-105%);transition:transform .25s ease;
    box-shadow:0 15px 45px rgba(12,21,60,.28);overflow:hidden
  }
  body.mobile-menu-open .sidebar{transform:translateX(0)}
  .sidebar-brand{padding:17px 17px 14px;margin-bottom:10px}
  .sidebar-brand div:last-child{display:block}
  .sidebar nav{display:block;overflow-y:auto;padding-bottom:15px;flex:1}
  .sidebar nav span{display:block}
  .sidebar nav a{justify-content:flex-start;padding:12px 16px;margin:2px 9px}
  .sidebar nav a i{width:26px}
  .sidebar-foot{display:flex;margin-top:auto;padding-bottom:calc(18px + env(safe-area-inset-bottom))}
  .mobile-menu-backdrop{
    display:block;position:fixed;inset:0;background:rgba(14,23,55,.46);
    z-index:110;opacity:0;pointer-events:none;transition:opacity .22s ease
  }
  body.mobile-menu-open .mobile-menu-backdrop{opacity:1;pointer-events:auto}
  body.mobile-menu-open{overflow:hidden}
}

/* V1.3.6 - Quản lý đa xưởng */
.workshop-switch select,.workshop-current{height:38px;border:1px solid #dbe2f1;border-radius:9px;background:#fff;color:#27367c;font-weight:700;padding:0 12px;max-width:250px}
.workshop-current{display:flex;align-items:center}
.workshop-management{margin-bottom:16px}
.workshop-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start;margin-top:14px}
.workshop-add-form{background:#f7f9fd;border:1px solid #e3e8f3;border-radius:12px;padding:14px}
.workshop-add-form h3,.workshop-assign-title{color:#27367c;margin:0 0 12px}
.workshop-assign-title{margin-top:18px}
.workshop-assign-form{display:flex;gap:8px;align-items:center}
.workshop-assign-form select{min-width:205px}
.workshop-scope-banner{display:flex;gap:8px;align-items:center;padding:10px 14px;background:#eef3ff;border:1px solid #dbe5ff;border-radius:10px;color:#28387d;font-weight:700;margin-bottom:14px}
@media(max-width:900px){.workshop-grid{grid-template-columns:1fr}.workshop-switch select{max-width:160px}.workshop-assign-form{display:block}.workshop-assign-form select{width:100%;margin-bottom:7px}}

/* V1.3.7 - Chuông chỉ hiển thị số thông báo chưa xem */
.icon-alert{position:relative}
.icon-alert:not(.has-unread){padding-right:4px}
.note.unread{background:#eef4ff;border-left-color:#4369ff}
.note.unread b{color:#203c9a}
.note.read{opacity:.82}

/* V1.3.8 - Popup cấu hình xưởng, kho và tính năng */
.workshop-panel-head{align-items:center}
.workshop-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.workshop-table td small{display:block;margin-top:5px;color:#738099;max-width:440px;line-height:1.45}
.workshop-modal-card{width:min(1020px,calc(100vw - 36px));max-height:93vh;overflow:auto}
.workshop-config-box{border:1px solid #e1e7f3;border-radius:13px;padding:14px;margin-top:13px;background:#f9fbff}
.workshop-config-box h3{color:#26367d;margin:0;font-size:15px}
.config-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.text-btn{border:0;background:transparent;color:#3558d6;font-weight:700;cursor:pointer;padding:5px}
.workshop-check-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.warehouse-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.feature-check{display:flex;align-items:center;gap:7px;border:1px solid #e0e6f2;border-radius:9px;background:#fff;padding:10px 11px;font-size:13px;color:#35415c}
.feature-check input{width:17px;height:17px;accent-color:#4267ff}
.workshop-config-box .helper{display:block;color:#74829b;margin-top:12px;line-height:1.45}
@media(max-width:900px){.workshop-check-grid,.warehouse-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workshop-modal-card{width:calc(100vw - 16px)}}
@media(max-width:520px){.workshop-check-grid,.warehouse-grid{grid-template-columns:1fr}.workshop-head-actions{margin-top:10px}}

/* V1.3.9 - Xóa xưởng có popup xác nhận */
.workshop-row-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.btn.danger{background:#fff1f2;color:#cf304c;border:1px solid #ffcdd5}
.btn.danger:hover{background:#cf304c;color:#fff;border-color:#cf304c}
.workshop-delete-modal-card{width:min(510px,calc(100vw - 28px))}
.delete-workshop-warning{display:flex;gap:14px;align-items:flex-start;border:1px solid #ffd1d8;background:#fff6f7;color:#37425b;border-radius:13px;padding:15px;margin:12px 0 18px}
.delete-warning-icon{display:flex;justify-content:center;align-items:center;flex:0 0 28px;height:28px;border-radius:50%;background:#f04461;color:#fff;font-size:18px;font-weight:800}
.delete-workshop-warning b{color:#cf304c}
.delete-workshop-warning small{display:block;color:#6e7890;margin-top:8px;line-height:1.5}

/* V1.4.0 - Sửa ghi nhận Chấm IN / Chấm OUT */
.attendance-punch-table .punch-recorded{font-weight:700;color:#26377e}
.attendance-status{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap}
.attendance-status.success{background:#e9f8f1;color:#12855d}
.attendance-status.warning{background:#fff2de;color:#a56600}
.attendance-status.neutral{background:#edf1f8;color:#63708b}

/* V1.4.1 - Tab lịch sử chấm IN / OUT */
.hr-feature-tabs{display:flex;gap:6px;border-bottom:1px solid #e2e7f2;margin:0 0 15px;padding:0 2px}
.hr-feature-tabs a{display:inline-flex;align-items:center;padding:12px 17px;border-bottom:2px solid transparent;color:#66748d;font-weight:700}
.hr-feature-tabs a.active{color:#27377e;border-color:#4267ff;background:#f7f9ff}
.attendance-history-panel{padding:0;overflow:hidden}
.attendance-history-head{padding:15px 16px;border-bottom:1px solid #e5eaf3}
.attendance-history-filter{display:grid;grid-template-columns:minmax(210px,1.4fr) 155px 155px 185px auto auto;gap:10px;align-items:end;padding:14px 16px;background:#fafbfe;border-bottom:1px solid #e4e9f3}
.attendance-history-filter label{display:grid;gap:6px;color:#62708a;font-size:12px;font-weight:700}
.attendance-history-filter input,.attendance-history-filter select{height:40px;border:1px solid #d8e0ee;border-radius:8px;background:#fff;padding:0 10px}
.attendance-history-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:14px 16px}
.attendance-history-stats article{border:1px solid #e1e7f2;border-radius:10px;background:#f8faff;padding:10px 12px}
.attendance-history-stats small{display:block;color:#67758d;font-weight:700;margin-bottom:5px}
.attendance-history-stats b{font-size:20px;color:#26367d}
.attendance-history-table{min-width:1020px}
.attendance-history-table .num{text-align:right}
.attendance-history-table .punch-recorded{font-weight:700;color:#26377e}
.attendance-history-footer{display:flex;align-items:center;justify-content:space-between;gap:15px;color:#6d7890;padding:12px 16px;border-top:1px solid #e5eaf3;font-size:12px}
.history-pagination{display:flex;gap:5px}
.history-pagination a{height:32px;min-width:32px;padding:0 8px;display:flex;align-items:center;justify-content:center;border:1px solid #dbe2f1;border-radius:7px;color:#30418b;font-weight:700}
.history-pagination a.active{background:#2d3c89;color:#fff;border-color:#2d3c89}
@media(max-width:1000px){.attendance-history-filter{grid-template-columns:1fr 1fr}.attendance-history-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.hr-feature-tabs a{flex:1;justify-content:center;padding:12px 7px;font-size:12px}.attendance-history-filter,.attendance-history-stats{grid-template-columns:1fr}.attendance-history-footer{display:block}.history-pagination{margin-top:10px;overflow:auto}}
