:root{--bg:#f5f7fb;--panel:#fff;--text:#182033;--muted:#6d7690;--line:#e7eaf1;--brand:#334f91;--brand2:#4666ad;--sidebar:#1f2d52;--danger:#c53b45;--green:#2e8b57;--amber:#b47900;--blue:#356bc4;--indigo:#5849b7;--shadow:0 8px 28px rgba(31,45,82,.08);--radius:14px}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--text);background:var(--bg)}a{color:var(--brand);text-decoration:none}button,input,select,textarea{font:inherit}input,select,textarea{width:100%;border:1px solid #d9dfeb;border-radius:9px;padding:10px 11px;background:#fff;color:var(--text);outline:none}input:focus,select:focus,textarea:focus{border-color:#7790c7;box-shadow:0 0 0 3px rgba(70,102,173,.1)}textarea{resize:vertical}.app-shell{display:flex;min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:236px;background:var(--sidebar);color:#fff;padding:20px 14px;display:flex;flex-direction:column;z-index:50}.brand{display:flex;align-items:center;gap:12px}.brand-mark{width:42px;height:42px;border-radius:12px;background:#fff;color:var(--sidebar);font-weight:900;display:flex;align-items:center;justify-content:center;letter-spacing:-1px}.brand strong{display:block;font-size:15px;letter-spacing:1.2px}.brand small{display:block;opacity:.65;font-size:11px;margin-top:2px}.sidebar nav{margin-top:28px;display:flex;flex-direction:column;gap:5px}.nav-link{display:flex;align-items:center;gap:11px;color:#dbe3fb;padding:10px 12px;border-radius:9px;font-size:14px}.nav-link span{width:20px;text-align:center}.nav-link:hover,.nav-link.active{background:rgba(255,255,255,.12);color:#fff}.sidebar-bottom{margin-top:auto;border-top:1px solid rgba(255,255,255,.12);padding-top:14px}.user-mini{padding:7px 12px 12px}.user-mini strong,.user-mini small{display:block}.user-mini small{opacity:.65;margin-top:3px}.main{margin-left:236px;min-width:0;flex:1}.topbar{height:66px;position:sticky;top:0;z-index:40;background:rgba(255,255,255,.93);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 28px;gap:18px}.global-search{display:flex;max-width:520px;flex:1}.global-search input{border-radius:9px 0 0 9px;border-right:0}.global-search button{border:1px solid #d9dfeb;border-left:0;background:#fff;border-radius:0 9px 9px 0;width:44px;cursor:pointer}.top-user{margin-left:auto;font-size:14px;font-weight:600}.menu-btn{display:none;border:0;background:none;font-size:22px}.content{padding:28px;max-width:1800px;margin:0 auto}.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}.page-head h1{margin:0;font-size:25px;letter-spacing:-.4px}.page-head p{margin:5px 0 0;color:var(--muted);font-size:14px}.page-actions{display:flex;gap:8px;flex-wrap:wrap}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid #d6dceb;background:#fff;color:#25314a;border-radius:9px;padding:9px 13px;font-weight:600;font-size:14px;cursor:pointer;white-space:nowrap}.btn:hover{background:#f8f9fc}.btn.primary{background:var(--brand);border-color:var(--brand);color:#fff}.btn.primary:hover{background:#293f77}.btn.ghost{background:transparent}.btn.large{padding:11px 17px}.btn.wide{width:100%}.panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;margin-bottom:18px}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:14px}.panel-head h3,.panel h3{margin:0;font-size:16px}.panel-note{background:#f7f8fc;border:1px dashed #cfd6e5;padding:10px 12px;border-radius:9px;color:var(--muted);font-size:13px;margin-bottom:14px}.kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.kpi{background:#fff;border:1px solid var(--line);border-radius:13px;padding:16px;box-shadow:var(--shadow);border-top:3px solid #9aa5bd}.kpi span,.kpi small{display:block;color:var(--muted);font-size:12px}.kpi strong{display:block;font-size:22px;margin:7px 0 5px;letter-spacing:-.5px}.kpi.blue{border-top-color:var(--blue)}.kpi.indigo{border-top-color:var(--indigo)}.kpi.green{border-top-color:var(--green)}.kpi.red{border-top-color:var(--danger)}.kpi.amber{border-top-color:var(--amber)}.section-title{font-size:16px;margin:24px 0 12px}.alert-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.alert-card{padding:15px;border-radius:12px;border:1px solid var(--line);background:#fff;display:flex;flex-direction:column;box-shadow:var(--shadow)}.alert-card strong{font-size:24px}.alert-card span{font-size:13px;margin-top:4px}.alert-card.danger{border-left:4px solid var(--danger)}.alert-card.warning{border-left:4px solid #d99000}.alert-card.info{border-left:4px solid var(--blue)}.alert-card.muted{border-left:4px solid #8a94aa}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:18px}.bar-list{display:flex;flex-direction:column;gap:12px}.bar-item>div:first-child{display:flex;justify-content:space-between;font-size:13px}.bar-track{height:8px;background:#edf0f6;border-radius:99px;overflow:hidden;margin-top:6px}.bar-track i{display:block;height:100%;background:var(--brand2);border-radius:99px}.status-summary{display:flex;flex-direction:column;gap:11px}.status-summary>div{display:grid;grid-template-columns:14px 1fr auto;align-items:center;gap:8px}.dot{width:10px;height:10px;border-radius:50%;display:inline-block}.badge-blue,.dot.badge-blue{background:#e5efff;color:#24559e}.badge-green,.dot.badge-green{background:#e7f5ed;color:#277149}.badge-red,.dot.badge-red{background:#fde9eb;color:#a12e38}.badge-amber,.dot.badge-amber{background:#fff3cf;color:#8a5f00}.badge-gray,.dot.badge-gray{background:#eef1f6;color:#687289}.badge{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:12px;font-weight:700}.filter-bar{display:flex;gap:8px;align-items:end;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:14px}.filter-bar input,.filter-bar select{width:auto;min-width:145px}.filter-bar input[name=q]{min-width:240px}.filter-bar label{font-size:12px;color:var(--muted)}.filter-bar label input{display:block;margin-top:4px}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse;min-width:980px}.data-table th{position:sticky;top:0;background:#f7f8fc;color:#58617a;font-size:11px;text-transform:uppercase;letter-spacing:.4px;text-align:left;padding:10px 9px;border-bottom:1px solid var(--line);white-space:nowrap}.data-table td{padding:9px;border-bottom:1px solid #edf0f5;font-size:13px;vertical-align:middle}.data-table tr:hover td{background:#fafbfe}.data-table .num{text-align:right;white-space:nowrap}.data-table .strong{font-weight:700}.data-table.compact td,.data-table.compact th{padding:7px 8px;font-size:12px}.data-table small{display:block;color:var(--muted);margin-top:2px}.data-table .legacy{font-size:10px}.order-code{font-weight:800;white-space:nowrap}.empty{text-align:center;color:var(--muted);padding:28px!important}.inline-select{min-width:125px;padding:6px 27px 6px 8px;border-radius:8px;font-size:12px;font-weight:700;border:1px solid transparent}.inline-select.badge-green{background:#e7f5ed}.inline-select.badge-red{background:#fde9eb}.inline-select.badge-amber{background:#fff3cf}.inline-select.badge-blue{background:#e5efff}.icon-btn{width:28px;height:28px;border-radius:8px;background:#f0f3f9;display:flex;align-items:center;justify-content:center;font-size:20px}.form-panel{max-width:1100px}.form-section{padding:5px 0 20px;border-bottom:1px solid var(--line);margin-bottom:20px}.form-section h3{margin-bottom:14px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid.three{grid-template-columns:repeat(3,1fr)}.form-grid label,.stack-form label,.install-form label,.login-card label{font-size:12px;color:#5d667c;font-weight:600}.form-grid label input,.form-grid label select,.form-grid label textarea,.stack-form label input,.login-card label input,.install-form label input{display:block;margin-top:5px}.span-2{grid-column:span 2}.form-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}.upload-box{display:flex;align-items:center;justify-content:center;min-height:88px;border:2px dashed #cbd4e6;border-radius:12px;background:#fafbfe;cursor:pointer;color:var(--muted);text-align:center;padding:16px}.upload-box.large{min-height:130px}.upload-box input{display:none}.detail-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}.detail-list{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0}.detail-list>div{padding:10px;background:#fafbfe;border-radius:9px}.detail-list .full{grid-column:1/-1}.detail-list dt{font-size:11px;color:var(--muted);text-transform:uppercase}.detail-list dd{margin:5px 0 0;font-size:14px}.big-money{font-size:20px!important;font-weight:800}.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}.image-card{border:1px solid var(--line);border-radius:10px;overflow:hidden}.image-card img{width:100%;height:130px;object-fit:cover;display:block;background:#eee}.image-card>div{padding:8px;display:flex;justify-content:space-between;gap:8px;font-size:11px}.image-card form{margin:0}.link-danger,.link-btn{border:0;background:none;color:var(--danger);cursor:pointer;padding:0;font-size:12px}.link-btn{color:var(--brand)}.truncate{max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mini-kpi-row,.carrier-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-bottom:14px}.mini-kpi-row a,.carrier-cards a{background:#fff;border:1px solid var(--line);border-radius:11px;padding:13px;box-shadow:var(--shadow);display:flex;flex-direction:column}.mini-kpi-row span,.carrier-cards span,.carrier-cards small{color:var(--muted);font-size:12px}.mini-kpi-row strong,.carrier-cards strong{margin:4px 0}.bulk-bar{display:flex;gap:8px;margin-bottom:12px}.bulk-bar select{width:auto}.tabs{display:flex;gap:6px;margin-bottom:14px;flex-wrap:wrap}.tabs a{padding:8px 12px;border:1px solid var(--line);border-radius:9px;background:#fff;font-size:13px}.tabs a.active{background:var(--brand);color:#fff;border-color:var(--brand)}.severity{font-size:10px;font-weight:900;padding:4px 6px;border-radius:6px}.severity.red{background:#fde4e6;color:#a5202b}.severity.orange{background:#ffecd7;color:#a75800}.severity.yellow{background:#fff4c7;color:#826100}.severity.gray{background:#eef1f5;color:#687289}.simple-table{width:100%;border-collapse:collapse}.simple-table td{padding:9px 5px;border-bottom:1px solid var(--line);font-size:13px}.simple-table td:last-child{text-align:right}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.stack-form{display:flex;flex-direction:column;gap:11px;margin-top:14px}.check{display:flex!important;align-items:center;gap:8px}.check input{width:auto!important;margin:0!important}.inline-form,.user-create{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.inline-form input{max-width:320px}.user-create input{max-width:220px}.user-create select{max-width:160px}.status-edit-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.status-row{display:flex;gap:8px;align-items:center;margin:8px 0}.status-row input{padding:7px 9px}.import-help ol{line-height:1.8}.import-help h3{margin-bottom:8px}.upload-form{max-width:700px}.report-kpis{grid-template-columns:repeat(5,1fr)}.flash{padding:11px 14px;border-radius:9px;margin-bottom:14px;font-size:13px}.flash.success{background:#e8f6ee;color:#266b46;border:1px solid #c6e8d3}.flash.error{background:#fdebed;color:#952b35;border:1px solid #f2c9cd}.toast{position:fixed;right:24px;bottom:24px;opacity:0;transform:translateY(10px);transition:.2s;background:#1f2d52;color:#fff;padding:10px 14px;border-radius:9px;box-shadow:var(--shadow);z-index:99;pointer-events:none}.toast.show{opacity:1;transform:none}.muted{color:var(--muted)}.login-page,.install-page{display:flex;align-items:center;justify-content:center;padding:30px;background:linear-gradient(135deg,#f2f5fb,#e8edf8);min-height:100vh}.login-card{width:100%;max-width:420px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 70px rgba(31,45,82,.16);padding:30px}.login-brand .brand-mark{background:var(--sidebar);color:#fff}.login-card h1{margin:28px 0 4px}.login-card>p{color:var(--muted);margin:0 0 24px}.login-card form{display:flex;flex-direction:column;gap:14px}.install-wrap{width:100%;max-width:850px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 24px 70px rgba(31,45,82,.14);padding:30px}.install-wrap h1{margin-top:25px}.requirements{background:#f8f9fc;border:1px solid var(--line);border-radius:12px;padding:14px;margin:18px 0}.requirements>div{display:grid;grid-template-columns:24px 1fr auto;padding:6px 0;font-size:13px}.requirements em{font-style:normal;color:var(--muted)}.install-form h3{margin:24px 0 10px}.install-success{text-align:center;padding:30px 0}.install-success h1{color:var(--green)}code{background:#f0f2f7;padding:2px 5px;border-radius:5px}@media(max-width:1200px){.kpi-grid{grid-template-columns:repeat(2,1fr)}.report-kpis{grid-template-columns:repeat(3,1fr)}.alert-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:900px){.sidebar{transform:translateX(-100%);transition:.22s}.sidebar.open{transform:none}.main{margin-left:0}.menu-btn{display:block}.topbar{padding:0 14px}.content{padding:18px}.two-col,.detail-grid,.settings-grid{grid-template-columns:1fr}.form-grid.three,.status-edit-grid{grid-template-columns:1fr}.global-search{max-width:none}.top-user{display:none}.page-head{flex-direction:column}.page-actions{width:100%}.alert-grid{grid-template-columns:1fr 1fr}}@media(max-width:600px){.content{padding:12px}.kpi-grid,.alert-grid,.report-kpis{grid-template-columns:1fr 1fr}.kpi strong{font-size:18px}.form-grid{grid-template-columns:1fr}.span-2{grid-column:auto}.filter-bar{align-items:stretch}.filter-bar input,.filter-bar select,.filter-bar input[name=q]{width:100%;min-width:0}.page-actions .btn{flex:1}.panel{padding:12px;border-radius:11px}.login-page,.install-page{padding:12px}.login-card,.install-wrap{padding:20px}.form-actions{flex-direction:column}.form-actions .btn{width:100%}}@media print{.sidebar,.topbar,.page-actions,.print-hide,.filter-bar{display:none!important}.main{margin:0}.content{padding:0}.panel,.kpi{box-shadow:none}.kpi-grid{grid-template-columns:repeat(4,1fr)}body{background:#fff}}
.user-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.user-actions form{margin:0}.reset-pass{display:flex;align-items:center;gap:6px}.reset-pass input{width:130px;padding:5px 7px;font-size:11px}
.trend-chart{height:210px;display:grid;grid-template-columns:repeat(7,1fr);gap:8px;align-items:end;padding:18px 4px 0}.trend-col{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:5px;min-width:0}.trend-col i{width:min(38px,70%);min-height:3px;background:var(--brand2);border-radius:7px 7px 2px 2px;display:block}.trend-col small{font-size:10px;color:var(--muted)}.trend-value{font-size:10px;color:#4e5870;white-space:nowrap}
.backup-list{margin-top:16px;border-top:1px solid var(--line);padding-top:12px}.backup-list h4{margin:0 0 8px}.backup-list>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #edf0f5;font-size:12px}.backup-list span b,.backup-list span small{display:block}.backup-list span small{color:var(--muted);margin-top:2px}
.mobile-order-list{display:none}.mobile-order-card{background:#fff;border:1px solid var(--line);border-radius:12px;padding:13px;margin-bottom:10px}.mobile-order-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.mobile-order-top>div{display:flex;flex-direction:column;gap:3px;min-width:0}.mobile-order-top small{color:var(--muted);font-size:11px}.mobile-order-top>b{white-space:nowrap;font-size:16px}.mobile-status-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.mobile-status-grid label{font-size:10px;color:var(--muted)}.mobile-status-grid .inline-select{display:block;width:100%;margin-top:4px;min-width:0}.mobile-order-foot{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);margin-top:11px;padding-top:9px;font-size:11px;color:var(--muted)}
@media(max-width:700px){.orders-desktop{display:none}.mobile-order-list{display:block}}

/* V1.0.3 - dynamic user permissions */
.permission-intro{display:flex;justify-content:space-between;align-items:center;gap:20px}.permission-intro p{margin:.35rem 0 0;color:var(--muted,#6b7280)}
.permission-role{display:flex;align-items:end;gap:16px;flex-wrap:wrap}.permission-role label{min-width:260px}.permission-role small{color:var(--muted,#6b7280);padding-bottom:10px}
.permission-form{display:grid;gap:16px}.permission-group{margin:0}.permission-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.permission-item{display:flex!important;align-items:flex-start!important;gap:10px;padding:12px;border:1px solid #e5e7eb;border-radius:10px;background:#fff;cursor:pointer}.permission-item:hover{background:#f9fafb}.permission-item input{width:18px;height:18px;margin-top:2px;flex:0 0 auto}.permission-item span{display:grid;gap:3px}.permission-item strong{font-size:14px}.permission-item small{font-size:12px;color:#6b7280;line-height:1.35}.permission-item em{font-size:11px;color:#94a3b8;font-style:normal}.permission-reset{margin-top:12px}
button[disabled],select[disabled],input[disabled],textarea[disabled]{opacity:.62;cursor:not-allowed}
@media(max-width:900px){.permission-grid{grid-template-columns:1fr}.permission-intro{align-items:flex-start;flex-direction:column}}

/* V1.0.4 - bộ lọc Đơn hàng gọn: bỏ khoảng ngày, tự lọc dropdown */
.order-filter-bar{align-items:center}
.order-filter-bar input[name=q]{min-width:260px;flex:1 1 260px;max-width:420px}
.order-filter-bar select{min-width:160px}
@media(max-width:600px){.order-filter-bar input[name=q],.order-filter-bar select,.order-filter-bar .btn{width:100%;max-width:none}}

/* V1.0.5 - Đơn hàng theo UI Mẫu 1: premium SaaS, chỉ đổi giao diện */
.page-orders{--orders-blue:#155eef;--orders-navy:#12213d;--orders-muted:#66758f;--orders-border:#e1e8f2;--orders-soft:#f7f9fc;--orders-shadow:0 10px 32px rgba(30,52,91,.075)}
.page-orders .topbar{height:58px;background:rgba(255,255,255,.96);border-bottom:1px solid #e9edf4;box-shadow:none}.page-orders .global-search-spacer{display:block;flex:1}.page-orders .content{padding:28px 30px 36px;background:#f7f9fc}.page-orders .orders-page-shell{max-width:1600px;margin:0 auto}.page-orders .page-head{align-items:center;margin-bottom:22px}.page-orders .page-head h1{font-size:30px;line-height:1.1;color:var(--orders-navy);font-weight:800;letter-spacing:-.7px}.page-orders .page-head p{font-size:14px;color:#71809a;margin-top:7px}.page-orders .page-actions{gap:10px}.page-orders .order-action-btn{height:44px;padding:0 16px;border-radius:10px;border-color:#dce3ee;background:#fff;color:#1b2942;box-shadow:0 2px 6px rgba(25,43,72,.025);gap:9px;font-weight:700}.page-orders .order-action-btn svg{width:18px;height:18px}.page-orders .order-action-btn:hover{border-color:#bfcbe0;background:#fbfcff;transform:translateY(-1px)}.page-orders .order-action-btn.primary{background:var(--orders-blue);border-color:var(--orders-blue);color:#fff;box-shadow:0 8px 20px rgba(21,94,239,.2)}.page-orders .order-action-btn.primary:hover{background:#0f52da;border-color:#0f52da}
.page-orders .order-filter-bar{display:grid;grid-template-columns:minmax(260px,1.45fr) repeat(4,minmax(165px,.8fr)) auto;gap:12px;align-items:center;padding:18px;background:#fff;border:1px solid var(--orders-border);border-radius:14px;box-shadow:var(--orders-shadow);margin-bottom:18px}.page-orders .order-search-control,.page-orders .order-filter-control{position:relative;display:flex;align-items:center;height:52px;min-width:0;border:1px solid #dbe3ee;border-radius:10px;background:#fff;transition:.18s}.page-orders .order-search-control:focus-within,.page-orders .order-filter-control:focus-within{border-color:#7aa3ff;box-shadow:0 0 0 3px rgba(21,94,239,.08)}.page-orders .order-search-control input,.page-orders .order-filter-control select{height:100%;width:100%;border:0!important;box-shadow:none!important;background:transparent!important;border-radius:10px;padding:0 38px 0 44px;color:#17233b;font-size:14px}.page-orders .order-search-control input::placeholder{color:#8b98ad}.page-orders .order-filter-control select{appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:36px;font-weight:600}.page-orders .order-control-icon{position:absolute;left:15px;display:flex;color:#13274b;z-index:1;pointer-events:none}.page-orders .order-control-icon svg{width:19px;height:19px}.page-orders .order-control-chevron{position:absolute;right:12px;display:flex;color:#2f405c;pointer-events:none}.page-orders .order-control-chevron svg{width:17px;height:17px}.page-orders .order-reset-btn{height:52px;gap:8px;padding:0 15px;border-radius:10px;border-color:#dbe3ee;background:#fff;color:var(--orders-blue);font-weight:700}.page-orders .order-reset-btn svg{width:19px;height:19px}.page-orders .order-reset-btn:hover{background:#f6f9ff;border-color:#bdcdf0}
.page-orders .orders-table-panel{padding:0;border:1px solid var(--orders-border);border-radius:14px;overflow:hidden;box-shadow:var(--orders-shadow);background:#fff}.page-orders .orders-table-panel .table-wrap{overflow:auto}.page-orders .order-data-table{min-width:1120px;border-collapse:separate;border-spacing:0}.page-orders .order-data-table th{position:sticky;top:0;z-index:2;height:58px;padding:0 16px;background:#fbfcfe;color:#53637e;border-bottom:1px solid var(--orders-border);font-size:11px;font-weight:800;letter-spacing:.45px;text-transform:uppercase}.page-orders .order-data-table td{height:66px;padding:10px 16px;border-bottom:1px solid #edf1f6;font-size:13px;color:#24324b;background:#fff}.page-orders .order-data-table tbody tr:last-child td{border-bottom:0}.page-orders .order-data-table tbody tr:hover td{background:#fbfdff}.page-orders .order-data-table .order-code{color:#155eef;font-weight:800;letter-spacing:.1px}.page-orders .order-data-table td>strong{font-weight:750;color:#15213a}.page-orders .order-data-table small{color:#77869f;line-height:1.3}.page-orders .order-data-table .num.strong{font-size:14px;color:#13213e;font-weight:800}.page-orders .order-date{display:flex;align-items:flex-start;gap:8px;white-space:nowrap;color:#52647f}.page-orders .order-date-icon{display:flex;margin-top:1px;color:#60769b}.page-orders .order-date-icon svg{width:17px;height:17px}.page-orders .order-date small{display:flex;align-items:center;gap:4px;margin-top:3px;font-size:11px}.page-orders .clock-mini{display:flex}.page-orders .clock-mini svg{width:13px;height:13px}.page-orders .order-more-btn{width:34px;height:34px;border:1px solid #dde5f0;background:#fff;color:#253654;border-radius:9px}.page-orders .order-more-btn:hover{border-color:#b8c7dc;background:#f7faff}.page-orders .order-more-btn svg{width:18px;height:18px}
.page-orders .status-select-shell,.page-orders .order-status-pill{position:relative;display:inline-flex;align-items:center;min-height:32px;border-radius:8px;border:1px solid transparent;font-weight:700;white-space:nowrap}.page-orders .status-select-shell{min-width:132px;padding-left:30px}.page-orders .status-select-shell.badge-green,.page-orders .order-status-pill.badge-green{background:#ecfbf2;color:#16864a;border-color:#ccefd9}.page-orders .status-select-shell.badge-blue,.page-orders .order-status-pill.badge-blue{background:#edf4ff;color:#155eef;border-color:#cfddff}.page-orders .status-select-shell.badge-amber,.page-orders .order-status-pill.badge-amber{background:#fff8e7;color:#d47b05;border-color:#ffe1aa}.page-orders .status-select-shell.badge-red,.page-orders .order-status-pill.badge-red{background:#fff0f1;color:#e0454f;border-color:#ffcfd3}.page-orders .status-select-shell.badge-gray,.page-orders .order-status-pill.badge-gray{background:#f1f4f8;color:#66758f;border-color:#dde4ed}.page-orders .status-select-icon{position:absolute;left:9px;display:flex;pointer-events:none}.page-orders .status-select-icon svg{width:16px;height:16px}.page-orders .status-select-shell .order-inline-select{min-width:130px;height:30px;border:0!important;box-shadow:none!important;background:transparent!important;color:inherit!important;font-size:12px;font-weight:800;padding:0 28px 0 0;appearance:none;-webkit-appearance:none;cursor:pointer}.page-orders .status-select-shell .status-select-chevron{position:absolute;right:7px;display:flex;pointer-events:none}.page-orders .status-select-shell .status-select-chevron svg{width:14px;height:14px}.page-orders .order-status-pill{gap:6px;padding:6px 9px;font-size:12px}.page-orders .order-status-pill>span{display:flex}.page-orders .order-status-pill svg{width:15px;height:15px}
.page-orders .carrier-select-shell,.page-orders .carrier-label{display:inline-flex;align-items:center;gap:8px;min-width:122px;position:relative}.page-orders .carrier-select-shell{padding-right:18px}.page-orders .carrier-icon{width:28px;height:28px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;border:1px solid currentColor}.page-orders .carrier-icon svg{width:16px;height:16px}.page-orders .carrier-orange{background:#fff6ea;color:#e67600}.page-orders .carrier-red{background:#fff0f1;color:#d93c48}.page-orders .carrier-green{background:#ecfbf2;color:#16864a}.page-orders .carrier-blue{background:#edf4ff;color:#155eef}.page-orders .order-carrier-select{height:32px;min-width:100px;border:0!important;background:transparent!important;box-shadow:none!important;padding:0 22px 0 0;font-size:12px;font-weight:700;appearance:none;-webkit-appearance:none}.page-orders .carrier-select-shell .status-select-chevron{right:0;position:absolute;display:flex;pointer-events:none}.page-orders .carrier-select-shell .status-select-chevron svg{width:14px;height:14px}.page-orders .orders-table-footer{min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 18px;border-top:1px solid var(--orders-border);color:#71809a;font-size:12px;background:#fff}.page-orders .orders-table-hint{color:#94a0b3}
@media(max-width:1300px){.page-orders .order-filter-bar{grid-template-columns:minmax(250px,1.4fr) repeat(2,minmax(170px,1fr))}.page-orders .order-reset-btn{width:100%}}
@media(max-width:900px){.page-orders .content{padding:18px}.page-orders .order-filter-bar{grid-template-columns:1fr 1fr}.page-orders .order-search-control{grid-column:1/-1}.page-orders .page-head{align-items:flex-start}.page-orders .page-actions{width:100%}.page-orders .page-actions .order-action-btn{flex:1}.page-orders .orders-table-hint{display:none}}
@media(max-width:600px){.page-orders .content{padding:12px}.page-orders .order-filter-bar{grid-template-columns:1fr;padding:12px}.page-orders .order-search-control{grid-column:auto}.page-orders .order-search-control,.page-orders .order-filter-control,.page-orders .order-reset-btn{height:48px}.page-orders .page-head h1{font-size:25px}.page-orders .page-actions{gap:6px}.page-orders .order-action-btn{padding:0 10px;font-size:12px}.page-orders .order-action-btn svg{width:16px;height:16px}.page-orders .orders-table-panel{border:0;box-shadow:none;background:transparent}.page-orders .orders-table-footer{display:none}}
.page-orders .order-search-control input[name=q]{min-width:0!important;max-width:none!important}

/* ================================================================
   V1.0.6 — UI Refresh toàn hệ thống theo Design System "Mẫu 1"
   PHẠM VI: CHỈ GIAO DIỆN. Không thay đổi DB / nghiệp vụ / quyền / API.
   ================================================================ */
:root{
  --bg:#f6f8fc;
  --panel:#ffffff;
  --text:#14213d;
  --muted:#71809a;
  --line:#e3e9f2;
  --brand:#155eef;
  --brand2:#2f6ff2;
  --sidebar:#182f5b;
  --danger:#e0454f;
  --green:#16864a;
  --amber:#d47b05;
  --blue:#155eef;
  --indigo:#6d4aff;
  --shadow:0 8px 28px rgba(30,52,91,.065);
  --shadow-soft:0 2px 10px rgba(30,52,91,.045);
  --radius:14px;
  --control-h:46px;
}
html,body{background:var(--bg);color:var(--text);font-size:14px}
body{letter-spacing:-.005em}
a{color:var(--brand)}

/* App shell / sidebar */
.sidebar{width:224px;background:linear-gradient(180deg,#1a315e 0%,#172b52 100%);padding:18px 12px;box-shadow:8px 0 24px rgba(17,35,68,.05)}
.main{margin-left:224px}
.brand{gap:10px;padding:0 4px}
.brand-mark{width:38px;height:38px;border-radius:10px;color:#17315f;font-size:13px;box-shadow:0 3px 10px rgba(0,0,0,.08)}
.brand strong{font-size:14px;letter-spacing:1.05px}
.brand small{font-size:10px;opacity:.58}
.sidebar nav{margin-top:24px;gap:4px}
.nav-link{min-height:42px;border-radius:9px;padding:10px 11px;gap:10px;color:#dbe6ff;font-size:13px;font-weight:600;transition:background .16s,color .16s,transform .16s}
.nav-link span{width:20px;font-size:14px;opacity:.9}
.nav-link:hover{background:rgba(255,255,255,.075);transform:translateX(1px)}
.nav-link.active{background:rgba(255,255,255,.14);box-shadow:inset 3px 0 0 #7ea7ff;color:#fff}
.sidebar-bottom{border-top-color:rgba(255,255,255,.1);padding-top:12px}
.user-mini{padding:8px 11px 10px}
.user-mini strong{font-size:13px}.user-mini small{font-size:10px}

/* Topbar */
.topbar{height:62px;padding:0 26px;background:rgba(255,255,255,.96);border-bottom:1px solid #e7ecf4;box-shadow:0 1px 0 rgba(20,33,61,.015)}
.global-search{max-width:510px}
.global-search input{height:42px;border-color:#dce4ef;border-radius:10px 0 0 10px;background:#fbfcfe;padding-left:14px}
.global-search button{height:42px;border-color:#dce4ef;border-radius:0 10px 10px 0;color:#42526d;background:#fbfcfe}
.top-user{font-weight:700;color:#23324c;font-size:13px}
.menu-btn{color:#1c3155}

/* Content / headings */
.content{padding:28px 30px 38px;max-width:1720px}
.page-head{align-items:center;margin-bottom:20px}
.page-head h1{font-size:29px;line-height:1.15;font-weight:800;letter-spacing:-.7px;color:#12213d}
.page-head p{font-size:13px;color:#75849d;margin-top:6px}
.page-actions{gap:9px}

/* Buttons */
.btn{min-height:42px;border-radius:10px;padding:0 14px;border:1px solid #dce4ef;background:#fff;color:#22324d;font-size:13px;font-weight:700;box-shadow:0 1px 3px rgba(20,33,61,.02);transition:.15s}
.btn:hover{background:#f9fbff;border-color:#becce0;transform:translateY(-1px)}
.btn.primary{background:#155eef;border-color:#155eef;color:#fff;box-shadow:0 7px 18px rgba(21,94,239,.18)}
.btn.primary:hover{background:#0f52da;border-color:#0f52da}
.btn.ghost{background:#fff;color:#4a5b75}
.btn.large{min-height:46px;padding:0 18px}
.link-btn{color:#155eef;font-weight:700}
.link-danger{color:#d83946;font-weight:700}

/* Panels */
.panel{border:1px solid #e3e9f2;border-radius:14px;box-shadow:var(--shadow);padding:18px;background:#fff;margin-bottom:18px}
.panel-head{margin-bottom:15px}.panel-head h3,.panel h3{font-size:15px;font-weight:800;color:#192842}
.panel-note{background:#f8faff;border:1px solid #e0e7f2;border-left:3px solid #9db8f1;border-radius:9px;color:#667791;padding:11px 13px}

/* Inputs / selects */
input,select,textarea{border:1px solid #dbe3ee;border-radius:10px;background:#fff;color:#17233b;padding:10px 12px;min-height:42px;transition:border-color .15s,box-shadow .15s}
input:hover,select:hover,textarea:hover{border-color:#c7d2e3}
input:focus,select:focus,textarea:focus{border-color:#7aa3ff;box-shadow:0 0 0 3px rgba(21,94,239,.08)}
input::placeholder,textarea::placeholder{color:#9aa6b8}

/* Generic filter bars — đồng bộ Mẫu 1 */
.filter-bar{gap:10px;align-items:center;padding:14px;background:#fff;border:1px solid #e2e8f1;border-radius:14px;box-shadow:var(--shadow-soft);margin-bottom:16px}
.filter-bar input,.filter-bar select{min-height:44px;border-radius:10px}
.filter-bar input[name=q]{min-width:260px}
.filter-bar .btn{min-height:44px}

/* Tables */
.table-wrap{border-radius:11px}
.data-table{border-collapse:separate;border-spacing:0}
.data-table th{height:50px;padding:0 12px;background:#fafbfd;color:#596983;border-bottom:1px solid #e4eaf2;font-size:10.5px;font-weight:800;letter-spacing:.42px}
.data-table td{padding:11px 12px;border-bottom:1px solid #edf1f6;font-size:12.5px;color:#273750;background:#fff}
.data-table tbody tr:last-child td{border-bottom:0}
.data-table tbody tr:hover td{background:#fbfdff}
.data-table .strong{font-weight:800;color:#172542}
.data-table small{color:#7c8ba2}
.order-code{color:#155eef;font-weight:800}
.empty{padding:36px!important;color:#8190a6}
.icon-btn{width:32px;height:32px;border:1px solid #e0e7f1;background:#f8faff;color:#263b60;border-radius:9px}

/* Badges/status */
.badge{padding:6px 9px;border-radius:8px;font-size:11px;font-weight:800;border:1px solid transparent}
.badge-green,.dot.badge-green{background:#ecfbf2;color:#16864a;border-color:#ccefd9}
.badge-blue,.dot.badge-blue{background:#edf4ff;color:#155eef;border-color:#cfddff}
.badge-amber,.dot.badge-amber{background:#fff8e7;color:#d47b05;border-color:#ffe1aa}
.badge-red,.dot.badge-red{background:#fff0f1;color:#e0454f;border-color:#ffcfd3}
.badge-gray,.dot.badge-gray{background:#f1f4f8;color:#66758f;border-color:#dde4ed}
.inline-select{border-radius:8px;font-size:11.5px;font-weight:800;min-height:32px}

/* Dashboard */
.kpi-grid{gap:14px}
.kpi{position:relative;overflow:hidden;border:1px solid #e3e9f2;border-top:1px solid #e3e9f2;border-radius:14px;padding:17px 18px;box-shadow:var(--shadow);background:#fff;min-height:118px}
.kpi:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#a5afc0}
.kpi.blue:before{background:#155eef}.kpi.indigo:before{background:#6d4aff}.kpi.green:before{background:#16864a}.kpi.red:before{background:#e0454f}.kpi.amber:before{background:#d47b05}
.kpi span,.kpi small{font-size:11.5px;color:#76849a}
.kpi strong{font-size:24px;color:#14213d;margin:9px 0 6px;font-weight:850}
.section-title{font-size:17px;font-weight:800;color:#172542;margin:25px 0 12px}
.alert-grid{gap:12px}
.alert-card{border:1px solid #e3e9f2;border-left:1px solid #e3e9f2;border-radius:13px;box-shadow:var(--shadow-soft);padding:16px;position:relative;overflow:hidden}
.alert-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#8795ab}
.alert-card.danger:before{background:#e0454f}.alert-card.warning:before{background:#d47b05}.alert-card.info:before{background:#155eef}.alert-card.muted:before{background:#8795ab}
.alert-card strong{font-size:25px;color:#172542}.alert-card span{color:#687891;font-weight:600}
.two-col{gap:16px}.bar-track{background:#eef2f7}.bar-track i{background:#3d71e8}
.trend-col i{background:linear-gradient(180deg,#155eef,#4f7ef2)}

/* Cards used in payments/shipping */
.mini-kpi-row,.carrier-cards{gap:12px}
.mini-kpi-row a,.carrier-cards a{border:1px solid #e3e9f2;border-radius:13px;padding:14px 15px;box-shadow:var(--shadow-soft);transition:.15s}
.mini-kpi-row a:hover,.carrier-cards a:hover{transform:translateY(-1px);border-color:#c9d6e9;box-shadow:var(--shadow)}

/* Tabs */
.tabs{gap:7px;margin-bottom:16px}
.tabs a{padding:9px 13px;border:1px solid #dde5ef;border-radius:9px;background:#fff;color:#50617b;font-size:12px;font-weight:700}
.tabs a:hover{background:#f8faff}
.tabs a.active{background:#155eef;color:#fff;border-color:#155eef;box-shadow:0 5px 14px rgba(21,94,239,.15)}

/* Forms */
.form-panel{max-width:1180px}
.form-section{padding:5px 0 22px;border-bottom:1px solid #e8edf4;margin-bottom:22px}
.form-section h3{font-size:15px;color:#1a2943;margin-bottom:15px}
.form-grid{gap:15px}.form-grid label,.stack-form label,.install-form label,.login-card label{color:#5e6e87;font-size:11.5px;font-weight:700}
.form-actions{gap:9px}.upload-box{border-color:#cbd7e8;background:#fafcff;border-radius:12px;color:#73829a}
.upload-box:hover{background:#f6f9ff;border-color:#8facdf}

/* Detail pages */
.detail-grid{gap:16px}.detail-list{gap:12px}.detail-list>div{padding:12px 13px;background:#f8faff;border:1px solid #edf1f6;border-radius:10px}
.detail-list dt{color:#7a889c;font-size:10px;font-weight:800}.detail-list dd{color:#23334e}
.big-money{color:#155eef}
.gallery{gap:13px}.image-card{border-color:#e2e8f1;border-radius:11px;box-shadow:var(--shadow-soft)}

/* Settings / permissions */
.settings-grid{gap:16px}
.simple-table td{padding:11px 7px;border-color:#edf1f6}
.status-row{gap:9px}.status-edit-grid{gap:16px}
.permission-item{border-color:#e1e8f2;border-radius:11px;background:#fff;padding:13px}
.permission-item:hover{background:#f8faff;border-color:#cbd8ea}
.permission-item input{accent-color:#155eef}
.permission-group{border-radius:14px}
.permission-role label{color:#5e6e87}

/* Alerts / severity */
.severity{border-radius:7px;padding:5px 7px;letter-spacing:.2px}
.severity.red{background:#fff0f1;color:#d93a46}.severity.orange{background:#fff4e8;color:#c96c00}.severity.yellow{background:#fff9df;color:#8a6b00}.severity.gray{background:#f1f4f8;color:#66758f}

/* Flash / toast */
.flash{border-radius:10px;padding:12px 14px;font-weight:650}
.flash.success{background:#ecfbf2;color:#167b46;border-color:#ccefd9}.flash.error{background:#fff0f1;color:#c63743;border-color:#ffcfd3}
.toast{background:#172b52;border-radius:10px;box-shadow:0 12px 34px rgba(23,43,82,.2)}

/* Login / installer — cùng design system */
.login-page,.install-page{background:radial-gradient(circle at 10% 10%,#f0f5ff 0,transparent 34%),linear-gradient(135deg,#f7f9fd,#eef3fb)}
.login-card,.install-wrap{border-color:#e1e8f2;border-radius:18px;box-shadow:0 24px 70px rgba(30,52,91,.13)}
.login-brand .brand-mark{background:#172f5c}.requirements{background:#f8faff;border-color:#e3e9f2}

/* Orders page: giữ UI Mẫu 1 nhưng đồng bộ với theme toàn hệ thống */
.page-orders .content{background:var(--bg)}
.page-orders .orders-page-shell{max-width:1680px}
.page-orders .order-filter-bar{box-shadow:var(--shadow-soft);border-color:#e2e8f1}
.page-orders .orders-table-panel{box-shadow:var(--shadow-soft)}
.page-orders .order-data-table th{background:#fafbfd}
.page-orders .orders-table-footer{background:#fbfcfe}

/* Mobile */
.mobile-order-card{border-color:#e2e8f1;border-radius:13px;box-shadow:var(--shadow-soft);padding:14px}
.mobile-order-foot{border-color:#edf1f6}

@media(max-width:1200px){
  .content{padding:24px}
}
@media(max-width:900px){
  .sidebar{width:224px}
  .main{margin-left:0}
  .content{padding:18px}
  .page-head h1{font-size:25px}
  .topbar{padding:0 16px}
}
@media(max-width:600px){
  .content{padding:12px}
  .page-head{margin-bottom:15px}
  .page-head h1{font-size:24px}
  .filter-bar{padding:11px}
  .panel{padding:13px;border-radius:12px}
  .kpi{min-height:105px;padding:14px}
  .kpi strong{font-size:20px}
}


/* =========================================================
   V1.0.7 — UI POLISH
   Chỉ tinh chỉnh presentation. Không thay nghiệp vụ / DB.
   ========================================================= */

/* Sidebar icons: một bộ line-icon thống nhất */
.nav-link .nav-svg{width:17px;height:17px;display:block;stroke-width:1.9}
.nav-link span{display:flex;align-items:center;justify-content:center}
.brand-mark{box-shadow:0 5px 16px rgba(9,25,58,.18)}

/* Dashboard: hierarchy rõ hơn, giảm cảm giác "ô Excel" */
.page-dashboard .kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.page-dashboard .kpi{min-height:112px;padding:16px 17px 15px;transition:transform .16s,border-color .16s,box-shadow .16s}
.page-dashboard .kpi:hover{transform:translateY(-1px);border-color:#d6e0ee;box-shadow:0 10px 28px rgba(30,52,91,.075)}
.kpi-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.kpi-top>span:first-child{font-weight:700;color:#74839a}
.kpi-icon{width:32px;height:32px;border-radius:9px;display:flex!important;align-items:center;justify-content:center;background:#f3f6fb;color:#64758f;border:1px solid #e7ecf4}
.kpi-icon svg{width:16px;height:16px}
.kpi.blue .kpi-icon{background:#edf4ff;color:#155eef;border-color:#dbe7ff}
.kpi.indigo .kpi-icon{background:#f1efff;color:#6d4aff;border-color:#e3ddff}
.kpi.green .kpi-icon{background:#ecfbf2;color:#16864a;border-color:#d7f2e1}
.kpi.red .kpi-icon{background:#fff0f1;color:#e0454f;border-color:#ffdbde}
.kpi.amber .kpi-icon{background:#fff8e7;color:#d47b05;border-color:#ffebc1}
.page-dashboard .kpi strong{font-size:23px;margin:8px 0 4px}
.page-dashboard .alert-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.page-dashboard .alert-card{min-height:88px;justify-content:center;padding:14px 16px 14px 18px}
.page-dashboard .alert-card strong{font-size:23px}
.page-dashboard .alert-card span{font-size:12px;line-height:1.35}
.page-dashboard .two-col{margin-top:16px}
.page-dashboard .two-col .panel{padding:16px 17px}
.page-dashboard .trend-chart{height:168px;padding-top:10px}
.page-dashboard .trend-col i{width:min(34px,64%)}
.page-dashboard .status-summary{gap:9px}
.page-dashboard .bar-list{gap:10px}
.page-dashboard .bar-track{height:7px}

/* Order form: rộng hơn, cân giữa, section rõ nhưng vẫn cùng workflow */
.page-order_form .content{max-width:1720px}
.page-order_form .page-head{max-width:1320px;margin-left:auto;margin-right:auto}
.order-form-panel{width:min(1320px,96%);max-width:1320px;margin:0 auto 20px;padding:22px 24px}
.order-form-panel .form-section{position:relative;padding:4px 0 24px;margin-bottom:24px}
.order-form-panel .form-section h3{display:flex;align-items:center;gap:9px;font-size:16px;margin-bottom:16px;color:#172642}
.order-form-panel .form-section h3:before{content:"";width:8px;height:8px;border-radius:50%;background:#155eef;box-shadow:0 0 0 5px #edf4ff}
.order-form-panel .form-grid{gap:16px 18px}
.order-form-panel .form-grid label{font-size:12px;color:#5d6d86}
.order-form-panel input,.order-form-panel select,.order-form-panel textarea{background:#fcfdff}
.order-form-panel input:focus,.order-form-panel select:focus,.order-form-panel textarea:focus{background:#fff}
.field-hint{display:inline;font-size:10px!important;font-weight:600!important;color:#99a5b5!important;margin-left:6px}
.legacy-stt-field input{background:#f7f9fc;color:#69778e}
.order-form-panel .form-actions{padding-top:2px}
.order-form-panel .upload-box{min-height:102px}

/* Reconciliation: dùng cùng ngôn ngữ bảng Đơn hàng */
.reconcile-panel{padding:0;overflow:hidden}
.reconcile-toolbar{margin:0;padding:13px 16px;background:#f8faff;border:0;border-bottom:1px solid #e6ecf4;border-radius:0;align-items:center;display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,240px) auto;gap:12px}
.reconcile-toolbar-copy{display:flex;flex-direction:column;gap:3px}
.reconcile-toolbar-copy strong{font-size:13px;color:#1d2c47}
.reconcile-toolbar-copy small{font-size:11px;color:#7b899f}
.reconcile-toolbar select{width:100%;min-width:0}
.reconcile-table{min-width:900px}
.reconcile-table th{height:48px}
.reconcile-table td{height:56px;padding-top:10px;padding-bottom:10px}
.reconcile-table .check-col{width:54px;text-align:center;padding-left:14px;padding-right:8px}
.table-check{appearance:none;-webkit-appearance:none;width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;margin:0!important;border:1.5px solid #b9c4d4!important;border-radius:5px!important;background:#fff!important;display:inline-grid!important;place-content:center;cursor:pointer;vertical-align:middle}
.table-check:before{content:"";width:9px;height:9px;transform:scale(0);transition:transform .1s ease;box-shadow:inset 1em 1em #fff;clip-path:polygon(14% 44%,0 59%,42% 100%,100% 16%,84% 0,40% 62%)}
.table-check:checked{background:#155eef!important;border-color:#155eef!important}
.table-check:checked:before{transform:scale(1)}
.reconcile-table .badge{min-width:112px;justify-content:center}

/* Settings: card cao theo nội dung, checkbox nhỏ gọn, danh sách rõ hơn */
.page-settings .settings-grid{align-items:start;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.page-settings .settings-card{align-self:start;margin-bottom:0}
.page-settings .stack-form{gap:10px}
.page-settings .stack-form .check{min-height:38px;padding:8px 10px;border:1px solid #e8edf4;border-radius:9px;background:#fafcff;color:#465872}
.page-settings .stack-form .check:hover{background:#f7faff;border-color:#d7e2f2}
.check input[type=checkbox]{width:17px!important;height:17px!important;min-height:17px!important;padding:0!important;accent-color:#155eef;flex:0 0 17px}
.telegram-settings-card .stack-form label:not(.check){margin-bottom:1px}
.carrier-settings-panel .inline-form{padding:12px;background:#f8faff;border:1px solid #e6ecf4;border-radius:11px;margin:13px 0 8px}
.carrier-settings-panel .simple-table td{height:48px;padding:9px 10px}
.carrier-settings-panel .simple-table tr:hover td{background:#fbfdff}
.carrier-settings-panel .simple-table td:nth-child(2){width:150px}
.carrier-settings-panel .simple-table td:last-child{width:70px}
.status-settings-panel .status-edit-grid>div{padding:14px;border:1px solid #e7ecf4;border-radius:11px;background:#fbfcfe}
.status-settings-panel .status-edit-grid h4{margin:0 0 10px;color:#263752}
.status-settings-panel .status-row{margin:7px 0}

/* Bảng chung / form: nhịp spacing đồng nhất hơn */
.data-table td{line-height:1.35}
.data-table th{line-height:1.2}
.simple-table{border-collapse:separate;border-spacing:0}
.simple-table tr:last-child td{border-bottom:0}

@media(max-width:1450px){
  .page-dashboard .alert-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:1200px){
  .page-dashboard .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .order-form-panel{width:100%}
  .reconcile-toolbar{grid-template-columns:1fr 220px}
  .reconcile-toolbar-copy{grid-column:1/-1}
}
@media(max-width:900px){
  .page-dashboard .alert-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-settings .settings-grid{grid-template-columns:1fr}
  .order-form-panel{padding:16px}
  .reconcile-toolbar{grid-template-columns:1fr}
}
@media(max-width:600px){
  .page-dashboard .kpi-grid,.page-dashboard .alert-grid{grid-template-columns:1fr}
  .order-form-panel{padding:13px}
  .field-hint{display:block;margin:3px 0 0}
}

/* =========================================================
   V1.0.8 — COMPACT LAYOUT
   UI-only: tối ưu mật độ hiển thị, gom các mục cùng hàng.
   Không thay nghiệp vụ / dữ liệu / database.
   ========================================================= */

/* Dashboard: gom KPI cùng một khung, giảm chiều cao và khoảng trắng */
.page-dashboard .content{padding-top:18px;padding-bottom:28px}
.page-dashboard .page-head{margin-bottom:12px;align-items:center}
.page-dashboard .page-head h1{font-size:27px}
.page-dashboard .page-head p{margin-top:3px}
.page-dashboard .kpi-grid{
  gap:0;
  overflow:hidden;
  border:1px solid #e3e9f2;
  border-radius:14px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}
.page-dashboard .kpi{
  min-height:86px;
  padding:11px 13px 10px;
  border:0;
  border-radius:0;
  box-shadow:inset -1px -1px 0 #edf1f6;
  background:#fff;
  transition:background .15s;
}
.page-dashboard .kpi:before{display:none}
.page-dashboard .kpi:hover{transform:none;box-shadow:inset -1px -1px 0 #e5ebf3;background:#fbfdff}
.page-dashboard .kpi-top{min-height:27px}
.page-dashboard .kpi-top>span:first-child{font-size:11px}
.page-dashboard .kpi-icon{width:27px;height:27px;border-radius:8px}
.page-dashboard .kpi-icon svg{width:14px;height:14px}
.page-dashboard .kpi strong{font-size:20px;margin:3px 0 1px;line-height:1.15}
.page-dashboard .kpi small{font-size:10.5px}
.page-dashboard .section-title{margin:15px 0 7px;font-size:15px}

/* Việc cần xử lý: một khung duy nhất thay vì nhiều card rời */
.page-dashboard .alert-grid{
  gap:0;
  overflow:hidden;
  border:1px solid #e3e9f2;
  border-radius:13px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}
.page-dashboard .alert-card{
  min-height:62px;
  padding:10px 13px;
  border:0;
  border-radius:0;
  box-shadow:inset -1px 0 0 #edf1f6;
  background:#fff;
  justify-content:center;
  transition:background .15s;
}
.page-dashboard .alert-card:before{display:none}
.page-dashboard .alert-card:hover{background:#f9fbff}
.page-dashboard .alert-card strong{font-size:20px;line-height:1}
.page-dashboard .alert-card span{font-size:10.8px;line-height:1.25;margin-top:4px}
.page-dashboard .alert-card.danger strong{color:#d83f4b}
.page-dashboard .alert-card.warning strong{color:#c87300}
.page-dashboard .alert-card.info strong{color:#155eef}
.page-dashboard .alert-card.muted strong{color:#62728b}

/* Dashboard charts/list: thấp hơn, ưu tiên thấy nhiều thông tin trong một màn hình */
.page-dashboard .two-col{gap:12px;margin-top:12px}
.page-dashboard .two-col .panel{padding:12px 14px;margin-bottom:0;border-radius:13px}
.page-dashboard .panel-head{margin-bottom:8px}
.page-dashboard .panel-head h3{font-size:13.5px}
.page-dashboard .trend-chart{height:128px;padding-top:5px}
.page-dashboard .trend-value{font-size:9px}
.page-dashboard .trend-col small{font-size:9px}
.page-dashboard .status-summary{gap:6px}
.page-dashboard .status-summary>div{font-size:11.5px}
.page-dashboard .bar-list{gap:7px}
.page-dashboard .bar-item>div:first-child{font-size:11.5px}
.page-dashboard .bar-track{height:6px;margin-top:4px}
.page-dashboard>.panel{margin-top:12px;margin-bottom:12px;padding:14px}

/* Form tạo/sửa đơn: một form compact, 12 cột, giảm tối đa cuộn dọc */
.page-order_form .content{padding-top:18px;max-width:1800px}
.page-order_form .page-head{max-width:1500px;margin:0 auto 12px;align-items:center}
.page-order_form .page-head h1{font-size:27px}
.page-order_form .page-head p{margin-top:3px}
.order-form-panel.compact-order-form{
  width:min(1500px,98%);
  max-width:1500px;
  margin:0 auto 16px;
  padding:15px 18px 12px;
  border-radius:14px;
}
.compact-form-grid{
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  gap:9px 11px;
  align-items:start;
}
.compact-form-grid .span-2{grid-column:span 2}
.compact-form-grid .span-3{grid-column:span 3}
.compact-form-grid .span-4{grid-column:span 4}
.compact-form-grid .span-5{grid-column:span 5}
.compact-form-grid .span-7{grid-column:span 7}
.compact-form-grid .span-12{grid-column:1/-1}
.compact-form-grid>label{
  display:block;
  min-width:0;
  font-size:11px;
  line-height:1.2;
  color:#5d6d86;
  font-weight:700;
}
.compact-form-grid>label>input,
.compact-form-grid>label>select,
.compact-form-grid>label>textarea{
  display:block;
  width:100%;
  margin-top:4px;
  min-height:38px;
  height:38px;
  padding:7px 10px;
  border-radius:8px;
  background:#fcfdff;
}
.compact-form-grid>label>textarea.compact-textarea{
  height:58px;
  min-height:58px;
  resize:vertical;
  line-height:1.35;
}
.compact-form-grid .legacy-stt-field input{background:#f7f9fc}
.compact-form-grid .field-hint{font-size:9px!important;margin-left:4px}
.compact-section-title{
  display:flex;
  align-items:baseline;
  gap:9px;
  padding:1px 0 2px;
  margin-top:1px;
  color:#172642;
}
.compact-section-title:not(:first-child){margin-top:4px;padding-top:8px;border-top:1px solid #edf1f6}
.compact-section-title strong{font-size:13.5px;font-weight:800;white-space:nowrap}
.compact-section-title strong:before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#155eef;box-shadow:0 0 0 3px #edf4ff;margin:0 8px 1px 1px}
.compact-section-title span{font-size:10.5px;color:#8a98ac;font-weight:500}
.compact-upload-label{margin-top:0}
.compact-upload-title{display:block;margin-bottom:4px}
.order-form-panel .upload-box.compact-upload{
  min-height:42px;
  height:42px;
  padding:7px 12px;
  border-width:1px;
  border-style:dashed;
  border-radius:8px;
  justify-content:flex-start;
  font-size:11px;
  background:#fafcff;
}
.compact-form-actions{
  position:sticky;
  bottom:8px;
  z-index:8;
  margin-top:10px;
  padding:9px 0 0;
  border-top:1px solid #edf1f6;
  background:linear-gradient(180deg,rgba(255,255,255,.88),#fff 35%);
  backdrop-filter:blur(6px);
}
.compact-form-actions .btn{min-height:38px;padding:0 14px}

/* Nhỏ gọn thêm các input trong trang form nhưng không ảnh hưởng trang khác */
.page-order_form .compact-order-form input:focus,
.page-order_form .compact-order-form select:focus,
.page-order_form .compact-order-form textarea:focus{background:#fff}

@media(max-width:1450px){
  .page-dashboard .alert-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media(max-width:1200px){
  .page-dashboard .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-dashboard .alert-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .compact-form-grid .span-2,.compact-form-grid .span-3,.compact-form-grid .span-4{grid-column:span 6}
  .compact-form-grid .span-5,.compact-form-grid .span-7{grid-column:span 6}
  .order-form-panel.compact-order-form{width:100%}
}
@media(max-width:900px){
  .page-dashboard .alert-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-dashboard .two-col{grid-template-columns:1fr}
  .compact-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .compact-form-grid .span-2,.compact-form-grid .span-3,.compact-form-grid .span-4,.compact-form-grid .span-5,.compact-form-grid .span-7{grid-column:span 1}
  .compact-form-grid .span-12{grid-column:1/-1}
  .compact-section-title{grid-column:1/-1!important}
}
@media(max-width:600px){
  .page-dashboard .kpi-grid,.page-dashboard .alert-grid{grid-template-columns:1fr}
  .compact-form-grid{grid-template-columns:1fr}
  .compact-form-grid .span-2,.compact-form-grid .span-3,.compact-form-grid .span-4,.compact-form-grid .span-5,.compact-form-grid .span-7,.compact-form-grid .span-12{grid-column:1/-1}
  .compact-section-title span{display:none}
  .order-form-panel.compact-order-form{padding:12px}
  .compact-form-actions{position:static;flex-direction:column}
}

/* =========================================================
   V1.0.9 — MODULE UI SYNC
   Đồng bộ Thanh toán / Vận chuyển / Đối soát / Cảnh báo / Khách hàng
   theo ngôn ngữ UI của tab Đơn hàng. UI-only, không đổi DB/nghiệp vụ.
   ========================================================= */
.module-page-shell{max-width:1680px;margin:0 auto}
.module-page-shell .page-head{margin-bottom:16px}
.module-page-shell .page-head h1{font-size:28px;letter-spacing:-.65px;color:#102142}
.module-page-shell .page-head p{font-size:13px;color:#7b899f}

/* Thanh công cụ: dùng lại cấu trúc của Đơn hàng */
.module-page-shell .order-filter-bar{display:grid;grid-template-columns:minmax(300px,1.55fr) minmax(220px,.9fr) auto;gap:10px;padding:14px 16px;background:#fff;border:1px solid #e2e8f1;border-radius:14px;box-shadow:var(--shadow-soft);margin-bottom:16px}
.module-page-shell .order-search-control,.module-page-shell .order-filter-control{position:relative;display:flex;align-items:center;height:50px;min-width:0;border:1px solid #dbe3ee;border-radius:10px;background:#fff;transition:.18s}
.module-page-shell .order-search-control:focus-within,.module-page-shell .order-filter-control:focus-within{border-color:#7aa3ff;box-shadow:0 0 0 3px rgba(21,94,239,.08)}
.module-page-shell .order-search-control input,.module-page-shell .order-filter-control select{height:100%;width:100%;border:0!important;box-shadow:none!important;background:transparent!important;border-radius:10px;padding:0 38px 0 44px;color:#17233b;font-size:14px}
.module-page-shell .order-search-control input::placeholder{color:#8b98ad}
.module-page-shell .order-filter-control select{appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:36px;font-weight:700}
.module-page-shell .order-control-icon{position:absolute;left:15px;display:flex;color:#13274b;z-index:1;pointer-events:none}
.module-page-shell .order-control-icon svg{width:18px;height:18px}
.module-page-shell .order-control-chevron{position:absolute;right:12px;display:flex;color:#2f405c;pointer-events:none}
.module-page-shell .order-control-chevron svg{width:16px;height:16px}
.module-page-shell .order-reset-btn{height:50px;gap:8px;padding:0 15px;border-radius:10px;border-color:#dbe3ee;background:#fff;color:#155eef;font-weight:800}
.module-page-shell .order-reset-btn svg{width:18px;height:18px}
.customer-filter-bar{grid-template-columns:minmax(360px,1fr) auto!important}

/* Summary: thay card cũ bằng strip gọn, cùng tinh thần Đơn hàng */
.module-summary-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px;margin:0 0 16px}
.module-summary-card{position:relative;display:flex;align-items:center;gap:11px;min-height:82px;padding:12px 14px;border:1px solid #e2e8f1;border-radius:12px;background:#fff;box-shadow:var(--shadow-soft);color:#24324b;transition:.15s}
.module-summary-card:hover{transform:translateY(-1px);border-color:#c9d6e9;box-shadow:0 9px 24px rgba(30,52,91,.08)}
.module-summary-card.active{border-color:#8eb0ff;box-shadow:0 0 0 3px rgba(21,94,239,.07)}
.module-summary-icon{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#edf4ff;color:#155eef;border:1px solid #dce7fb;flex:0 0 34px}
.module-summary-icon svg{width:17px;height:17px}
.module-summary-copy{display:flex;min-width:0;flex-direction:column;gap:2px}
.module-summary-copy small{font-size:11px;color:#77869f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.module-summary-copy strong{font-size:16px;color:#15213a}
.module-summary-copy b{font-size:11px;color:#66758f;font-weight:700}
.module-summary-card.badge-green .module-summary-icon{background:#ecfbf2;color:#16864a;border-color:#ccefd9}
.module-summary-card.badge-red .module-summary-icon{background:#fff0f1;color:#e0454f;border-color:#ffcfd3}
.module-summary-card.badge-amber .module-summary-icon{background:#fff8e7;color:#d47b05;border-color:#ffe1aa}
.module-summary-card.badge-blue .module-summary-icon{background:#edf4ff;color:#155eef;border-color:#cfddff}
.module-summary-card.badge-gray .module-summary-icon{background:#f1f4f8;color:#66758f;border-color:#dde4ed}

/* Bảng module: cùng kích thước, header, hover, pill, icon như Đơn hàng */
.module-table-panel{padding:0;border:1px solid #e2e8f1;border-radius:14px;overflow:hidden;box-shadow:var(--shadow-soft);background:#fff}
.module-page-shell .order-data-table{min-width:1080px;border-collapse:separate;border-spacing:0}
.module-page-shell .order-data-table th{height:56px;padding:0 16px;background:#fafbfd;color:#53637e;border-bottom:1px solid #e2e8f1;font-size:11px;font-weight:800;letter-spacing:.45px;text-transform:uppercase;white-space:nowrap}
.module-page-shell .order-data-table td{height:62px;padding:9px 16px;border-bottom:1px solid #edf1f6;font-size:13px;color:#24324b;background:#fff;vertical-align:middle}
.module-page-shell .order-data-table tbody tr:last-child td{border-bottom:0}
.module-page-shell .order-data-table tbody tr:hover td{background:#fbfdff}
.module-page-shell .order-data-table .order-code{color:#155eef;font-weight:800}
.module-page-shell .order-data-table td>strong{font-weight:750;color:#15213a}
.module-page-shell .order-data-table td>small,.module-page-shell .order-data-table strong+small{display:block;color:#8190a7;font-size:11px;margin-top:3px}
.module-page-shell .order-data-table .num.strong{font-size:14px;color:#13213e;font-weight:800}
.module-page-shell .orders-table-footer{min-height:50px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 18px;border-top:1px solid #e2e8f1;color:#71809a;font-size:12px;background:#fbfcfe}
.module-page-shell .orders-table-hint{color:#94a0b3}
.module-page-shell .order-more-btn{width:34px;height:34px;border:1px solid #dde5f0;background:#fff;color:#253654;border-radius:9px}
.module-page-shell .order-more-btn:hover{border-color:#b8c7dc;background:#f7faff}
.module-page-shell .order-more-btn svg{width:18px;height:18px}

/* Fix V1.0.9.1: icon Ngày/Giờ trong các module dùng bảng Đơn hàng
   Phải đặt kích thước SVG rõ ràng, nếu không browser dùng kích thước SVG mặc định rất lớn. */
.module-page-shell .order-date{display:flex;align-items:flex-start;gap:8px;white-space:nowrap;color:#52647f;line-height:1.25}
.module-page-shell .order-date>span:last-child{display:flex;flex-direction:column;min-width:0}
.module-page-shell .order-date-icon{display:flex;align-items:center;justify-content:center;width:17px;height:17px;flex:0 0 17px;margin-top:1px;color:#60769b}
.module-page-shell .order-date-icon svg{display:block;width:17px!important;height:17px!important;min-width:17px;min-height:17px;max-width:17px;max-height:17px}
.module-page-shell .order-date small{display:flex!important;align-items:center;gap:4px;margin-top:3px!important;font-size:11px!important;line-height:1.25;color:#8190a7}
.module-page-shell .clock-mini{display:flex;align-items:center;justify-content:center;width:13px;height:13px;flex:0 0 13px}
.module-page-shell .clock-mini svg{display:block;width:13px!important;height:13px!important;min-width:13px;min-height:13px;max-width:13px;max-height:13px}
.payment-page-shell .order-data-table td,.shipping-page-shell .order-data-table td{height:62px}

/* Premium status/carrier helpers ngoài tab Đơn hàng */
.module-page-shell .order-status-pill{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:5px 9px;border-radius:8px;border:1px solid transparent;font-size:12px;font-weight:800;white-space:nowrap}
.module-page-shell .order-status-pill>span{display:flex}.module-page-shell .order-status-pill svg{width:15px;height:15px}
.module-page-shell .order-status-pill.badge-green{background:#ecfbf2;color:#16864a;border-color:#ccefd9}
.module-page-shell .order-status-pill.badge-blue{background:#edf4ff;color:#155eef;border-color:#cfddff}
.module-page-shell .order-status-pill.badge-amber{background:#fff8e7;color:#d47b05;border-color:#ffe1aa}
.module-page-shell .order-status-pill.badge-red{background:#fff0f1;color:#e0454f;border-color:#ffcfd3}
.module-page-shell .order-status-pill.badge-gray{background:#f1f4f8;color:#66758f;border-color:#dde4ed}
.module-page-shell .status-select-shell{position:relative;display:inline-flex;align-items:center;min-height:32px;min-width:132px;padding-left:30px;border-radius:8px;border:1px solid transparent;font-weight:700;white-space:nowrap}
.module-page-shell .status-select-shell.badge-green{background:#ecfbf2;color:#16864a;border-color:#ccefd9}.module-page-shell .status-select-shell.badge-blue{background:#edf4ff;color:#155eef;border-color:#cfddff}.module-page-shell .status-select-shell.badge-amber{background:#fff8e7;color:#d47b05;border-color:#ffe1aa}.module-page-shell .status-select-shell.badge-red{background:#fff0f1;color:#e0454f;border-color:#ffcfd3}.module-page-shell .status-select-shell.badge-gray{background:#f1f4f8;color:#66758f;border-color:#dde4ed}
.module-page-shell .status-select-icon{position:absolute;left:9px;display:flex;pointer-events:none}.module-page-shell .status-select-icon svg{width:16px;height:16px}
.module-page-shell .status-select-shell .order-inline-select{min-width:130px;height:30px;border:0!important;box-shadow:none!important;background:transparent!important;color:inherit!important;font-size:12px;font-weight:800;padding:0 28px 0 0;appearance:none;-webkit-appearance:none;cursor:pointer}
.module-page-shell .status-select-shell .status-select-chevron{position:absolute;right:7px;display:flex;pointer-events:none}.module-page-shell .status-select-shell .status-select-chevron svg{width:14px;height:14px}
.module-page-shell .carrier-select-shell,.module-page-shell .carrier-label{display:inline-flex;align-items:center;gap:8px;min-width:122px;position:relative}
.module-page-shell .carrier-select-shell{padding-right:18px}.module-page-shell .carrier-icon{width:28px;height:28px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px;border:1px solid currentColor}.module-page-shell .carrier-icon svg{width:16px;height:16px}
.module-page-shell .carrier-orange{background:#fff6ea;color:#e67600}.module-page-shell .carrier-red{background:#fff0f1;color:#d93c48}.module-page-shell .carrier-green{background:#ecfbf2;color:#16864a}.module-page-shell .carrier-blue{background:#edf4ff;color:#155eef}
.module-page-shell .order-carrier-select{height:32px;min-width:100px;border:0!important;background:transparent!important;box-shadow:none!important;padding:0 22px 0 0;font-size:12px;font-weight:700;appearance:none;-webkit-appearance:none}.module-page-shell .carrier-select-shell .status-select-chevron{right:0;position:absolute;display:flex;pointer-events:none}.module-page-shell .carrier-select-shell .status-select-chevron svg{width:14px;height:14px}

/* Đối soát */
.module-bulk-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,280px) auto;align-items:center;gap:12px;padding:12px 16px;background:#f8faff;border-bottom:1px solid #e6ecf4}
.module-bulk-toolbar>div{display:flex;flex-direction:column;gap:2px}.module-bulk-toolbar strong{font-size:13px;color:#1d2c47}.module-bulk-toolbar small{font-size:11px;color:#7b899f}.module-bulk-toolbar .order-filter-control{height:42px}.module-bulk-toolbar .btn{min-height:42px}
.reconciliation-page-shell .reconcile-table{min-width:980px}.reconciliation-page-shell .reconcile-table .check-col{width:54px;text-align:center;padding-left:14px;padding-right:8px}

/* Cảnh báo */
.module-tabs-bar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:12px;background:#fff;border:1px solid #e2e8f1;border-radius:14px;box-shadow:var(--shadow-soft);margin-bottom:16px}
.module-tabs-bar a{min-height:58px;display:grid;grid-template-columns:32px 1fr auto;align-items:center;gap:9px;padding:8px 11px;border:1px solid #e4eaf2;border-radius:10px;color:#40516d;background:#fff;font-size:12px;font-weight:750}
.module-tabs-bar a:hover{background:#f8faff;border-color:#cfdaea}.module-tabs-bar a.active{border-color:#8eb0ff;background:#f4f8ff;box-shadow:0 0 0 3px rgba(21,94,239,.06);color:#17468f}
.module-tabs-bar a b{min-width:26px;height:24px;padding:0 7px;border-radius:99px;display:flex;align-items:center;justify-content:center;background:#eef3fa;color:#53637e;font-size:11px}
.tab-icon{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:#edf4ff;color:#155eef}.tab-icon svg{width:16px;height:16px}.tab-icon.warning{background:#fff8e7;color:#d47b05}.tab-icon.danger{background:#fff0f1;color:#e0454f}.tab-icon.muted{background:#f1f4f8;color:#66758f}
.module-info-strip{padding:10px 15px;background:#f8faff;border-bottom:1px solid #e7edf5;color:#6a7890;font-size:12px}
.alert-table-panel .severity{min-width:58px;justify-content:center;font-size:10px;letter-spacing:.35px}
.module-date-cell{display:flex;flex-direction:column;color:#35465f}.module-date-cell small{color:#8794a8;font-size:11px;margin-top:2px}.field-chip{display:inline-flex;padding:5px 8px;border:1px solid #dfe7f1;background:#f8faff;border-radius:7px;color:#586a84;font-size:11px;font-weight:700}

/* Khách hàng */
.customer-data-table{min-width:1000px!important}.customer-address{max-width:420px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.count-chip{display:inline-flex;min-width:32px;height:28px;align-items:center;justify-content:center;padding:0 9px;border-radius:8px;background:#edf4ff;color:#155eef;font-weight:800}.money-warning{color:#d84a54;font-weight:800}.customer-profile-strip{display:grid;grid-template-columns:1fr 2.3fr .7fr 1.1fr 1.1fr;gap:0;margin-bottom:16px;border:1px solid #e2e8f1;border-radius:14px;background:#fff;box-shadow:var(--shadow-soft);overflow:hidden}.customer-profile-strip>div{min-height:78px;padding:13px 16px;border-right:1px solid #edf1f6;display:flex;flex-direction:column;justify-content:center}.customer-profile-strip>div:last-child{border-right:0}.customer-profile-strip small{font-size:11px;color:#7b899f;margin-bottom:4px}.customer-profile-strip strong{font-size:14px;color:#17233b}.customer-profile-strip .customer-address-wide strong{font-weight:650}.text-danger{color:#d84a54!important}.module-section-head{padding:14px 16px 8px}.module-section-head h3{margin:0;font-size:15px}.module-section-head p{margin:3px 0 0;color:#8390a4;font-size:11px}

@media(max-width:1200px){.module-page-shell .module-summary-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.module-tabs-bar{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-profile-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.customer-profile-strip>div{border-bottom:1px solid #edf1f6}.module-bulk-toolbar{grid-template-columns:1fr 240px}.module-bulk-toolbar>div{grid-column:1/-1}}
@media(max-width:900px){.module-page-shell .order-filter-bar{grid-template-columns:1fr 1fr}.module-page-shell .order-search-control{grid-column:1/-1}.customer-filter-bar{grid-template-columns:1fr!important}.module-tabs-bar{grid-template-columns:1fr 1fr}.module-page-shell .orders-table-hint{display:none}.module-bulk-toolbar{grid-template-columns:1fr}.customer-profile-strip{grid-template-columns:1fr}}
@media(max-width:600px){.module-page-shell .order-filter-bar{grid-template-columns:1fr;padding:12px}.module-page-shell .order-search-control{grid-column:auto}.module-page-shell .order-search-control,.module-page-shell .order-filter-control,.module-page-shell .order-reset-btn{height:46px}.module-summary-strip{grid-template-columns:1fr}.module-tabs-bar{grid-template-columns:1fr}.module-page-shell .page-head h1{font-size:25px}.module-page-shell .orders-table-footer{display:none}}

/* === V1.1 Large Data Architecture === */
.large-data-page .ajax-panel{position:relative;min-height:180px}
.ajax-hidden-form{display:none!important}
.ajax-loading{position:absolute;z-index:20;top:12px;right:14px;display:none;align-items:center;gap:8px;padding:7px 10px;border-radius:999px;background:rgba(20,34,62,.92);color:#fff;font-size:11px;font-weight:700;box-shadow:0 8px 24px rgba(15,35,70,.14)}
.ajax-loading.show{display:flex}.ajax-loading span{width:12px;height:12px;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:nnspin .7s linear infinite}@keyframes nnspin{to{transform:rotate(360deg)}}
.ajax-busy [data-ajax-results]{opacity:.58;pointer-events:none;transition:opacity .12s ease}.ajax-results-inner{min-width:0}
.server-pager{min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 16px;border-top:1px solid #e6ecf4;background:#fbfcfe;color:#6d7d96;font-size:12px}
.server-pager-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.ajax-latency{color:#9aa7b9;font-size:10px}.server-pager-actions{display:flex;align-items:center;gap:8px}.server-pager-actions label{display:flex;align-items:center;gap:7px;white-space:nowrap}.server-pager-actions select{height:34px;min-width:70px;border:1px solid #dce4ef;border-radius:8px;background:#fff;padding:0 26px 0 10px;color:#33445f}.pager-btn{min-height:34px;padding:6px 11px}.pager-btn:disabled{opacity:.42;cursor:not-allowed}
.server-hint{padding:7px 16px 10px;background:#fbfcfe;border-top:0;color:#93a0b3;font-size:11px}
.inline-select.is-saving{opacity:.62;cursor:progress}.large-data-page .data-table tbody tr{content-visibility:auto;contain-intrinsic-size:62px}
@media(max-width:700px){.server-pager{align-items:flex-start;flex-direction:column}.server-pager-actions{width:100%;justify-content:space-between;flex-wrap:wrap}.server-pager-summary{width:100%}}

/* === V1.1.2 — QUICK PASTE ORDER === */
.quick-paste-panel{
  width:min(1500px,98%);max-width:1500px;margin:0 auto 10px;padding:12px 14px;
  border:1px solid #dbe5f2;border-radius:12px;background:linear-gradient(180deg,#fff,#fbfdff);
  box-shadow:0 5px 18px rgba(25,48,86,.045)
}
.quick-paste-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:8px}
.quick-paste-head>div{min-width:0;display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.quick-paste-head strong{font-size:13px;color:#172642;font-weight:850}
.quick-paste-head small{font-size:10.5px;color:#8290a6}
.quick-paste-badge{display:inline-flex;align-items:center;height:25px;padding:0 9px;border-radius:999px;background:#edf4ff;border:1px solid #cfe0ff;color:#155eef;font-size:9px;font-weight:900;letter-spacing:.45px;white-space:nowrap}
.quick-paste-panel textarea{display:block;width:100%;height:44px;min-height:44px;max-height:100px;padding:10px 12px;border:1px solid #cfdbea;border-radius:8px;background:#fff;color:#1c2c49;font-size:12px;line-height:1.4;resize:vertical;outline:0}
.quick-paste-panel textarea:focus{border-color:#7ea7ff;box-shadow:0 0 0 3px rgba(21,94,239,.07)}
.quick-paste-panel textarea:disabled{opacity:.7;cursor:progress}
.quick-paste-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:7px}
.quick-paste-meta>span{min-width:0;color:#7a889e;font-size:9.5px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quick-paste-meta .btn{min-height:30px;height:30px;padding:0 10px;font-size:10.5px;white-space:nowrap}
.quick-paste-status{margin-top:5px;min-height:16px;color:#8b98ab;font-size:10px}
.quick-paste-status.is-busy{color:#155eef}.quick-paste-status.is-ok{color:#16864a}.quick-paste-status.is-error{color:#d33d49;font-weight:700}
@media(max-width:900px){.quick-paste-panel{width:100%}.quick-paste-meta{align-items:flex-start;flex-direction:column}.quick-paste-meta>span{white-space:normal}.quick-paste-meta .btn{align-self:flex-end}}
@media(max-width:600px){.quick-paste-head{align-items:flex-start}.quick-paste-head>div{display:block}.quick-paste-head small{display:block;margin-top:3px}.quick-paste-badge{display:none}.quick-paste-panel textarea{height:64px;min-height:64px}.quick-paste-meta .btn{width:100%}}

/* V1.1.3 Admin delete + Telegram diagnostics + global log */
.btn.danger{background:#fff0f1;border-color:#ffcfd3;color:#c63743}.btn.danger:hover{background:#ffe5e8;border-color:#ffb8bf}.btn.danger svg{width:16px;height:16px;margin-right:6px}.inline-delete-order{display:inline-flex;margin:0}.telegram-toggle-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px}.telegram-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.telegram-actions form{margin:0}.telegram-health{margin-top:12px;padding:10px 12px;border:1px solid var(--line);background:#f8faff;border-radius:9px;display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--muted)}.telegram-health small{width:100%;color:#b13a43}.audit-order-link{font-weight:800;color:#155eef}.audit-event-pill{display:inline-flex;padding:4px 7px;border-radius:7px;background:#f1f5ff;color:#3457a6;font-weight:700;font-size:11px}.audit-deleted{color:#c63743}.audit-value{max-width:320px;white-space:normal;word-break:break-word}.audit-meta{font-size:11px;color:var(--muted)}@media(max-width:700px){.telegram-toggle-grid{grid-template-columns:1fr}}

.admin-danger-zone{display:flex;justify-content:space-between;align-items:center;gap:18px;border-color:#ffd3d7;background:#fffafa}.admin-danger-zone div{display:flex;flex-direction:column;gap:3px}.admin-danger-zone small{color:var(--muted)}.admin-danger-zone form{margin:0}@media(max-width:700px){.admin-danger-zone{align-items:stretch;flex-direction:column}.admin-danger-zone .btn{width:100%}}

/* === V1.1.4 — DUPLICATE ORDER WARNING === */
body.modal-open{overflow:hidden}
.duplicate-warning-panel{margin:0 0 18px;padding:16px;border:1px solid #fecaca;background:#fff7f7;border-radius:12px;box-shadow:0 10px 28px rgba(127,29,29,.06)}
.duplicate-warning-title{display:flex;gap:12px;align-items:flex-start}.duplicate-warning-title strong{display:block;font-size:17px;color:#991b1b}.duplicate-warning-title small{display:block;margin-top:3px;color:#7f1d1d}
.duplicate-warning-icon{width:34px;height:34px;border-radius:10px;background:#fee2e2;color:#dc2626;display:grid;place-items:center;flex:none}.duplicate-warning-icon svg{width:18px;height:18px}
.duplicate-warning-list{display:grid;gap:8px;margin-top:12px}.duplicate-warning-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:10px 12px;background:#fff;border:1px solid #fee2e2;border-radius:10px}.duplicate-warning-item strong{display:block;color:#172554}.duplicate-warning-item small{display:block;margin-top:2px;color:#64748b}.duplicate-reasons{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.duplicate-reason{display:inline-flex;align-items:center;min-height:24px;padding:2px 8px;border-radius:999px;background:#fff1f2;border:1px solid #fecdd3;color:#be123c;font-size:11px;font-weight:800;white-space:nowrap}.duplicate-warning-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:14px}.duplicate-note{display:block;margin-top:8px;color:#94a3b8;text-align:right}
.duplicate-modal-backdrop{position:fixed;inset:0;z-index:9999;background:rgba(15,23,42,.46);backdrop-filter:blur(2px);display:grid;place-items:center;padding:18px}.duplicate-modal{width:min(720px,96vw);max-height:min(760px,90vh);overflow:auto;background:#fff;border-radius:16px;border:1px solid #e2e8f0;box-shadow:0 28px 80px rgba(15,23,42,.24);padding:18px}.duplicate-modal-head{display:flex;gap:12px;align-items:flex-start;padding-bottom:14px;border-bottom:1px solid #eef2f7}.duplicate-modal-head strong{display:block;font-size:20px;color:#0f172a}.duplicate-modal-head small{display:block;margin-top:4px;line-height:1.45;color:#64748b}.duplicate-modal-icon{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#fee2e2;color:#dc2626;font-size:21px;font-weight:900;flex:none}.duplicate-modal-list{display:grid;gap:10px;margin:14px 0}.duplicate-modal-group{border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;background:#f8fafc}.duplicate-modal-customer{padding:10px 12px;background:#fff;border-bottom:1px solid #e2e8f0}.duplicate-modal-customer strong,.duplicate-modal-customer small{display:block}.duplicate-modal-customer strong{color:#0f172a}.duplicate-modal-customer small{margin-top:2px;color:#64748b}.duplicate-modal-match{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:9px 12px;border-top:1px solid #edf2f7}.duplicate-modal-match:first-of-type{border-top:0}.duplicate-modal-match a,.duplicate-modal-match strong{display:block;font-weight:800;color:#1d4ed8;text-decoration:none}.duplicate-modal-match small{display:block;margin-top:2px;color:#64748b}.duplicate-modal-actions{display:flex;justify-content:flex-end;gap:9px;padding-top:14px;border-top:1px solid #eef2f7}
@media(max-width:720px){.duplicate-warning-item,.duplicate-modal-match{grid-template-columns:1fr}.duplicate-reasons{justify-content:flex-start}.duplicate-warning-actions,.duplicate-modal-actions{flex-direction:column-reverse}.duplicate-warning-actions .btn,.duplicate-modal-actions .btn{width:100%}.duplicate-note{text-align:left}}
