:root{--navy:#0b1f3a;--navy2:#102b4f;--blue:#2563eb;--blue2:#1d4ed8;--sky:#eff6ff;--ink:#172033;--muted:#68758a;--line:#e6ebf2;--bg:#f3f6fb;--white:#fff;--green:#16a34a;--orange:#f59e0b;--red:#dc2626;--shadow:0 14px 35px rgba(24,39,75,.08)}
*{box-sizing:border-box}.pima-ot-wrap{position:relative;display:grid;grid-template-columns:250px minmax(0,1fr);width:100vw;min-height:100vh;margin-left:calc(50% - 50vw);background:var(--bg);color:var(--ink);font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif}.pima-sidebar{position:sticky;top:0;height:100vh;background:linear-gradient(180deg,var(--navy),#071426);color:#fff;padding:28px 18px;display:flex;flex-direction:column;z-index:5}.pima-brand{display:flex;align-items:center;gap:12px;padding:0 8px 28px}.pima-brand-mark{width:44px;height:44px;border-radius:13px;background:linear-gradient(135deg,#3b82f6,#60a5fa);display:grid;place-items:center;font-weight:1000;font-size:24px;box-shadow:0 10px 24px rgba(37,99,235,.35)}.pima-brand strong{display:block;font-size:22px;letter-spacing:.5px}.pima-brand small{display:block;color:#93a9c5;font-size:10px;letter-spacing:1.3px;margin-top:2px}.pima-nav{display:grid;gap:8px}.pima-nav span{padding:13px 14px;border-radius:12px;color:#b8c7da;font-size:14px}.pima-nav .active{background:rgba(255,255,255,.1);color:#fff}.pima-side-note{margin-top:auto;padding:15px;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);border-radius:14px}.pima-side-note b,.pima-side-note small{display:block}.pima-side-note small{margin-top:6px;color:#9db0c8;line-height:1.45}.pima-main{min-width:0;padding:26px 30px 40px}.pima-topbar{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:18px}.pima-kicker{font-size:11px;color:var(--blue);font-weight:900;letter-spacing:1.5px}.pima-topbar h1{font-size:30px;line-height:1.15;margin:5px 0 7px;color:var(--ink);font-weight:900}.pima-topbar p{margin:0;color:var(--muted)}.pima-actions{display:flex;gap:9px;flex-wrap:wrap}.pima-btn{border:0;border-radius:11px;padding:11px 15px;font-weight:850;font-size:14px;cursor:pointer;text-decoration:none!important;display:inline-flex;justify-content:center;align-items:center;gap:6px;transition:.18s ease;white-space:nowrap}.pima-btn:hover{transform:translateY(-1px)}.pima-btn-primary{background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff!important;box-shadow:0 8px 18px rgba(37,99,235,.24)}.pima-btn-light{background:#fff;color:#334155!important;border:1px solid var(--line);box-shadow:0 3px 9px rgba(15,23,42,.03)}.pima-btn-dark{background:var(--navy);color:#fff}.pima-btn-ai{background:#7c3aed;color:#fff}.pima-alerts{margin:0 0 18px}.pima-ok{background:#ecfdf3;border:1px solid #bbf7d0;color:#166534;padding:6px 6px;border-radius:14px;font-weight:800}.alert-title{font-size:15px;font-weight:950;color:#991b1b;margin-bottom:10px}.alert-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.alert-item{border:1px solid #fecaca;background:linear-gradient(145deg,#fff,#fff1f2);border-radius:14px;padding:13px;text-align:left;cursor:pointer;box-shadow:0 5px 14px rgba(220,38,38,.06)}.alert-item b,.alert-item span,.alert-item em{display:block}.alert-item b{font-size:14px}.alert-item span{color:#64748b;margin:5px 0;font-size:13px}.alert-item em{color:#dc2626;font-style:normal;font-weight:900;font-size:12px}.pima-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.pima-stat{position:relative;background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 18px 16px;box-shadow:var(--shadow);overflow:hidden}.pima-stat:after{content:"";position:absolute;right:-15px;bottom:-24px;width:82px;height:82px;border-radius:50%;background:#eff6ff}.pima-stat span{font-size:13px;color:var(--muted);font-weight:750}.pima-stat strong{display:block;font-size:30px;line-height:1;margin-top:10px;font-weight:950;position:relative;z-index:1}.pima-stat:nth-child(2) strong{color:#c2410c}.pima-stat:nth-child(3) strong{color:#15803d}.pima-stat:nth-child(4) strong{color:#dc2626}.pima-panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow)}.pima-filterbar{display:grid;grid-template-columns:minmax(260px,1fr) 220px auto;gap:10px;margin-bottom:14px}.pima-filterbar input,.pima-filterbar select,.pima-grid input,.pima-grid select,.pima-grid textarea{width:100%;border:1px solid var(--line);border-radius:11px;padding:12px 13px;font-size:14px;background:#fff;outline:none}.pima-filterbar input:focus,.pima-grid input:focus,.pima-grid select:focus,.pima-grid textarea:focus{border-color:#93c5fd;box-shadow:0 0 0 3px #dbeafe}.pima-table-wrap{overflow:auto;border:1px solid #edf1f6;border-radius:13px}.pima-table{width:100%;border-collapse:collapse;min-width:930px}.pima-table th,.pima-table td{padding:14px 12px;border-bottom:1px solid #edf1f6;text-align:left;vertical-align:middle}.pima-table th{background:#f8fafc;font-size:11px;text-transform:uppercase;letter-spacing:.45px;color:#6b778b;position:sticky;top:0}.pima-table tbody tr:hover{background:#f8fbff}.badge{display:inline-block;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:950}.badge.producing{background:#fff7ed;color:#9a3412}.badge.done{background:#ecfdf5;color:#166534}.is-warning{background:#fffaf0!important}.is-overdue{background:#fff1f2!important}.text-danger{color:var(--red);font-weight:950}.icon-btn{border:1px solid var(--line);background:#fff;border-radius:9px;padding:7px 10px;cursor:pointer;font-weight:800}.icon-btn:hover{border-color:#93c5fd;background:#eff6ff}.icon-btn.danger{color:var(--red)}.empty{text-align:center!important;color:var(--muted);padding:38px!important}.pima-cards{display:none}.pima-modal{position:fixed;inset:0;background:rgba(2,10,23,.7);display:none;align-items:center;justify-content:center;padding:16px;z-index:99999;backdrop-filter:blur(4px)}.pima-modal.show{display:flex}.pima-modal-card{background:#fff;border-radius:20px;width:min(780px,100%);max-height:92vh;overflow:auto;padding:24px;position:relative;box-shadow:0 28px 80px rgba(2,10,23,.3)}.pima-modal-card h2{margin:0 0 16px;font-size:24px}.pima-close{position:absolute;right:16px;top:12px;border:0;background:#f1f5f9;width:36px;height:36px;border-radius:50%;font-size:25px;cursor:pointer}.pima-ai-box{background:linear-gradient(135deg,#f5f3ff,#eff6ff);border:1px solid #c4b5fd;border-radius:15px;padding:15px;display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center}.pima-ai-box p{margin:4px 0 0;color:#64748b;font-size:13px}.pima-upload{background:#fff;border:1px dashed #7c3aed;border-radius:10px;padding:10px 13px;font-weight:850;cursor:pointer}.pima-ai-status{min-height:24px;color:#166534;font-weight:750;margin:9px 0}.pima-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.pima-grid label{font-weight:850;font-size:13px;color:#334155}.pima-grid input,.pima-grid select,.pima-grid textarea{margin-top:6px;font-weight:500}.pima-full{grid-column:1/-1}.pima-form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.pima-login-note{padding:20px;background:#fff7ed;border-radius:12px}.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.card-grid span{font-size:11px;color:var(--muted)}.card-grid strong{display:block;color:var(--ink);font-size:13px;margin-top:4px}.card-head,.card-foot{display:flex;justify-content:space-between;align-items:center;gap:10px}.pima-card h3{margin:12px 0;font-size:17px}
@media(max-width:1100px){.pima-ot-wrap{grid-template-columns:88px minmax(0,1fr)}.pima-sidebar{padding:22px 12px}.pima-brand{justify-content:center;padding:0 0 24px}.pima-brand div,.pima-nav span:not(.active),.pima-nav .active b,.pima-side-note{display:none}.pima-nav .active{display:grid;place-items:center;font-size:22px;padding:14px}.alert-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.pima-ot-wrap{display:block;width:100%;margin:0;min-height:100vh}.pima-sidebar{display:none}.pima-main{padding:14px 10px 88px}.pima-topbar{align-items:flex-start;flex-direction:column;padding:8px 3px 0}.pima-topbar h1{font-size:25px}.pima-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.pima-actions #pima-add-btn{grid-column:1/-1}.pima-actions .pima-btn{width:100%}.alert-list{grid-template-columns:1fr}.pima-stats{grid-template-columns:1fr 1fr;gap:10px}.pima-stat{padding:15px}.pima-stat strong{font-size:26px}.pima-panel{padding:11px;border-radius:15px}.pima-filterbar{grid-template-columns:1fr}.pima-table-wrap{display:none}.pima-cards{display:grid;gap:10px}.pima-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;box-shadow:0 5px 16px rgba(24,39,75,.05)}.pima-ai-box{grid-template-columns:1fr 1fr}.pima-ai-box>div{grid-column:1/-1}.pima-grid{grid-template-columns:1fr}.pima-full{grid-column:auto}.pima-modal-card{padding:19px 15px}.pima-form-actions .pima-btn{flex:1}.card-grid{grid-template-columns:repeat(3,1fr)}}
/* WordPress admin embedded app */
body.wp-admin #wpcontent{padding-left:0}
body.wp-admin #wpbody-content{padding-bottom:0}
body.wp-admin .pima-admin-app .pima-ot-wrap{width:100%;min-height:calc(100vh - 32px);margin:0}
body.wp-admin .pima-admin-app .pima-sidebar{top:32px;height:calc(100vh - 32px)}
body.wp-admin .pima-admin-app .pima-main{padding-top:24px}
@media(max-width:782px){body.wp-admin #wpcontent{padding-left:0}body.wp-admin .pima-admin-app .pima-ot-wrap{min-height:calc(100vh - 46px)}body.wp-admin .pima-admin-app .pima-sidebar{top:46px;height:calc(100vh - 46px)}}

/* v1.4 - nhập ảnh đơn hàng nổi bật */
.pima-btn-camera{background:#0f766e!important;color:#fff!important;border-color:#0f766e!important;box-shadow:0 8px 20px rgba(15,118,110,.22)}
.pima-btn-camera:hover{background:#115e59!important}
.pima-image-preview{display:flex;align-items:center;gap:14px;margin:12px 0 16px;padding:12px;border:1px solid #d7e4ee;border-radius:16px;background:#f8fbfd}
.pima-image-preview[hidden]{display:none!important}
.pima-image-preview img{width:92px;height:92px;object-fit:cover;border-radius:12px;border:1px solid #dce5eb;background:#fff}
.pima-image-preview div{display:flex;flex-direction:column;gap:5px;min-width:0}
.pima-image-preview strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:320px}
.pima-image-preview small{color:#667085;line-height:1.45}
@media(max-width:640px){.pima-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px}.pima-actions .pima-btn{width:100%;justify-content:center}.pima-btn-camera{grid-column:1/-1}.pima-image-preview{align-items:flex-start}.pima-image-preview img{width:78px;height:78px}}
/* v1.6 - đơn hàng lớn, ghi chú khách và chi tiết Excel */
.pima-big-note textarea{min-height:130px;background:#fffdf2;border-color:#f1d98a!important}
.pima-items-section{margin-top:18px;border:1px solid #dfe7f1;border-radius:16px;padding:15px;background:#f8fafc}
.pima-items-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:10px}.pima-items-head h3{margin:0;font-size:18px}.pima-items-head p{margin:5px 0 0;color:#64748b}.pima-items-actions{display:flex;gap:8px;flex-wrap:wrap}
.pima-items-table-wrap{overflow:auto;border:1px solid #e2e8f0;border-radius:12px;background:#fff}.pima-items-table{width:100%;border-collapse:collapse;min-width:900px}.pima-items-table th,.pima-items-table td{padding:8px;border-bottom:1px solid #edf2f7;vertical-align:top}.pima-items-table th{background:#eef3f8;text-align:left;font-size:11px;text-transform:uppercase;color:#64748b}.pima-items-table input,.pima-items-table select,.pima-items-table textarea{width:100%;box-sizing:border-box;border:1px solid #dbe3ec;border-radius:8px;padding:8px;background:#fff}.pima-items-table textarea{min-height:54px}.pima-items-table .num{min-width:90px}.pima-items-table .unit{min-width:70px}.pima-items-table .remaining{font-weight:900;color:#b91c1c;background:#fff7f7}
.pima-item-summary{display:block;margin-top:5px;font-size:11px;font-weight:800;color:#0f766e}.pima-item-summary.muted{color:#94a3b8;font-weight:600}
@media(max-width:800px){.pima-items-head{flex-direction:column}.pima-items-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.pima-items-actions .pima-btn{width:100%}}
/* v1.7 - gửi Zalo và biểu tượng thời gian chuyên nghiệp */
.pima-btn-zalo{background:linear-gradient(135deg,#1188ff,#0068ff)!important;color:#fff!important;border-color:#0068ff!important;box-shadow:0 8px 20px rgba(0,104,255,.22)}
.pima-btn-zalo:hover{filter:brightness(.96)}
.alert-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:10px}.alert-head p{margin:4px 0 0;color:#7f1d1d;font-size:13px}.alert-title{margin:0!important}
.alert-item small{display:block;margin-top:5px;color:#475569;font-weight:800}
.time-chip{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:950;white-space:nowrap}.time-chip.done{background:#dcfce7;color:#166534}.time-chip.overdue,.time-chip.today{background:#fee2e2;color:#b91c1c}.time-chip.warning{background:#ffedd5;color:#c2410c}.time-chip.normal{background:#e0f2fe;color:#075985}
.pima-row-actions{white-space:nowrap;min-width:225px}.pima-row-actions .icon-btn{margin:2px}
.pima-share-modal{position:fixed;inset:0;background:rgba(2,10,23,.72);display:none;align-items:center;justify-content:center;padding:16px;z-index:100000;backdrop-filter:blur(5px)}.pima-share-modal.show{display:flex}.pima-share-card{position:relative;width:min(720px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:22px;padding:24px;box-shadow:0 30px 90px rgba(2,10,23,.34)}.pima-share-title{display:flex;align-items:flex-start;gap:12px;padding-right:36px}.pima-share-title>span{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#e8f3ff;font-size:24px}.pima-share-title h2{margin:0;font-size:23px}.pima-share-title p{margin:5px 0 16px;color:#64748b}.pima-share-card textarea{width:100%;box-sizing:border-box;min-height:340px;padding:16px;border:1px solid #cbd5e1;border-radius:14px;background:#f8fafc;resize:vertical;font-family:inherit;font-size:14px;line-height:1.55;outline:none}.pima-share-card textarea:focus{border-color:#60a5fa;box-shadow:0 0 0 3px #dbeafe}.pima-share-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}.pima-copy-status{margin-top:12px;padding:11px 13px;border-radius:11px;background:#eff6ff;color:#1e40af;font-weight:750;font-size:13px}
@media(max-width:800px){.alert-head{align-items:stretch;flex-direction:column}.alert-head .pima-btn{width:100%}.pima-share-card{padding:20px 15px}.pima-share-actions{display:grid;grid-template-columns:1fr}.pima-share-actions .pima-btn{width:100%}.pima-share-card textarea{min-height:300px}.pima-row-actions{white-space:normal}.pima-actions{grid-template-columns:1fr 1fr!important}.pima-actions #pima-add-btn,.pima-actions #pima-share-all{grid-column:1/-1}}

/* v1.11 - Phiếu giao hàng */
.pima-delivery-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(135deg,#effaf4,#eef6ff);border:1px solid #cfe8dc;border-radius:18px;padding:6px 6px;margin-bottom:14px}.pima-delivery-toolbar small{display:block;color:#64748b;margin-top:2px}.pima-btn-delivery{background:#087f5b!important;color:#fff!important}.pima-delivery-card{max-width:760px}.pima-delivery-options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}.pima-delivery-options label{border:1px solid #dbe3ef;border-radius:13px;padding:13px;background:#f8fafc;font-weight:700;cursor:pointer}.pima-delivery-field{display:block;font-weight:750;margin:12px 0;color:#334155}.pima-delivery-field input,.pima-delivery-field textarea{width:100%;box-sizing:border-box;border:1px solid #dbe3ef;border-radius:12px;padding:12px;margin-top:7px;font:inherit}.pima-delivery-selected{background:#f8fafc;border:1px dashed #b8c5d8;border-radius:13px;padding:12px;line-height:1.6;margin:12px 0;max-height:180px;overflow:auto}.pima-card-check{display:none;font-size:12px;background:#e8f7f0;border-radius:999px;padding:5px 9px}.pima-table th:first-child,.pima-table td:first-child{width:38px;text-align:center}.pima-delivery-check{width:18px;height:18px;accent-color:#087f5b}
@media(max-width:760px){.pima-delivery-toolbar{align-items:stretch;flex-direction:column}.pima-delivery-options{grid-template-columns:1fr}.pima-card-check{display:inline-flex;align-items:center;gap:5px}.pima-table-wrap{display:none}.pima-share-actions{flex-wrap:wrap}.pima-share-actions .pima-btn{flex:1 1 45%}}
/* v1.12 - Nút giao hàng cạnh Gửi SX và phiếu nhiều đơn */
.pima-row-actions{white-space:nowrap}.pima-row-actions .icon-btn{margin:2px}.pima-delivery-one{background:#e8f7f0!important;border-color:#a8dfc8!important;color:#087f5b!important;font-weight:800}.pima-delivery-selected-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}.pima-delivery-selected-title small{color:#64748b}.pima-delivery-selected-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(280px,2fr);align-items:center;gap:12px;padding:10px 0;border-top:1px solid #e4eaf2}.pima-delivery-selected-row:first-of-type{border-top:0}.pima-delivery-selected-row div{display:flex;flex-direction:column;gap:3px}.pima-delivery-selected-row span,.pima-delivery-selected-row small{color:#64748b}.pima-delivery-selected-row input{width:100%;box-sizing:border-box;border:1px solid #cfd9e7;border-radius:11px;padding:11px;font:inherit}.card-foot>div{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end}
@media(max-width:760px){.pima-delivery-selected-row{grid-template-columns:1fr}.pima-delivery-selected-title{align-items:flex-start;flex-direction:column}.card-foot>div{justify-content:flex-start}.pima-delivery-one{width:auto}}

/* v1.13 - Phiếu giao hàng đúng mẫu bảng */
.pima-delivery-form-row{border:1px solid #e0e7ef;border-radius:14px;padding:12px;margin:10px 0;background:#fff}.pima-delivery-form-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}.pima-delivery-form-head span{font-size:12px;color:#64748b}.pima-delivery-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.pima-delivery-form-grid label{font-size:12px;font-weight:700;color:#334155}.pima-delivery-form-grid input{width:100%;margin-top:5px;border:1px solid #cbd5e1;border-radius:9px;padding:9px;font-size:13px;box-sizing:border-box}@media(max-width:760px){.pima-delivery-form-grid{grid-template-columns:1fr}.pima-delivery-form-head{align-items:flex-start;flex-direction:column}}

.pima-delivery-top-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.pima-delivery-grid-head,.pima-delivery-grid-row{display:grid;grid-template-columns:1.35fr 1.15fr 1fr .9fr 1.7fr;gap:7px;align-items:center}.pima-delivery-grid-head{background:#f79a05;color:#111;font-weight:800;padding:9px;border-radius:10px 10px 0 0;font-size:12px;text-align:center}.pima-delivery-grid-row{padding:8px;border:1px solid #e2e8f0;border-top:0;background:#fff}.pima-delivery-grid-row input,.pima-delivery-grid-row select,.pima-delivery-grid-row textarea{width:100%;min-width:0;border:1px solid #cbd5e1;border-radius:8px;padding:9px 8px;background:#fff}.pima-delivery-grid-row b,.pima-delivery-grid-row small{display:block}.pima-delivery-grid-row small{color:#64748b;margin-top:2px}@media(max-width:900px){.pima-delivery-top-fields{grid-template-columns:1fr}.pima-delivery-grid-head{display:none}.pima-delivery-grid-row{grid-template-columns:1fr 1fr}.pima-delivery-grid-row>div{grid-column:1/-1}.pima-delivery-grid-row input,.pima-delivery-grid-row select,.pima-delivery-grid-row textarea{font-size:14px}.pima-delivery-grid-row .pima-delivery-note-row{grid-column:1/-1}}

/* v1.14 - Hoàn thành giao hàng tách riêng và thu gọn */
.badge.completed{background:#e8fff1;color:#087443;border:1px solid #b7efcf}.pima-completed-section{margin-top:16px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);overflow:hidden}.pima-completed-toggle{width:100%;border:0;background:linear-gradient(135deg,#f0fdf4,#f8fafc);padding:17px 19px;display:flex;align-items:center;justify-content:space-between;gap:18px;text-align:left;cursor:pointer;color:var(--ink)}.pima-completed-toggle span:first-child{display:grid;gap:4px}.pima-completed-toggle b{font-size:16px}.pima-completed-toggle small{color:var(--muted);font-size:12px}.pima-completed-count{white-space:nowrap;color:#166534;font-weight:800}.pima-completed-count strong{font-size:21px}.pima-completed-count i{display:inline-block;margin-left:8px;font-style:normal;transition:.2s}.pima-completed-toggle.open .pima-completed-count i{transform:rotate(180deg)}.pima-completed-content{padding:0 16px 16px}.completed-card{background:#f7fff9!important}
@media(max-width:700px){.pima-completed-toggle{align-items:flex-start;padding:15px}.pima-completed-toggle small{line-height:1.4}.pima-completed-content{padding:0 10px 10px}}

/* v1.15 - Sale đổi trực tiếp 3 trạng thái ngay tại cột Trạng thái */
.pima-status-direct{min-width:165px;max-width:100%;border:1px solid transparent;border-radius:999px;padding:8px 30px 8px 11px;font-size:11px;font-weight:950;cursor:pointer;outline:none;appearance:auto}.pima-status-direct.producing{background:#fff7ed;color:#9a3412;border-color:#fed7aa}.pima-status-direct.done{background:#ecfdf5;color:#166534;border-color:#bbf7d0}.pima-status-direct.completed{background:#e8fff1;color:#087443;border-color:#b7efcf}.pima-status-direct:focus{box-shadow:0 0 0 3px #dbeafe;border-color:#60a5fa}.pima-status-direct.saving{opacity:.6;cursor:wait}
@media(max-width:700px){.pima-status-direct{min-width:0;width:100%;font-size:12px;padding:9px 28px 9px 10px}}

/* v1.17 - Kế hoạch sản xuất theo mẫu bảng PIMA */
.pima-status-direct.waiting{background:#fffbea;color:#8a5a00;border-color:#facc15}.pima-btn-plan,.pima-plan-one{background:linear-gradient(135deg,#ffe600,#ffcc00)!important;color:#111!important;border-color:#e5b800!important;font-weight:900!important}.pima-plan-card{width:min(900px,100%);border-top:6px solid #ffd500}.pima-plan-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:2px 0 16px}.pima-plan-summary span{background:#fffbea;border:1px solid #f4d54a;border-radius:13px;padding:11px 13px}.pima-plan-summary small{display:block;color:#786300;font-size:11px;font-weight:800;text-transform:uppercase;margin-bottom:4px}.pima-plan-summary b{font-size:14px;color:#111}.pima-plan-grid-template{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.pima-plan-grid-template label{font-weight:850;color:#263238}.pima-plan-grid-template input,.pima-plan-grid-template select,.pima-plan-grid-template textarea{width:100%;box-sizing:border-box;margin-top:7px;border:1px solid #cbd5e1;border-radius:12px;padding:12px 13px;background:#fff;font:inherit;outline:none}.pima-plan-grid-template input:focus,.pima-plan-grid-template select:focus,.pima-plan-grid-template textarea:focus{border-color:#e8bd00;box-shadow:0 0 0 3px rgba(255,213,0,.22)}.pima-plan-grid-template textarea{min-height:100px;resize:vertical}.pima-plan-highlight{background:#fffbea;border:1px solid #f4d54a;border-radius:15px;padding:13px}.pima-plan-highlight textarea{background:#fffef5}.pima-plan-one{white-space:nowrap}
@media(max-width:760px){.pima-plan-summary,.pima-plan-grid-template{grid-template-columns:1fr}.pima-plan-card{padding:18px 14px}.pima-plan-summary{gap:7px}.pima-plan-grid-template input,.pima-plan-grid-template select,.pima-plan-grid-template textarea{font-size:16px}.pima-plan-highlight{padding:10px}}


/* v1.19 - Tạo tài khoản và phân quyền ngay trên giao diện */
.pima-account-panel{margin:0 0 16px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);overflow:hidden}.pima-account-panel summary{list-style:none;cursor:pointer;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;background:linear-gradient(135deg,#eff6ff,#fffbea)}.pima-account-panel summary::-webkit-details-marker{display:none}.pima-account-panel summary span{display:grid;gap:4px}.pima-account-panel summary b{font-size:16px}.pima-account-panel summary small{color:var(--muted)}.pima-account-panel summary strong{white-space:nowrap;color:#1d4ed8}.pima-account-content{padding:16px 18px 18px}.pima-account-notice{margin-bottom:12px;padding:11px 13px;border-radius:11px;background:#ecfdf5;color:#166534;font-weight:800}.pima-account-form{display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) auto;gap:10px;align-items:end}.pima-account-form label{font-size:12px;font-weight:850;color:#334155}.pima-account-form input,.pima-account-form select{width:100%;box-sizing:border-box;margin-top:6px;border:1px solid #cbd5e1;border-radius:11px;padding:11px 12px;background:#fff;font:inherit}.pima-account-list{margin-top:18px;padding-top:16px;border-top:1px solid #e2e8f0}.pima-account-list h3{margin:0 0 11px}.pima-account-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.pima-account-item{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid #e2e8f0;border-radius:13px;background:#f8fafc}.pima-account-item>span{font-size:22px}.pima-account-item div{display:grid;gap:3px;min-width:0}.pima-account-item b,.pima-account-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pima-account-item small{color:#64748b}
@media(max-width:1100px){.pima-account-form{grid-template-columns:repeat(2,minmax(0,1fr))}.pima-account-form .pima-btn{grid-column:1/-1}.pima-account-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.pima-account-panel summary{align-items:flex-start}.pima-account-content{padding:13px}.pima-account-form,.pima-account-grid{grid-template-columns:1fr}.pima-account-panel summary strong{font-size:12px}}


/* v1.20 - Danh sách gọn, khách hàng một dòng, đơn mới nhất ở trên */
.pima-table{table-layout:fixed;min-width:1120px}
.pima-table th,.pima-table td{padding:10px 8px;white-space:nowrap}
.pima-table th:nth-child(1),.pima-table td:nth-child(1){width:38px}
.pima-table th:nth-child(2),.pima-table td:nth-child(2){width:105px}
.pima-table th:nth-child(3),.pima-table td:nth-child(3){width:155px}
.pima-table th:nth-child(4),.pima-table td:nth-child(4){width:145px}
.pima-table th:nth-child(5),.pima-table td:nth-child(5),.pima-table th:nth-child(6),.pima-table td:nth-child(6){width:105px}
.pima-table th:nth-child(7),.pima-table td:nth-child(7){width:82px}
.pima-table th:nth-child(8),.pima-table td:nth-child(8){width:82px}
.pima-table th:nth-child(9),.pima-table td:nth-child(9){width:390px}
.pima-customer-cell{overflow:hidden}
.pima-customer-name{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:800}
.pima-status-direct{min-width:132px;width:132px;padding:7px 24px 7px 9px}
.pima-row-actions .icon-btn{padding:6px 8px;font-size:12px}
.pima-card-customer{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pima-completed-section .pima-table th:nth-child(1),.pima-completed-section .pima-table td:nth-child(1){width:110px;text-align:left}
.pima-completed-section .pima-table th:nth-child(2),.pima-completed-section .pima-table td:nth-child(2){width:180px}
.pima-completed-section .pima-table th:nth-child(3),.pima-completed-section .pima-table td:nth-child(3){width:145px}
.pima-completed-section .pima-table th:nth-child(4),.pima-completed-section .pima-table td:nth-child(4),.pima-completed-section .pima-table th:nth-child(5),.pima-completed-section .pima-table td:nth-child(5){width:110px}
.pima-completed-section .pima-table th:nth-child(6),.pima-completed-section .pima-table td:nth-child(6){width:85px}
.pima-completed-section .pima-table th:nth-child(7),.pima-completed-section .pima-table td:nth-child(7){width:180px}


/* v1.21.0 - Thông báo tin nhắn chưa đọc ngay trên nút Trao đổi */
.pima-chat-one{position:relative;display:inline-flex!important;align-items:center;gap:5px;white-space:nowrap}
.pima-chat-one.has-unread{border-color:#ef4444!important;background:#fff5f5!important;color:#b91c1c!important;font-weight:800!important;padding-right:9px!important}
.pima-chat-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#e11d48;color:#fff;font-size:11px;font-weight:900;line-height:1;box-shadow:0 0 0 2px #fff}
.pima-chat-one.has-unread .pima-chat-badge{animation:pimaChatPulse 1.8s ease-in-out infinite}
@keyframes pimaChatPulse{0%,100%{transform:scale(1);box-shadow:0 0 0 2px #fff}50%{transform:scale(1.08);box-shadow:0 0 0 4px rgba(225,29,72,.15)}}

/* v1.22.1 - Bảng gọn nhưng vẫn xem đủ tên khách */
.pima-table th,.pima-table td{padding:10px 8px;font-size:12px;line-height:1.25}
.pima-table th{font-size:10px}
.pima-table td:nth-child(2),.pima-table th:nth-child(2){width:110px;max-width:110px;white-space:nowrap}
.pima-table td:nth-child(2) b{font-size:12px;font-weight:850}
.pima-customer-cell{min-width:155px;max-width:240px}
.pima-customer-name{display:block;font-size:12px;line-height:1.25;white-space:normal;overflow:visible;text-overflow:clip;word-break:break-word}
.pima-row-actions .icon-btn{padding:6px 8px;font-size:11px}
@media(max-width:800px){.pima-card h3.pima-card-customer{font-size:14px;line-height:1.3}.card-head b{font-size:13px}}
/* v1.22.3 - Mẫu kế hoạch sản xuất theo bảng Excel */
.pima-plan-card{width:min(1480px,98vw)!important;max-height:94vh;overflow:auto}.pima-production-sheet-wrap{overflow:auto;border:1px solid #64748b;border-radius:8px;margin:12px 0;background:#fff}.pima-production-sheet{border-collapse:collapse;width:100%;min-width:1320px;font-size:12px;color:#111}.pima-production-sheet th,.pima-production-sheet td{border:1px solid #64748b;padding:8px 7px;vertical-align:middle}.pima-production-sheet th{background:#dbe5f5;text-align:center;font-weight:800;white-space:nowrap}.pima-production-sheet td:nth-child(1){min-width:130px;font-weight:700}.pima-production-sheet td:nth-child(2){width:45px;text-align:center;font-weight:700}.pima-production-sheet td:nth-child(3){min-width:115px}.pima-production-sheet td:nth-child(4){min-width:330px}.pima-production-sheet td:nth-child(5),.pima-production-sheet td:nth-child(6){text-align:center;min-width:75px}.pima-production-sheet td:nth-child(7),.pima-production-sheet td:nth-child(8),.pima-production-sheet td:nth-child(9),.pima-production-sheet td:nth-child(10),.pima-production-sheet td:nth-child(11){text-align:center;min-width:90px}.pima-production-sheet .pima-postpone-cell{min-width:260px;text-align:center;font-weight:800;color:#dc2626;white-space:pre-wrap}.pima-plan-input-row{display:grid;grid-template-columns:1fr 1fr 1fr 2.2fr;gap:12px;align-items:start}.pima-plan-input-row label{font-weight:800;font-size:13px}.pima-plan-input-row input,.pima-plan-input-row select,.pima-plan-input-row textarea{width:100%;margin-top:6px;border:1px solid #cbd5e1;border-radius:8px;padding:10px;background:#fff}.pima-plan-postpone-field textarea{color:#dc2626;font-weight:800}@media(max-width:800px){.pima-plan-input-row{grid-template-columns:1fr}.pima-plan-card{width:99vw!important}}

/* v1.22.4 - Kế hoạch sản xuất theo mẫu Excel */
.pima-plan-top-fields{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:10px;align-items:end;margin:10px 0}.pima-plan-top-fields label{font-weight:800;font-size:13px}.pima-plan-top-fields input{width:100%;box-sizing:border-box;margin-top:6px;border:1px solid #cbd5e1;border-radius:8px;padding:10px;background:#fff}.pima-production-sheet-edit{min-width:1780px}.pima-production-sheet-edit th,.pima-production-sheet-edit td{padding:5px}.pima-production-sheet-edit input,.pima-production-sheet-edit textarea{width:100%;min-width:70px;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:5px;padding:7px;font:inherit;background:#fff}.pima-production-sheet-edit textarea{resize:vertical;min-width:300px}.pima-production-sheet-edit .plan-customer-cell{min-width:160px;font-weight:800;background:#f8fafc}.pima-production-sheet-edit .plan-code{min-width:105px}.pima-production-sheet-edit .plan-type{min-width:95px}.pima-production-sheet-edit .plan-unit{min-width:75px}.pima-production-sheet-edit .plan-qty{min-width:78px;text-align:center}.plan-remove-row{border:0;background:#fee2e2;color:#b91c1c;border-radius:7px;width:28px;height:28px;font-weight:900;cursor:pointer}.pima-plan-input-row-full{grid-template-columns:1fr 1fr 1fr 2fr 2fr}.pima-plan-input-row-full textarea{min-height:78px}@media(max-width:900px){.pima-plan-top-fields,.pima-plan-input-row-full{grid-template-columns:1fr}.pima-plan-top-fields .pima-btn{width:100%}}

/* v1.22.5 - Xuất lệnh sản xuất theo mẫu Excel; mã hàng mặc định bằng mã đơn */
.pima-production-sheet .plan-code{font-weight:700;text-align:center}

/* Don giao hom nay / ngay mai */
.pima-delivery-reminders{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.pima-reminder-box{background:#fff;border:1px solid #dce4ee;border-radius:12px;box-shadow:0 5px 16px rgba(15,23,42,.05);overflow:hidden;min-width:0}
.pima-reminder-head{display:flex;align-items:center;justify-content:space-between;padding:6px 6px;background:#f8fafc;border-bottom:1px solid #e5e7eb}
.pima-reminder-head b{display:block;font-size:13px;white-space:nowrap}.pima-reminder-head small{display:block;color:#64748b;margin-top:2px}.pima-reminder-head strong{background:#dc2626;color:#fff;border-radius:999px;padding:3px 7px;font-size:11px;white-space:nowrap}
.tomorrow-box .pima-reminder-head strong{background:#ea580c}.dayafter-box .pima-reminder-head strong{background:#2563eb}.ready-box{grid-column:1/-1}.ready-box .pima-reminder-head strong{background:#16a34a}.pima-reminder-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:7px 8px;border-bottom:1px solid #edf2f7}.pima-reminder-actions label{font-weight:700;font-size:11px;margin-right:auto}.pima-reminder-actions .pima-btn{padding:6px 7px;font-size:10px}
.pima-reminder-table-wrap{max-height:205px;overflow:auto}.pima-reminder-table{width:100%;border-collapse:collapse;font-size:11px;table-layout:fixed}.pima-reminder-table th,.pima-reminder-table td{padding:6px 6px;border-bottom:1px solid #edf2f7;text-align:left}.pima-reminder-table th{position:sticky;top:0;background:#eef5ff;z-index:1}.pima-reminder-table th:first-child,.pima-reminder-table td:first-child{width:26px;text-align:center}.pima-reminder-table th:last-child,.pima-reminder-table td:last-child{width:78px;white-space:nowrap}
@media(max-width:900px){.pima-delivery-reminders{grid-template-columns:1fr}.ready-box{grid-column:auto}.pima-reminder-actions label{width:100%;margin-right:0}.pima-reminder-table{min-width:560px}}


/* v1.22.11 - Giao diện một trang, không kéo ngang, danh sách 15 đơn */
html{scroll-behavior:smooth}
.pima-ot-wrap{width:100%;max-width:100%;margin-left:0;overflow-x:hidden}
.pima-main{width:100%;max-width:100%;overflow-x:hidden;padding:18px 18px 32px}
.pima-topbar{align-items:flex-start;gap:14px}.pima-topbar h1{font-size:clamp(22px,2vw,31px)}
.pima-actions{gap:7px}.pima-actions .pima-btn{padding:9px 10px;font-size:11px}
.pima-stats{gap:9px}.pima-stat{padding:13px 14px}
.pima-panel{overflow:hidden}
.pima-filterbar{gap:8px}.pima-filterbar input{min-width:0}
.pima-list-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 13px;border-bottom:1px solid #e5e7eb;background:#f8fafc}
.pima-list-heading b,.pima-list-heading small{display:block}.pima-list-heading b{font-size:14px}.pima-list-heading small{margin-top:3px;color:#64748b;font-size:11px}.pima-list-heading>span{flex:none;padding:5px 9px;border-radius:999px;background:#e0ecff;color:#1d4ed8;font-weight:800;font-size:11px}
.pima-table-wrap{width:100%;max-width:100%;overflow-x:hidden}
.pima-table{width:100%!important;min-width:0!important;table-layout:fixed}
.pima-table th,.pima-table td{padding:8px 5px!important;font-size:10.5px!important;white-space:normal;overflow:hidden;vertical-align:middle}
.pima-table th{font-size:9px!important;letter-spacing:.15px}
.pima-table th:nth-child(1),.pima-table td:nth-child(1){width:3%}
.pima-table th:nth-child(2),.pima-table td:nth-child(2){width:8%!important;max-width:none!important}
.pima-table th:nth-child(3),.pima-table td:nth-child(3){width:13%}
.pima-table th:nth-child(4),.pima-table td:nth-child(4){width:11%}
.pima-table th:nth-child(5),.pima-table td:nth-child(5){width:9%}
.pima-table th:nth-child(6),.pima-table td:nth-child(6){width:9%}
.pima-table th:nth-child(7),.pima-table td:nth-child(7){width:7%}
.pima-table th:nth-child(8),.pima-table td:nth-child(8){width:6%}
.pima-table th:nth-child(9),.pima-table td:nth-child(9){width:34%}
.pima-customer-cell{min-width:0!important;max-width:none!important}.pima-customer-name{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;word-break:normal!important;font-size:11px!important}
.pima-status-direct{width:100%!important;min-width:0!important;padding:6px 18px 6px 5px!important;font-size:10px!important}
.pima-row-actions{white-space:normal!important}.pima-row-actions .icon-btn{display:inline-flex;align-items:center;margin:2px 1px;padding:5px 6px!important;font-size:9.5px!important;line-height:1.1;white-space:nowrap}
.pima-show-more-wrap{display:flex;justify-content:center;padding:12px;border-top:1px solid #e5e7eb;background:#fbfdff}.pima-show-more-wrap[hidden]{display:none!important}.pima-show-more{border:1px solid #2563eb;background:#eff6ff;color:#1d4ed8;border-radius:10px;padding:10px 18px;font-weight:850;cursor:pointer}.pima-show-more:hover{background:#dbeafe}
.pima-modal-card{max-width:min(1100px,96vw);max-height:94vh;overflow-y:auto;overscroll-behavior:contain}.pima-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.pima-grid .pima-full{grid-column:1/-1}
#locked-date,#delivery-date{font-weight:800;border-color:#93c5fd;background:#f8fbff}
@media(max-width:1250px){.pima-ot-wrap{grid-template-columns:190px minmax(0,1fr)}.pima-sidebar{padding:20px 12px}.pima-nav span{padding:10px 9px;font-size:12px}.pima-main{padding:14px}.pima-row-actions .icon-btn{font-size:0!important;width:26px;height:26px;justify-content:center}.pima-row-actions .icon-btn::first-letter{font-size:13px}.pima-table th:nth-child(9),.pima-table td:nth-child(9){width:25%}.pima-table th:nth-child(3),.pima-table td:nth-child(3){width:16%}}
@media(max-width:900px){.pima-ot-wrap{display:block}.pima-sidebar{display:none}.pima-main{padding:10px}.pima-topbar{display:block}.pima-actions{margin-top:10px}.pima-table-wrap{display:none}.pima-cards{display:grid}.pima-grid{grid-template-columns:1fr 1fr}.pima-list-heading{align-items:flex-start}.pima-list-heading small{max-width:520px}}
@media(max-width:600px){.pima-grid{grid-template-columns:1fr}.pima-topbar h1{font-size:22px}.pima-actions .pima-btn{flex:1 1 calc(50% - 6px)}.pima-list-heading{display:block}.pima-list-heading>span{display:inline-block;margin-top:8px}}

/* v1.22.12 - Hiện đầy đủ tên khách, khung kiểm tra dữ liệu ảnh/PDF, Sale toàn quyền */
.pima-customer-name{font-size:10.5px!important;line-height:1.25!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:break-word!important;display:block;width:100%}
.pima-card-customer{font-size:13px!important;line-height:1.3!important;white-space:normal!important;word-break:break-word!important}
.pima-ai-review{margin:12px 0 16px;border:2px solid #2563eb;border-radius:14px;background:#f8fbff;overflow:hidden}
.pima-ai-review[hidden]{display:none!important}.pima-ai-review-head{padding:11px 13px;background:#dbeafe;border-bottom:1px solid #bfdbfe}.pima-ai-review-head b,.pima-ai-review-head small{display:block}.pima-ai-review-head b{font-size:14px;color:#1e3a8a}.pima-ai-review-head small{margin-top:3px;color:#475569;font-size:11px}
.pima-ai-review-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:10px}.pima-ai-review-fields>div{min-width:0;background:#fff;border:1px solid #dbe5f1;border-radius:9px;padding:9px}.pima-ai-review-fields>div.wide{grid-column:span 2}.pima-ai-review-fields span,.pima-ai-review-fields strong{display:block}.pima-ai-review-fields span{font-size:10px;color:#64748b;font-weight:800;text-transform:uppercase}.pima-ai-review-fields strong{margin-top:4px;font-size:12px;line-height:1.35;color:#0f172a;white-space:pre-wrap;word-break:break-word}
.pima-ai-review-table-wrap{overflow:auto;padding:0 10px 10px}.pima-ai-review table{width:100%;border-collapse:collapse;background:#fff;font-size:11px}.pima-ai-review th,.pima-ai-review td{border:1px solid #cbd5e1;padding:7px;vertical-align:top;white-space:normal;word-break:break-word}.pima-ai-review th{background:#eff6ff;color:#1e3a8a}.pima-ai-no-items{margin:0 10px 10px;padding:10px;background:#fff7ed;border:1px solid #fed7aa;border-radius:8px;color:#9a3412;font-weight:700}
@media(max-width:900px){.pima-ai-review-fields{grid-template-columns:1fr 1fr}.pima-ai-review-fields>div.wide{grid-column:1/-1}}
@media(max-width:560px){.pima-ai-review-fields{grid-template-columns:1fr}.pima-ai-review-fields>div.wide{grid-column:auto}}

/* v1.22.13 - Gửi giao hàng nhanh tại Hôm nay / Ngày mai / Ngày mốt */
.pima-reminder-actions .pima-reminder-delivery{background:#0f9f73!important;color:#fff!important;border-color:#0f9f73!important}
.pima-reminder-table th:nth-child(5),.pima-reminder-table td:nth-child(5){min-width:142px}
.pima-reminder-table th:nth-child(6),.pima-reminder-table td:nth-child(6){min-width:112px}
.pima-reminder-table th:nth-child(7),.pima-reminder-table td:nth-child(7){min-width:112px}
.pima-reminder-table select,.pima-reminder-table input{width:100%;min-width:0;border:1px solid #dbe3ee;border-radius:7px;padding:6px 7px;font-size:11px;background:#fff;box-sizing:border-box}
.pima-delivery-top-fields-full{grid-template-columns:repeat(4,minmax(150px,1fr))!important}
.pima-delivery-top-fields-full select{width:100%;border:1px solid #d8e0ec;border-radius:8px;padding:9px;background:#fff}
.pima-delivery-note-wide{grid-column:1/-1}
@media(max-width:1100px){.pima-delivery-top-fields-full{grid-template-columns:repeat(2,minmax(150px,1fr))!important}.pima-reminder-actions{flex-wrap:wrap}.pima-reminder-table-wrap{overflow-x:auto}}
@media(max-width:640px){.pima-delivery-top-fields-full{grid-template-columns:1fr!important}.pima-delivery-note-wide{grid-column:auto}}

/* v1.22.15: thêm ghi chú giao hàng/chành xe rõ ràng */
.pima-reminder-table th:nth-child(8),.pima-reminder-table td:nth-child(8){min-width:190px}
.pima-delivery-field textarea{width:100%;box-sizing:border-box;border:1px solid #d8e0ec;border-radius:8px;padding:10px;resize:vertical;font:inherit;background:#fff}
.pima-delivery-note-wide textarea{min-height:58px}


/* v1.22.16 - Chỉ tối ưu hiển thị cho Sale; mẫu in/xuất giữ nguyên */
.pima-order-customer-cell{min-width:0!important;vertical-align:middle!important}
.pima-order-code{display:block;color:#1d4ed8;font-size:11px;line-height:1.2;font-weight:900;white-space:normal;word-break:break-word}
.pima-order-customer-cell .pima-customer-name{display:block;margin-top:3px;color:#111827;font-size:10.5px!important;line-height:1.25!important;font-weight:750;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:break-word!important}
/* Bảng đơn đang xử lý: 8 cột sau khi gộp mã đơn + tên khách */
.pima-table th:nth-child(1),.pima-table td:nth-child(1){width:3%}
.pima-table th:nth-child(2),.pima-table td:nth-child(2){width:17%!important}
.pima-table th:nth-child(3),.pima-table td:nth-child(3){width:12%}
.pima-table th:nth-child(4),.pima-table td:nth-child(4){width:10%}
.pima-table th:nth-child(5),.pima-table td:nth-child(5){width:10%}
.pima-table th:nth-child(6),.pima-table td:nth-child(6){width:8%}
.pima-table th:nth-child(7),.pima-table td:nth-child(7){width:7%}
.pima-table th:nth-child(8),.pima-table td:nth-child(8){width:33%}
/* Bảng nhắc giao hàng: 7 cột, mã đơn và tên khách nằm chung một ô */
.pima-reminder-table th:nth-child(2),.pima-reminder-table td:nth-child(2){width:155px;min-width:155px}
.pima-reminder-table th:nth-child(3),.pima-reminder-table td:nth-child(3){width:78px}
.pima-reminder-table th:nth-child(4),.pima-reminder-table td:nth-child(4){min-width:142px}
.pima-reminder-table th:nth-child(5),.pima-reminder-table td:nth-child(5){min-width:112px}
.pima-reminder-table th:nth-child(6),.pima-reminder-table td:nth-child(6){min-width:112px}
.pima-reminder-table th:nth-child(7),.pima-reminder-table td:nth-child(7){min-width:190px}
@media(max-width:1250px){.pima-table th:nth-child(8),.pima-table td:nth-child(8){width:28%}.pima-table th:nth-child(2),.pima-table td:nth-child(2){width:20%!important}}

/* v1.22.18 - Trạng thái SX rõ ràng trong Hôm nay / Mai / Mốt */
.pima-reminder-order-line{display:flex;align-items:center;gap:5px;min-width:0}
.pima-reminder-order-line .pima-order-code{min-width:0;max-width:100%;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.pima-reminder-status{display:inline-flex;align-items:center;flex:0 0 auto;border-radius:999px;padding:2px 6px;font-size:9px;font-weight:950;line-height:1.35;white-space:nowrap;border:1px solid transparent}
.pima-reminder-status.is-done{background:#dcfce7;color:#166534;border-color:#86efac}
.pima-reminder-status.is-producing{background:#ffedd5;color:#9a3412;border-color:#fdba74}
.pima-reminder-status.is-waiting{background:#fee2e2;color:#991b1b;border-color:#fca5a5}

/* v1.22.20 - Nhan dien don CUA tai khu Hom nay / Ngay mai / Ngay mot */
.pima-order-industry{display:inline-flex;align-items:center;width:max-content;margin:0 0 3px;border-radius:5px;padding:2px 7px;font-size:9px;font-weight:1000;line-height:1.25;letter-spacing:.7px;text-transform:uppercase}.pima-order-industry.is-door{background:#dbeafe;color:#1d4ed8;border:1px solid #60a5fa;box-shadow:0 1px 4px rgba(37,99,235,.16)}

.pima-copy-order-code{appearance:none;border:0;background:transparent;padding:2px 3px;margin:0;text-align:left;cursor:pointer;font:inherit;color:#1d4ed8;font-weight:900;line-height:1.25}.pima-copy-order-code:hover{background:#eff6ff;border-radius:5px}.pima-copy-order-code:focus-visible{outline:2px solid #2563eb;outline-offset:2px;border-radius:5px}.pima-copy-order-code.is-copied{background:#dcfce7;color:#166534}.pima-copy-hint{display:inline-block;margin-left:4px;font-size:10px;vertical-align:1px}


/* v1.22.22 - Đơn khóa hôm nay + ngày giờ khóa, bảng gọn một trang */
.pima-today-locked-section{margin-bottom:16px;border:1px solid #bfdbfe;border-radius:14px;overflow:hidden;background:#f8fbff}
.pima-today-locked-heading{margin:0!important;padding:10px 12px;background:#eaf3ff;border-bottom:1px solid #bfdbfe}
.pima-recent-heading{margin-top:14px!important}
.pima-order-list-table th,.pima-order-list-table td{padding:7px 4px!important;font-size:10px!important;line-height:1.2}
.pima-order-list-table th:nth-child(1),.pima-order-list-table td:nth-child(1){width:3%}
.pima-order-list-table th:nth-child(2),.pima-order-list-table td:nth-child(2){width:17%!important}
.pima-order-list-table th:nth-child(3),.pima-order-list-table td:nth-child(3){width:9%!important}
.pima-order-list-table th:nth-child(4),.pima-order-list-table td:nth-child(4){width:9%!important}
.pima-order-list-table th:nth-child(5),.pima-order-list-table td:nth-child(5){width:8%!important}
.pima-order-list-table th:nth-child(6),.pima-order-list-table td:nth-child(6){width:7%!important}
.pima-order-list-table th:nth-child(7),.pima-order-list-table td:nth-child(7){width:47%!important}
.pima-locked-time{font-weight:850;color:#7c3aed;text-align:center;white-space:normal!important}
.pima-order-list-table .pima-order-code{font-size:10.5px!important}
.pima-order-list-table .pima-customer-name{font-size:9.5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.pima-order-list-table .pima-row-actions .icon-btn{padding:4px 5px!important;font-size:9px!important;margin:1px!important}
@media(max-width:1250px){.pima-order-list-table th:nth-child(7),.pima-order-list-table td:nth-child(7){width:43%!important}.pima-order-list-table th:nth-child(2),.pima-order-list-table td:nth-child(2){width:19%!important}}
@media(max-width:900px){.pima-today-locked-section .pima-table-wrap{display:none}.pima-today-locked-section .pima-cards{display:grid}}

/* v1.22.23 - Doanh số hôm nay nằm cùng khu đơn khóa hôm nay */
.pima-today-metrics{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.pima-today-metrics>span{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:6px 10px;border-radius:10px;background:#fff;border:1px solid #bfdbfe;font-weight:800;white-space:nowrap}
.pima-today-revenue{color:#166534!important;border-color:#86efac!important;background:#f0fdf4!important}
.pima-today-revenue strong{font-size:18px;color:#15803d}
#order-value{font-weight:850;color:#166534;border-color:#86efac;background:#f0fdf4}
@media(max-width:700px){.pima-today-locked-heading{align-items:flex-start!important}.pima-today-metrics{width:100%;justify-content:flex-start}.pima-today-metrics>span{flex:1;justify-content:center}.pima-today-revenue strong{font-size:16px}}

/* v1.22.24: trạng thái riêng, sửa trực tiếp trên cột */
.pima-order-list-table th:nth-child(1),.pima-order-list-table td:nth-child(1){width:3%!important}
.pima-order-list-table th:nth-child(2),.pima-order-list-table td:nth-child(2){width:16%!important}
.pima-order-list-table th:nth-child(3),.pima-order-list-table td:nth-child(3){width:9%!important}
.pima-order-list-table th:nth-child(4),.pima-order-list-table td:nth-child(4){width:8%!important}
.pima-order-list-table th:nth-child(5),.pima-order-list-table td:nth-child(5){width:12%!important}
.pima-order-list-table th:nth-child(6),.pima-order-list-table td:nth-child(6){width:7%!important}
.pima-order-list-table th:nth-child(7),.pima-order-list-table td:nth-child(7){width:6%!important}
.pima-order-list-table th:nth-child(8),.pima-order-list-table td:nth-child(8){width:39%!important}
.pima-status-cell{text-align:center}.pima-days-left{text-align:center;font-weight:900;white-space:nowrap}
.pima-order-list-table .pima-status-direct{width:112px!important;min-width:112px!important;max-width:112px!important;padding:6px 20px 6px 7px!important;font-size:9.5px!important}
.pima-card .pima-status-direct{width:100%!important;min-width:0!important;margin-top:5px}
@media(max-width:1250px){.pima-order-list-table th:nth-child(8),.pima-order-list-table td:nth-child(8){width:35%!important}.pima-order-list-table th:nth-child(2),.pima-order-list-table td:nth-child(2){width:18%!important}}

/* Cảnh báo đơn chờ tiếp nhận quá 3 giờ 50 phút */
.pima-status-wrap{display:flex;flex-direction:column;align-items:center;gap:3px;min-width:112px}
.pima-receive-warning{display:block;color:#b91c1c;background:#fee2e2;border:1px solid #ef4444;border-radius:999px;padding:2px 7px;font-size:9px;font-weight:1000;line-height:1.2;white-space:nowrap;animation:pimaReceiveWarning 1.2s ease-in-out infinite}
.pima-status-wrap.is-late .pima-status-direct.waiting{border-color:#ef4444;box-shadow:0 0 0 2px rgba(239,68,68,.14)}
@keyframes pimaReceiveWarning{0%,100%{opacity:1}50%{opacity:.55}}
@media(max-width:700px){.pima-status-wrap{width:100%;min-width:0}.pima-receive-warning{font-size:10px;padding:3px 8px}}


/* v1.22.27 - Tổng tiền lấy đúng mục Tổng tiền và hiển thị ngay sau Xóa */
.pima-order-total-inline{display:inline-flex;align-items:center;gap:5px;margin-left:5px;padding:5px 8px;border-radius:8px;background:#ecfdf5;border:1px solid #86efac;white-space:nowrap;vertical-align:middle}
.pima-order-total-inline small{font-size:10px;font-weight:750;color:#166534}
.pima-order-total-inline strong{font-size:12px;font-weight:900;color:#166534}
.pima-order-total-inline.card-total{display:flex;margin:8px 0 0 auto;width:max-content}
@media(max-width:760px){.pima-order-total-inline.card-total{margin-left:0}.pima-order-total-inline strong{font-size:13px}}


/* v1.22.28 - Nút lưu thông tin giao hàng từng đơn */
.pima-reminder-note-wrap{display:flex;align-items:center;gap:5px;min-width:190px}
.pima-reminder-note-wrap .pima-reminder-note{flex:1;min-width:105px}
.pima-reminder-save{flex:0 0 auto;border:0;border-radius:7px;background:#0f766e;color:#fff;padding:7px 8px;font-size:10px;font-weight:850;cursor:pointer;white-space:nowrap;box-shadow:0 1px 3px rgba(15,118,110,.22)}
.pima-reminder-save:hover{background:#115e59}
.pima-delivery-save-state{display:block;margin-top:3px;min-height:13px;font-size:9px;font-weight:750;color:#64748b}
.pima-delivery-save-state.is-saved{color:#15803d}
.pima-delivery-save-state.is-error{color:#dc2626}
@media(max-width:720px){.pima-reminder-note-wrap{min-width:180px}.pima-reminder-save{padding:7px 6px}}

/* v1.22.31 - Công nợ tối giản theo khách */
.pima-nav [data-pima-nav]{cursor:pointer}.pima-debt-section{scroll-margin-top:16px;margin-bottom:18px}.pima-debt-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.pima-debt-head b{font-size:17px;color:#0f172a}.pima-debt-head small{display:block;margin-top:3px;color:#64748b}.pima-debt-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}.pima-debt-stats>div{padding:12px 14px;border:1px solid #dbeafe;border-radius:12px;background:#f8fbff}.pima-debt-stats span{display:block;font-size:11px;font-weight:800;color:#64748b}.pima-debt-stats strong{display:block;margin-top:4px;font-size:20px;color:#0f172a}.pima-debt-stats>div:nth-child(2) strong{color:#15803d}.pima-debt-stats>div:nth-child(3) strong{color:#dc2626}.pima-debt-tools{margin-bottom:10px}.pima-debt-tools input{width:100%;max-width:420px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px}.pima-debt-customers{display:grid;gap:8px}.pima-debt-customer{border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;background:#fff}.pima-debt-customer-head{width:100%;border:0;background:#fff;padding:11px 13px;display:grid;grid-template-columns:minmax(0,1fr) auto 18px;align-items:center;gap:10px;text-align:left;cursor:pointer}.pima-debt-customer-head:hover{background:#f8fafc}.pima-debt-customer-head span:first-child b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pima-debt-customer-head small{display:block;color:#64748b;margin-top:2px}.pima-debt-customer-money{text-align:right}.pima-debt-customer-money>b{display:block;color:#b91c1c}.pima-debt-customer-money em{display:inline-block;margin-top:2px;padding:2px 7px;border-radius:999px;font-size:10px;font-style:normal;font-weight:900}.pima-debt-customer-money em.paid{background:#dcfce7;color:#166534}.pima-debt-customer-money em.owing{background:#fee2e2;color:#991b1b}.pima-debt-customer.open .pima-debt-customer-head i{transform:rotate(180deg)}.pima-debt-orders{border-top:1px solid #e2e8f0;background:#f8fafc}.pima-debt-order{display:grid;grid-template-columns:minmax(150px,1fr) 180px 150px 70px;gap:10px;align-items:end;padding:10px 13px;border-bottom:1px solid #e2e8f0}.pima-debt-order:last-child{border-bottom:0}.pima-debt-order-info b,.pima-debt-order-info small{display:block}.pima-debt-order-info small{margin-top:3px;color:#64748b}.pima-debt-order label{font-size:10px;font-weight:800;color:#64748b}.pima-debt-paid-input{width:100%;margin-top:3px;padding:8px 9px;border:1px solid #cbd5e1;border-radius:8px;text-align:right;font-weight:850}.pima-debt-remain small,.pima-debt-remain strong{display:block}.pima-debt-remain small{font-size:10px;color:#64748b}.pima-debt-remain strong{margin-top:4px;color:#b91c1c}.pima-debt-save{padding:8px 10px!important}@media(max-width:760px){.pima-debt-stats{grid-template-columns:1fr}.pima-debt-order{grid-template-columns:1fr 1fr}.pima-debt-save{width:100%}.pima-debt-head{align-items:flex-start}.pima-debt-customer-head{grid-template-columns:minmax(0,1fr) auto 14px}.pima-debt-stats strong{font-size:18px}}

/* v1.22.32 - Ghi chú quan trọng */
.pima-important-notes-section{scroll-margin-top:16px;margin-bottom:18px}.pima-important-notes-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.pima-important-notes-head b{font-size:17px;color:#0f172a}.pima-important-notes-head small{display:block;margin-top:3px;color:#64748b}.pima-important-notes-tools{display:flex;align-items:center;gap:12px;margin-bottom:10px}.pima-important-notes-tools input[type=search]{width:100%;max-width:430px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px}.pima-important-notes-tools label{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:12px;font-weight:800;color:#475569}.pima-important-notes-list{display:grid;gap:8px}.pima-important-note-item{display:grid;grid-template-columns:minmax(180px,260px) minmax(260px,1fr) 150px;gap:10px;align-items:center;padding:10px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff}.pima-important-note-item.has-note{border-color:#f59e0b;background:#fffbeb}.pima-important-note-order{display:flex;align-items:center;gap:9px;min-width:0}.pima-important-note-order .pima-note-pin{font-size:20px}.pima-important-note-order b,.pima-important-note-order small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pima-important-note-order small{margin-top:3px;color:#64748b}.pima-important-note-input{width:100%;min-height:54px;padding:9px 10px;border:1px solid #cbd5e1;border-radius:9px;resize:vertical}.pima-important-note-action{display:flex;flex-direction:column;align-items:stretch;gap:6px}.pima-important-note-action small{font-size:10px;color:#64748b;text-align:right}.pima-important-note-action .pima-btn{width:100%;padding:8px 10px!important}@media(max-width:760px){.pima-important-notes-head{align-items:flex-start}.pima-important-notes-tools{align-items:flex-start;flex-direction:column}.pima-important-notes-tools input[type=search]{max-width:none}.pima-important-note-item{grid-template-columns:1fr}.pima-important-note-action small{text-align:left}}


/* v1.22.33 - Hoàn thành giao trực tiếp tại khu Giao hôm nay */
.pima-reminder-complete-cell{min-width:142px;text-align:center;vertical-align:middle}
.pima-reminder-complete{background:#16803c!important;color:#fff!important;border:1px solid #126c33!important;white-space:nowrap;font-weight:700;padding:9px 11px!important}
.pima-reminder-complete:hover{filter:brightness(.94)}
.pima-reminder-complete:disabled{opacity:.65;cursor:wait}
@media(max-width:900px){.pima-reminder-complete-cell{min-width:130px}.pima-reminder-complete{font-size:12px;padding:8px!important}}


/* v1.22.34 - Đặt nút Hoàn thành giao ngay dưới Ngày giao */
.pima-reminder-date-cell{min-width:145px;text-align:center;vertical-align:middle}
.pima-reminder-date-text{display:block;font-weight:800;color:#334155;margin-bottom:7px;white-space:nowrap}
.pima-reminder-date-cell .pima-reminder-complete{display:block;width:100%;margin:0 auto}
@media(max-width:900px){.pima-reminder-date-cell{min-width:132px}}

/* v1.22.36 - Báo cáo tiến độ gửi khách */
.pima-btn-report{background:#0f766e!important;color:#fff!important;border-color:#0f766e!important}.pima-btn-report:hover{filter:brightness(.96)}

/* v1.22.38 - Quy cách & thể tích sản phẩm */
.pima-pack-modal{position:fixed;inset:0;background:rgba(15,23,42,.62);z-index:100000;display:none;align-items:center;justify-content:center;padding:18px}
.pima-pack-modal.show{display:flex}
.pima-pack-dialog{width:min(1380px,96vw);max-height:92vh;overflow:hidden;background:#fff;border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.28);display:flex;flex-direction:column}
.pima-pack-head{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #e5e7eb}
.pima-pack-head h2{margin:0 0 5px;font-size:22px}.pima-pack-head p{margin:0;color:#64748b}
#pima-pack-close{border:0;background:#f1f5f9;width:38px;height:38px;border-radius:10px;font-size:26px;cursor:pointer}
.pima-pack-table-wrap{overflow:auto;padding:14px 18px;flex:1}
.pima-pack-table{width:100%;border-collapse:separate;border-spacing:0;min-width:1100px}
.pima-pack-table th{position:sticky;top:0;background:#f8fafc;z-index:1;text-align:left;padding:10px 8px;font-size:12px;color:#475569;border-bottom:1px solid #cbd5e1}
.pima-pack-table td{padding:7px 6px;border-bottom:1px solid #e5e7eb;vertical-align:top}
.pima-pack-table input{width:100%;min-width:84px;border:1px solid #cbd5e1;border-radius:8px;padding:9px 8px;box-sizing:border-box}
.pima-pack-table td:first-child{min-width:235px}.pima-pack-table td:first-child input+input{margin-top:5px;font-size:12px}
.pima-pack-remove{border:0;background:#fee2e2;color:#b91c1c;border-radius:8px;width:34px;height:34px;font-size:20px;cursor:pointer}
.pima-pack-actions{display:flex;align-items:center;gap:12px;padding:15px 20px;border-top:1px solid #e5e7eb;background:#fff}
#pima-pack-status{flex:1;color:#475569;font-size:13px}
@media(max-width:760px){.pima-pack-modal{padding:6px}.pima-pack-dialog{width:100%;max-height:96vh;border-radius:12px}.pima-pack-head{padding:14px}.pima-pack-head h2{font-size:18px}.pima-pack-actions{padding:10px;flex-wrap:wrap}#pima-pack-status{order:3;flex-basis:100%}}


/* v1.22.40 - Báo cáo hàng đã SX đặt ngay cạnh ô tìm khách */
.pima-customer-search-actions{display:flex;align-items:center;gap:8px;flex:1;min-width:320px}
.pima-customer-search-actions #pima-search{flex:1;min-width:180px}
.pima-done-report-near-search{white-space:nowrap;min-height:40px}
@media(max-width:760px){.pima-customer-search-actions{width:100%;min-width:0;flex-direction:column;align-items:stretch}.pima-customer-search-actions #pima-search,.pima-done-report-near-search{width:100%}}


/* v1.22.44 - Khách hàng ưu tiên */
.pima-priority-customers{margin:14px 0 4px;padding:14px;border:1px solid #e6e9ef;border-radius:14px;background:#fff}.pima-priority-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.pima-priority-head b{display:block;font-size:16px}.pima-priority-head small{display:block;color:#667085;margin-top:3px}.pima-priority-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.pima-priority-card{position:relative;display:flex;align-items:center;gap:9px;min-width:0;padding:11px;border:1px solid #e5e7eb;border-radius:12px;background:#fafafa;text-align:left;cursor:pointer}.pima-priority-card:hover{border-color:#f0a500;background:#fffaf0}.pima-priority-card.is-pinned{border-color:#f2c14e;background:#fff9e8}.pima-priority-rank{flex:0 0 25px;width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:#eef2f6;font-weight:800}.pima-priority-name{min-width:0;flex:1}.pima-priority-name b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pima-priority-name small{display:block;color:#667085;margin-top:3px}.pima-priority-status{display:flex;flex-direction:column;gap:3px;white-space:nowrap}.pima-priority-status em{font-style:normal;font-size:11px;padding:3px 6px;border-radius:999px}.pima-priority-status .producing{background:#fff3cd;color:#7a5600}.pima-priority-status .done{background:#dcfce7;color:#166534}.pima-priority-unpin{position:absolute;right:5px;top:3px;width:19px;height:19px;border-radius:50%;display:grid;place-items:center;color:#8a8f98;font-weight:800}.pima-priority-unpin:hover{background:#fee2e2;color:#b91c1c}@media(max-width:1100px){.pima-priority-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.pima-priority-grid{grid-template-columns:1fr}.pima-priority-status{flex-direction:row}.pima-priority-head{align-items:flex-start}}


/* v1.22.47 - Thu gọn Công nợ và Ghi chú quan trọng */
.pima-collapse-section{padding:0!important;overflow:hidden}.pima-collapse-toggle{width:100%;border:0;background:#fff;padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;cursor:pointer}.pima-collapse-toggle:hover{background:#f8fafc}.pima-collapse-toggle b{display:block;font-size:16px;color:#0f172a}.pima-collapse-toggle small{display:block;margin-top:3px;color:#64748b}.pima-collapse-arrow{font-size:18px;color:#64748b;transition:transform .18s ease}.pima-collapse-section.is-open .pima-collapse-arrow{transform:rotate(180deg)}.pima-collapse-content{padding:0 16px 16px;border-top:1px solid #e2e8f0}.pima-collapse-content[hidden]{display:none!important}.pima-collapse-content .pima-debt-head,.pima-collapse-content .pima-important-notes-head{margin:10px 0 8px;justify-content:flex-end}.pima-collapse-content .pima-debt-head>div:empty,.pima-collapse-content .pima-important-notes-head>div:empty{display:none}@media(max-width:760px){.pima-collapse-toggle{padding:12px}.pima-collapse-content{padding:0 10px 12px}.pima-collapse-toggle small{font-size:11px}}

/* v1.22.48 - Báo cáo tổng đơn sản xuất */
.pima-customer-search-actions{flex-wrap:wrap}.pima-btn-total-report{background:#1d4ed8!important;color:#fff!important;border-color:#1d4ed8!important;white-space:nowrap;min-height:40px}.pima-btn-total-report:hover{filter:brightness(.96)}
@media(max-width:760px){.pima-btn-total-report{width:100%}}


/* v1.22.52 - Hiển thị đầy đủ tên khách ở Đơn khóa hôm nay và 15 đơn gần nhất */
.pima-today-locked-section .pima-customer-name,
#pima-order-body .pima-customer-name,
#pima-today-locked-body .pima-customer-name{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  word-break:break-word!important;
  overflow-wrap:anywhere!important;
  font-size:9px!important;
  line-height:1.18!important;
  font-weight:700!important;
  color:#374151!important;
  margin-top:3px!important;
}
.pima-today-locked-section .pima-order-customer-cell,
#pima-order-body .pima-order-customer-cell,
#pima-today-locked-body .pima-order-customer-cell{
  min-width:150px!important;
  vertical-align:top!important;
}
#pima-cards .pima-card-customer,
#pima-today-locked-cards .pima-card-customer{
  display:block!important;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  font-size:12px!important;
  line-height:1.25!important;
  font-weight:700!important;
}
@media(max-width:900px){
  #pima-cards .pima-card-customer,
  #pima-today-locked-cards .pima-card-customer{font-size:11.5px!important}
}

/* v1.22.53 - tên khách đầy đủ và gộp khách ngay khu vực ưu tiên */
.pima-priority-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.pima-priority-name b{font-size:11px!important;line-height:1.25!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:break-word!important;font-weight:800}
.pima-priority-name small{font-size:10px!important}
.pima-delivery-reminders .pima-customer-name{font-size:10px!important;line-height:1.2!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;word-break:break-word!important;max-width:none!important}
@media(max-width:620px){.pima-priority-actions{width:100%;justify-content:flex-start}.pima-priority-head{flex-wrap:wrap}.pima-priority-actions .pima-btn{font-size:11px;padding:7px 9px}}
/* v1.22.55 - modal gộp khách hàng */
.pima-merge-modal{position:fixed;inset:0;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:18px;z-index:999999}
.pima-merge-modal .pima-modal-card{width:min(680px,100%);max-height:88vh;overflow:auto;background:#fff;border-radius:16px;box-shadow:0 20px 60px rgba(15,23,42,.28);padding:18px}
.pima-merge-modal .pima-modal-head{display:flex;justify-content:space-between;gap:15px;align-items:flex-start;border-bottom:1px solid #e5e7eb;padding-bottom:12px;margin-bottom:14px}
.pima-merge-modal .pima-modal-head b{display:block;font-size:20px}.pima-merge-modal .pima-modal-head small{display:block;margin-top:4px;color:#64748b}
.pima-merge-modal .pima-modal-close{border:0;background:#f1f5f9;width:34px;height:34px;border-radius:10px;font-size:24px;cursor:pointer}
.pima-merge-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end}.pima-merge-form label{font-weight:700;font-size:13px;color:#334155}.pima-merge-form select{display:block;width:100%;margin-top:6px;padding:11px;border:1px solid #cbd5e1;border-radius:10px;background:#fff}.pima-merge-form .pima-btn{grid-column:1/-1}
.pima-merge-current{margin-top:18px;border-top:1px solid #e5e7eb;padding-top:14px}.pima-merge-current>b{display:block;margin-bottom:8px}
.pima-merge-link{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 10px;border:1px solid #e5e7eb;border-radius:10px;margin-top:7px;font-size:13px}.pima-merge-link span{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}.pima-merge-link i{color:#94a3b8}.pima-merge-unlink{border:0;background:#fee2e2;color:#b91c1c;border-radius:8px;padding:7px 10px;font-weight:700;cursor:pointer}
@media(max-width:640px){.pima-merge-form{grid-template-columns:1fr}.pima-merge-form .pima-btn{grid-column:auto}.pima-merge-modal .pima-modal-card{padding:14px}}
/* v1.22.56: hiển thị tên gộp và số đơn riêng */
.pima-priority-name .pima-priority-alias{display:block;font-size:11px;line-height:1.25;font-weight:500;white-space:normal;overflow:visible;text-overflow:clip;color:#475569;margin-top:2px}
.pima-priority-name .pima-priority-alias b{font-size:11px;color:#0f172a}

.pima-field-hint{display:block;margin-top:4px;font-size:11px;font-weight:700;color:#16794b}
