:root{--ink:#182334;--muted:#6d7888;--line:#e5eaf0;--bg:#f4f7fa;--blue:#1769e0;--blue2:#0c4fb4;--green:#18a572;--amber:#d88710;--red:#d84b4b;--shadow:0 18px 50px rgba(21,45,74,.12)}*{box-sizing:border-box}body{margin:0;font-family:Inter,"Microsoft YaHei",Arial,sans-serif;background:var(--bg);color:var(--ink)}button,input,select,textarea{font:inherit}.hidden{display:none!important}.login-shell{min-height:100vh;display:grid;grid-template-columns:1fr 460px;gap:60px;align-items:center;padding:8vw;background:radial-gradient(circle at 20% 20%,#d9ecff 0,transparent 34%),linear-gradient(135deg,#eef6ff,#f8fbfd)}.login-brand{display:flex;align-items:center;gap:18px;font-size:34px}.login-brand span,.brand span{display:block;color:var(--muted);font-size:13px;margin-top:4px}.brand-mark{width:54px;height:54px;border-radius:18px;background:linear-gradient(145deg,var(--blue),#36a5f5);color:#fff;display:grid;place-items:center;font-weight:800;box-shadow:0 12px 25px rgba(23,105,224,.28)}.login-card{background:#fff;border:1px solid rgba(255,255,255,.7);box-shadow:var(--shadow);padding:42px;border-radius:26px}.login-card h1{font-size:30px;margin:8px 0}.login-card p{color:var(--muted);line-height:1.7;margin:0 0 26px}.login-card label{display:block;font-size:13px;color:var(--muted);margin:16px 0}.login-card input{display:block;width:100%;margin-top:7px;border:1px solid var(--line);border-radius:10px;padding:13px}.eyebrow{font-size:12px;letter-spacing:.18em;color:var(--blue);font-weight:800}.primary,.ghost,.danger,.link{border:0;cursor:pointer}.primary{background:var(--blue);color:#fff;border-radius:9px;padding:10px 16px;font-weight:700}.primary:hover{background:var(--blue2)}.wide{width:100%;padding:13px}.ghost{background:#edf4ff;color:var(--blue);border-radius:8px;padding:8px 12px}.danger{background:#fff0f0;color:var(--red);border-radius:8px;padding:8px 12px}.link{background:transparent;color:#93a0b2;padding:8px 0}.demo-note{margin-top:18px;background:#f5f8fc;border-radius:10px;padding:12px;color:var(--muted);font-size:12px;line-height:1.7}.app-shell{display:grid;grid-template-columns:242px 1fr;min-height:100vh}.sidebar{background:#111c2d;color:#fff;padding:24px 18px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;padding:2px 8px 28px}.brand .brand-mark{width:42px;height:42px;border-radius:13px}.brand strong{font-size:18px}nav{display:grid;gap:6px}nav button{border:0;background:transparent;color:#aeb9c8;text-align:left;padding:12px 15px;border-radius:9px;cursor:pointer}nav button:hover,nav button.active{background:#1e3049;color:#fff}.sidebar-foot{margin-top:auto;padding:18px 12px 0;border-top:1px solid #28394f;font-size:14px}.muted{color:var(--muted)}.sidebar .muted{color:#8190a4;font-size:11px;margin:5px 0}main{padding:30px 38px;min-width:0}header{display:flex;justify-content:space-between;align-items:end;margin-bottom:26px}header h2{font-size:28px;margin:5px 0 0}.date{color:var(--muted);font-size:13px}.stats{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:16px}.stat,.panel{background:#fff;border:1px solid var(--line);border-radius:15px}.stat{padding:21px}.stat span{color:var(--muted);font-size:13px}.stat strong{display:block;font-size:30px;margin-top:10px}.panel{padding:22px;margin-top:18px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.panel h3{margin:0;font-size:17px}.flow{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.flow div{background:#f4f8fc;border-radius:12px;padding:18px}.flow b{display:block;color:var(--blue);margin-bottom:7px}.flow span{font-size:12px;color:var(--muted);line-height:1.6}.toolbar{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-bottom:14px}.toolbar .actions{display:flex;gap:8px}table{width:100%;border-collapse:collapse;font-size:13px}th{text-align:left;color:var(--muted);font-weight:600;background:#f7f9fb}th,td{padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:top}td .ghost,td .danger{margin:2px}.status{display:inline-block;padding:4px 8px;border-radius:999px;background:#edf4ff;color:var(--blue);font-size:11px}.status.APPROVED,.status.CONFIRMED{background:#e9f8f1;color:var(--green)}.status.REJECTED,.status.CANCELLED{background:#fff0f0;color:var(--red)}.status.APPROVING,.status.PENDING{background:#fff6e7;color:var(--amber)}.empty{text-align:center;padding:48px;color:var(--muted)}dialog{width:min(900px,92vw);max-height:88vh;border:0;border-radius:18px;box-shadow:var(--shadow);padding:0}dialog::backdrop{background:rgba(12,24,42,.55)}.dialog-head{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid var(--line)}.dialog-head h3{margin:0}.dialog-head button{border:0;background:transparent;font-size:28px;color:var(--muted);cursor:pointer}#dialogBody{padding:22px;overflow:auto;max-height:72vh}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.form-grid label{font-size:12px;color:var(--muted)}.form-grid input,.form-grid select,.form-grid textarea{width:100%;margin-top:6px;padding:10px;border:1px solid var(--line);border-radius:8px}.form-grid .full{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.toast{position:fixed;right:30px;top:24px;background:#17314f;color:#fff;padding:12px 18px;border-radius:10px;box-shadow:var(--shadow);z-index:10}.toast.error{background:#9d3030}.path{color:var(--muted);font-size:11px;max-width:420px}.qty{font-variant-numeric:tabular-nums}.hint{padding:14px;border-left:3px solid var(--blue);background:#f1f7ff;color:#4b5d73;font-size:13px;line-height:1.7}@media(max-width:900px){.login-shell{grid-template-columns:1fr;padding:28px}.login-brand{display:none}.app-shell{grid-template-columns:1fr}.sidebar{position:static}.sidebar nav{grid-template-columns:repeat(3,1fr)}.sidebar-foot{display:none}main{padding:20px}.stats,.flow{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}}

.req-head-note{display:flex;justify-content:space-between;gap:20px;padding:12px 14px;margin-bottom:14px;border-radius:10px;background:#f4f8fc;color:#4b5d73}.req-head-note span{color:var(--muted)}.req-buy,.req-skip{display:inline-flex;padding:4px 9px;border-radius:999px;font-weight:700;font-size:11px}.req-buy{background:#e9f8f1;color:var(--green)}.req-skip{background:#f0f2f5;color:var(--muted)}.req-edit-hint{margin-bottom:16px}.req-edit-table{overflow-x:auto;margin-top:16px;border:1px solid var(--line);border-radius:12px}.req-edit-table table{min-width:1100px}.req-edit-table tbody tr:has([name="purchase"]:not(:checked)),.req-edit-table tbody tr:has([name="selected"]:not(:checked)){background:#f8f9fb;color:#7b8796}.req-check{display:flex;align-items:center;gap:7px;white-space:nowrap;font-weight:700}.req-check input{width:17px;height:17px;accent-color:var(--blue)}.req-qty,.req-note{width:100%;min-width:120px;padding:8px;border:1px solid var(--line);border-radius:7px;background:#fff}.req-note{min-width:190px}.req-qty:disabled{background:#eef1f4;color:#99a2ad}.req-edit-table th{white-space:nowrap}

.module-hero{position:relative;overflow:hidden;display:flex;justify-content:space-between;align-items:center;min-height:150px;padding:28px 32px;border-radius:20px;color:#fff;box-shadow:0 18px 45px rgba(20,74,139,.16)}.module-hero:after{content:"";position:absolute;width:260px;height:260px;right:-55px;top:-105px;border:45px solid rgba(255,255,255,.1);border-radius:50%}.module-hero>div{position:relative;z-index:1;max-width:760px}.module-hero .eyebrow{color:#bbd9ff}.module-hero h3{font-size:27px;margin:8px 0}.module-hero p{margin:0;color:rgba(255,255,255,.82);line-height:1.75}.requisition-hero{background:linear-gradient(125deg,#113b71,#1769e0 58%,#2b9edb)}.procurement-hero{background:linear-gradient(125deg,#183c48,#0b7c77 58%,#19a572)}.module-summary,.req-mini-summary{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:14px;margin-top:16px}.module-summary>div,.req-mini-summary>div{padding:18px 20px;background:#fff;border:1px solid var(--line);border-radius:14px}.module-summary span,.req-mini-summary span{display:block;color:var(--muted);font-size:12px}.module-summary strong,.req-mini-summary strong{display:block;margin-top:8px;font-size:24px}.req-mini-summary{grid-template-columns:repeat(3,1fr);margin:0 0 14px}.req-mini-summary>div{background:#f7f9fc;padding:13px 15px}.req-mini-summary strong{font-size:19px}.module-panel{padding:0;overflow:hidden}.module-panel .panel-head{padding:20px 22px;margin:0;border-bottom:1px solid var(--line)}.module-panel .panel-head h3{margin-bottom:5px}.priority-panel{border-color:#d6e8fb;box-shadow:0 12px 32px rgba(30,89,150,.08)}.table-shell{width:100%;overflow-x:auto}.table-shell table{min-width:850px}.table-shell tbody tr{transition:background .16s ease}.table-shell tbody tr:hover{background:#f8fbff}.row-actions{display:flex;flex-wrap:wrap;gap:6px;min-width:220px}.row-actions button{margin:0}.remaining-qty{color:var(--blue)}.progress-row{display:flex;align-items:center;gap:8px;min-width:135px}.progress-track{height:7px;flex:1;overflow:hidden;border-radius:99px;background:#e8edf3}.progress-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--blue),#23a1dd)}.progress-row span{width:34px;color:var(--muted);font-size:11px}.compact-empty{padding:30px}.batch-hint{margin-bottom:16px;border-left-color:var(--green);background:#effaf6}.status.DRAFT{background:#edf1f5;color:#5f6c7b}.status.CLOSED{background:#eff2f4;color:#65717e}.primary,.ghost,.danger{transition:transform .15s ease,box-shadow .15s ease,background .15s ease}.primary:hover,.ghost:hover,.danger:hover{transform:translateY(-1px)}.primary:hover{box-shadow:0 7px 16px rgba(23,105,224,.2)}.panel{box-shadow:0 8px 28px rgba(26,50,82,.045)}
.sales-order-hero{background:linear-gradient(125deg,#312e81,#4f46e5 58%,#0ea5e9)}.hero-action{position:relative;z-index:1;flex:none;background:#fff;color:#3344b5;padding:12px 18px;box-shadow:0 10px 24px rgba(25,34,95,.2)}.hero-action:hover{background:#f7f8ff;color:#253594}.refresh-action{background:#eef2ff;color:#4338ca}.refresh-action:hover{background:#e0e7ff}.snapshot-hint{display:flex;align-items:center;gap:5px;margin-bottom:16px;border-left-color:#4f46e5;background:#f2f3ff}.level-chip{display:inline-grid;min-width:30px;height:25px;place-items:center;border-radius:7px;background:#eef2ff;color:#4338ca;font-size:11px;font-weight:800}
@media(max-width:900px){.module-hero{padding:24px;min-height:135px}.module-summary{grid-template-columns:repeat(2,1fr)}.req-mini-summary{grid-template-columns:1fr}.row-actions{min-width:180px}.req-head-note{flex-direction:column}.module-hero h3{font-size:23px}}

/* Modern workspace theme */
:root{--ink:#162033;--muted:#718096;--line:#e6eaf1;--bg:#f5f7fb;--surface:#fff;--surface-soft:#f8faff;--blue:#4f46e5;--blue2:#3730a3;--green:#059669;--amber:#d97706;--red:#dc3f4f;--sidebar:#11172a;--shadow:0 16px 42px rgba(22,32,51,.08);--shadow-soft:0 8px 24px rgba(22,32,51,.055)}
html{scroll-behavior:smooth}body{min-width:320px;background:radial-gradient(circle at 82% 3%,rgba(79,70,229,.07),transparent 25%),var(--bg);line-height:1.5;-webkit-font-smoothing:antialiased}::selection{background:#dfe1ff;color:#302b83}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:99px;background:#cbd3df;background-clip:padding-box}button,input,select,textarea{outline:none}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{box-shadow:0 0 0 4px rgba(79,70,229,.13)!important;border-color:#7771ea!important}
.app-shell{grid-template-columns:266px minmax(0,1fr)}.sidebar{position:sticky;top:0;height:100vh;padding:22px 17px 18px;background:radial-gradient(circle at 15% 0,rgba(99,102,241,.28),transparent 26%),linear-gradient(180deg,#131a30 0%,#0d1324 100%);box-shadow:12px 0 36px rgba(15,23,42,.08);z-index:4}.brand{padding:4px 10px 25px;border-bottom:1px solid rgba(255,255,255,.075);margin-bottom:16px}.brand .brand-mark{background:linear-gradient(145deg,#7c73ff,#4f46e5);box-shadow:0 10px 24px rgba(79,70,229,.38)}.brand strong{letter-spacing:.01em}.brand span{color:#7f8aa5}nav{gap:5px;overflow-y:auto;padding-right:2px}nav button{position:relative;display:flex;align-items:center;gap:11px;min-height:44px;padding:10px 12px;color:#9ca8c1;border:1px solid transparent;font-weight:600;transition:.18s ease}nav button:hover{background:rgba(255,255,255,.055);color:#e8ecf7;transform:translateX(2px)}nav button.active{background:linear-gradient(100deg,rgba(99,102,241,.28),rgba(79,70,229,.13));border-color:rgba(132,128,255,.17);color:#fff;box-shadow:inset 3px 0 #817aff}nav button.active:after{content:"";position:absolute;right:11px;width:5px;height:5px;border-radius:50%;background:#8f89ff;box-shadow:0 0 0 4px rgba(143,137,255,.12)}.nav-icon{display:grid;width:25px;height:25px;place-items:center;border-radius:7px;background:rgba(255,255,255,.055);font-size:14px;font-weight:500}.active .nav-icon{background:rgba(129,122,255,.2);color:#cac7ff}.sidebar-foot{display:grid;grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:10px;padding:16px 8px 0}.user-avatar{display:grid;width:36px;height:36px;place-items:center;border-radius:11px;background:linear-gradient(145deg,#4f46e5,#7c73ff);font-weight:800}.user-info{min-width:0;font-size:12px}.user-info>div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar .user-info .muted{font-size:10px}.sidebar-foot .link{padding:7px;color:#8d99b3}.sidebar-foot .link:hover{color:#fff}
main{padding:26px 34px 42px;min-width:0}.topbar{position:relative;align-items:center;margin-bottom:24px;padding:2px 2px 18px;border-bottom:1px solid rgba(210,216,227,.82)}.topbar h2{font-size:26px;letter-spacing:-.025em}.topbar .eyebrow{font-size:10px;color:#7771d9}.topbar-meta{display:flex;align-items:center;gap:17px}.system-online{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid #dce9e4;border-radius:99px;background:#f3fbf7;color:#32765c;font-size:11px;font-weight:700}.system-online i{width:7px;height:7px;border-radius:50%;background:#17a673;box-shadow:0 0 0 4px rgba(23,166,115,.11)}.date{padding-left:17px;border-left:1px solid var(--line)}.page{animation:page-in .24s ease both}@keyframes page-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.panel,.stat,.module-summary>div,.req-mini-summary>div,.bom-summary>div,.data-card{border-color:rgba(222,227,236,.95);box-shadow:var(--shadow-soft)}.panel{border-radius:17px}.panel:hover{border-color:#dce2ed}.panel-head{min-height:48px}.panel-head h3{font-size:16px;letter-spacing:-.01em}.toolbar{flex-wrap:wrap}.hint{border:1px solid #dfe8f8;border-left:3px solid var(--blue);border-radius:9px;background:#f5f7ff;color:#526077}.primary,.ghost,.danger{min-height:36px;border-radius:9px;padding:8px 13px;font-size:12px;font-weight:700}.primary{background:linear-gradient(135deg,#5b53eb,#4338ca);box-shadow:0 5px 13px rgba(79,70,229,.15)}.primary:hover{background:linear-gradient(135deg,#4f46e5,#3730a3);box-shadow:0 8px 18px rgba(79,70,229,.23)}.ghost{border:1px solid #e0e5ee;background:#f7f9fc;color:#4c5d73}.ghost:hover{border-color:#cfd7e5;background:#eef2f8;color:#29384e}.danger{border:1px solid #f5dde1;background:#fff3f4;color:#c92f42}.danger:hover{background:#ffe8eb;color:#ad2033}.link{font-weight:700}button:disabled{opacity:.55;cursor:not-allowed;transform:none!important}
table{font-size:12px}th{padding:12px 14px;background:#f7f8fb;color:#68768a;font-size:11px;letter-spacing:.02em;text-transform:none}td{padding:13px 14px;color:#334155}tbody tr{transition:background .16s ease}tbody tr:hover{background:#fafbff}tbody tr:last-child td{border-bottom:0}td strong{color:#1e293b}.status{padding:5px 9px;font-weight:700;letter-spacing:.01em}.empty{padding:54px 24px}.card-grid{gap:16px!important}.data-card{border-radius:15px!important;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.data-card:hover{transform:translateY(-2px);border-color:#d5daea;box-shadow:0 14px 30px rgba(35,47,75,.08)}
input,select,textarea{accent-color:var(--blue)}.form-grid{gap:16px}.form-grid label{color:#58677b;font-weight:600}.form-grid input,.form-grid select,.form-grid textarea,.req-qty,.req-note,.bom-edit-table select,.bom-edit-table input,td input,td select{min-height:40px;border:1px solid #dde3ec;border-radius:9px;background:#fbfcfe;color:var(--ink);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.form-grid input:hover,.form-grid select:hover,.form-grid textarea:hover,td input:hover,td select:hover{border-color:#c9d1df;background:#fff}textarea{resize:vertical}.form-actions{padding-top:17px;border-top:1px solid #edf0f4}
#dialog{width:min(1080px,calc(100vw - 42px));max-height:90vh;border:1px solid rgba(255,255,255,.8);border-radius:20px;background:#fff;box-shadow:0 28px 85px rgba(15,23,42,.24)}dialog[open]{animation:dialog-in .2s cubic-bezier(.2,.8,.2,1) both}dialog::backdrop{background:rgba(12,18,33,.58);backdrop-filter:blur(4px);animation:backdrop-in .18s ease both}@keyframes dialog-in{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}@keyframes backdrop-in{from{opacity:0}to{opacity:1}}.dialog-head{padding:18px 24px;background:linear-gradient(180deg,#fff,#fbfcff)}.dialog-head>div{display:flex;flex-direction:column;gap:2px}.dialog-kicker{color:#7771d9;font-size:9px;font-weight:800;letter-spacing:.16em}.dialog-head h3{font-size:18px}.dialog-head button{display:grid;width:36px;height:36px;place-items:center;border-radius:10px;font-size:23px;line-height:1}.dialog-head button:hover{background:#f0f2f7;color:#2f3d52}#dialogBody{padding:24px;max-height:calc(90vh - 75px)}
.action-dialog{width:min(570px,calc(100vw - 34px));padding:0;border:1px solid rgba(255,255,255,.84);border-radius:21px;background:#fff;box-shadow:0 30px 90px rgba(15,23,42,.28)}.action-dialog form{margin:0}.action-dialog-content{display:grid;grid-template-columns:54px minmax(0,1fr);gap:17px;padding:28px 28px 22px}.action-dialog-icon{display:grid;width:52px;height:52px;place-items:center;border-radius:16px;background:#eeefff;color:#4f46e5;font-size:24px;font-weight:800}.action-dialog[data-tone="danger"] .action-dialog-icon{background:#fff0f2;color:#d83246}.action-dialog-copy{min-width:0}.action-dialog-eyebrow{display:block;margin-bottom:4px;color:#7771d9;font-size:10px;font-weight:800;letter-spacing:.14em}.action-dialog[data-tone="danger"] .action-dialog-eyebrow{color:#cc3345}.action-dialog h3{margin:0;color:#172033;font-size:20px;letter-spacing:-.02em}.action-dialog p{margin:9px 0 0;color:#64748b;font-size:13px;line-height:1.7}.action-dialog-details{display:grid;gap:8px;margin:16px 0 0;padding:13px 15px 13px 31px;border:1px solid #e6e9f6;border-radius:11px;background:#f8f8ff;color:#526077;font-size:12px}.action-dialog[data-tone="danger"] .action-dialog-details{border-color:#f3e1e4;background:#fff8f8}.action-dialog-details li::marker{color:#6c63e9}.action-dialog-input{display:block;margin-top:17px;color:#536177;font-size:12px;font-weight:700}.action-dialog-input textarea{display:block;width:100%;margin-top:7px;padding:11px 12px;border:1px solid #dce2ec;border-radius:10px;background:#fbfcfe;color:var(--ink)}.action-dialog-input small{display:block;margin-top:5px;color:#8a96a8;font-weight:400}.action-dialog-input.invalid textarea{border-color:#dc3f4f;box-shadow:0 0 0 4px rgba(220,63,79,.1)}.action-dialog-actions{display:flex;justify-content:flex-end;gap:9px;padding:17px 24px;border-top:1px solid #edf0f5;background:#fafbfc}.action-dialog-actions button{min-width:88px}.action-confirm.danger{background:#dc3f4f;color:#fff;border-color:#dc3f4f}.action-confirm.danger:hover{background:#bd2f40}
.toast{display:flex;align-items:center;min-height:44px;max-width:min(430px,calc(100vw - 36px));padding:11px 16px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:#18243a;box-shadow:0 16px 38px rgba(15,23,42,.24);font-size:12px;font-weight:700;z-index:30;animation:toast-in .22s ease both}.toast:before{content:"✓";display:grid;width:22px;height:22px;margin-right:9px;place-items:center;border-radius:50%;background:rgba(52,211,153,.15);color:#6ee7b7}.toast.error{background:#9f2938}.toast.error:before{content:"!";background:rgba(255,255,255,.14);color:#fff}@keyframes toast-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.dashboard-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;min-height:178px;padding:31px 34px;border-radius:20px;background:radial-gradient(circle at 84% 22%,rgba(255,255,255,.15),transparent 23%),linear-gradient(125deg,#1e1b4b,#4338ca 55%,#2563eb);color:#fff;box-shadow:0 20px 45px rgba(55,48,163,.2)}.dashboard-welcome{color:#c7d2fe;font-size:12px;font-weight:700}.dashboard-hero h3{margin:8px 0 7px;font-size:27px;letter-spacing:-.025em}.dashboard-hero p{margin:0;color:#dce4ff;font-size:13px}.dashboard-orbit{position:relative;display:grid;width:104px;height:104px;margin-right:28px;place-items:center;border:1px solid rgba(255,255,255,.22);border-radius:50%;background:rgba(255,255,255,.07);font-size:20px;letter-spacing:.12em}.dashboard-orbit:before,.dashboard-orbit:after{content:"";position:absolute;border:1px solid rgba(255,255,255,.13);border-radius:50%;inset:-20px}.dashboard-orbit:after{inset:16px}.dashboard-orbit span{position:absolute;left:-23px;width:10px;height:10px;border-radius:50%;background:#93c5fd;box-shadow:0 0 18px #93c5fd}.stats{margin-top:17px}.stat{position:relative;min-height:142px;padding:20px 20px 18px}.stat .stat-icon{display:grid;width:38px;height:38px;margin-bottom:15px;place-items:center;border-radius:11px;font-style:normal;font-weight:800}.stat-icon.indigo{background:#eeefff;color:#4f46e5}.stat-icon.blue{background:#eaf5ff;color:#1681d8}.stat-icon.green{background:#eaf9f2;color:#059669}.stat-icon.amber{background:#fff6e7;color:#d97706}.stat span{position:absolute;left:68px;top:29px}.stat strong{margin:0;font-size:28px;letter-spacing:-.03em}.stat small{display:block;margin-top:2px;color:#9aa5b5;font-size:10px}.flow-panel{padding:0;overflow:hidden}.flow-panel .panel-head{padding:20px 22px;margin:0;border-bottom:1px solid var(--line)}.flow{padding:18px;gap:12px}.flow div{position:relative;min-height:132px;padding:17px;border:1px solid #edf0f5;background:#fafbfe}.flow div:after{content:"→";position:absolute;right:-11px;top:50%;z-index:1;display:grid;width:22px;height:22px;place-items:center;border:1px solid #e5e9f1;border-radius:50%;background:#fff;color:#9aa6b7;transform:translateY(-50%)}.flow div:last-child:after{display:none}.flow b{color:#6961df;font-size:11px}.flow strong{display:block;margin-bottom:7px;font-size:14px}.flow span{font-size:11px}
.stat.stat-warning{cursor:pointer;border-color:#f2c9cf;background:#fffafb}.stat-icon.red{background:#fff0f2;color:#cf3750}.site-overdue-filter.active{background:#fff0f2;color:#c7354e}
@media(max-width:1050px){.app-shell{grid-template-columns:228px minmax(0,1fr)}main{padding:24px}.sidebar{padding-inline:12px}.stats{grid-template-columns:repeat(2,minmax(150px,1fr))}.flow{grid-template-columns:repeat(2,1fr)}.flow div:nth-child(2):after{display:none}}
@media(max-width:900px){.app-shell{display:block}.sidebar{position:relative;height:auto;padding:15px}.brand{margin:0 0 12px;padding-bottom:14px}.sidebar nav,#nav{grid-template-columns:repeat(4,minmax(120px,1fr));overflow-x:auto}.sidebar-foot{margin-top:14px}.topbar{margin-top:4px}main{padding:20px}.module-hero,.bom-hero{margin-top:0}.dashboard-orbit{display:none}}
@media(max-width:680px){main{padding:16px}.topbar{align-items:flex-start;gap:12px}.topbar-meta{align-items:flex-end;flex-direction:column;gap:6px}.system-online{display:none}.date{padding:0;border:0;font-size:10px}.topbar h2{font-size:22px}.sidebar nav,#nav{grid-template-columns:repeat(2,minmax(130px,1fr))}.dashboard-hero{min-height:160px;padding:25px}.dashboard-hero h3{font-size:23px}.stats,.module-summary,.bom-summary{grid-template-columns:1fr 1fr}.flow{grid-template-columns:1fr}.flow div:after{display:none}.module-hero,.bom-hero{padding:23px 21px}.module-hero .hero-action{width:100%;margin-top:18px}.action-dialog-content{grid-template-columns:1fr;padding:23px}.action-dialog-icon{width:44px;height:44px;border-radius:13px}.action-dialog-actions{padding:14px 19px}#dialog{width:calc(100vw - 20px);border-radius:16px}#dialogBody{padding:18px}.dialog-head{padding:15px 18px}.form-actions{position:sticky;bottom:-18px;margin-inline:-18px;padding:14px 18px;background:#fff}.toast{right:18px;top:18px}.module-summary>div,.bom-summary>div{padding:15px}}

/* 管理员系统配置 */
.admin-empty{display:flex;flex-direction:column;align-items:center;gap:10px;grid-column:1/-1}.admin-empty strong{font-size:16px;color:var(--ink)}.admin-empty span{font-size:12px}.admin-empty .primary{margin-top:4px}

/* 审批流程配置 */
.approval-config-head{grid-template-columns:auto minmax(0,1fr) auto}.approval-config-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:18px 0}.approval-config-summary>div{position:relative;overflow:hidden;padding:17px 19px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow-soft)}.approval-config-summary>div:after{content:"";position:absolute;right:-13px;bottom:-20px;width:60px;height:60px;border-radius:50%;background:#f0efff}.approval-config-summary span{display:block;color:var(--muted);font-size:11px}.approval-config-summary strong{position:relative;z-index:1;display:block;margin-top:7px;font-size:24px}.approval-process-list{display:grid;gap:16px}.approval-process-card{padding:21px 22px;border:1px solid var(--line);border-radius:17px;background:#fff;box-shadow:var(--shadow-soft)}.approval-process-card.enabled{border-left:4px solid #4f46e5}.approval-process-card.disabled{opacity:.78}.process-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.process-title-line{display:flex;align-items:center;gap:10px}.process-title-line h3{margin:0;font-size:17px}.process-card-head p{margin:6px 0 0;color:var(--muted);font-size:11px}.process-actions{display:flex;gap:8px}.process-active-note{margin:16px 0 13px;padding:9px 12px;border-radius:9px;background:#f5f7fa;color:#7b8798;font-size:11px}.process-active-note.show{background:#fff5e6;color:#ae6500}.approval-node-flow{display:flex;align-items:stretch;overflow-x:auto;padding:3px 2px 7px}.approval-node-card{display:grid;grid-template-columns:36px minmax(150px,1fr);gap:11px;min-width:215px;padding:14px;border:1px solid #e7e8f1;border-radius:13px;background:linear-gradient(145deg,#fbfbff,#f7f8fc)}.flow-index{display:grid;width:34px;height:34px;place-items:center;border-radius:10px;background:#eae9ff;color:#5046d4;font-size:11px;font-weight:900}.approval-node-card strong{display:block;font-size:13px}.approval-node-card span{display:block;margin-top:4px;color:var(--muted);font-size:10px}.approval-node-card p{margin:7px 0 0;color:#4f46e5;font-size:12px;font-weight:700}.approval-node-card small{margin-left:4px;color:#929bad;font-weight:400}.flow-arrow{display:grid;min-width:39px;place-items:center;color:#9ba4b6;font-size:18px}.approval-process-form{min-width:0}.approval-form-intro{display:flex;align-items:center;gap:13px;margin:-2px 0 20px;padding:15px 17px;border-radius:13px;background:linear-gradient(120deg,#f3f2ff,#f8f9ff)}.approval-form-icon{display:grid;width:39px;height:39px;flex:none;place-items:center;border-radius:11px;background:#4f46e5;color:#fff}.approval-form-intro strong,.approval-form-intro span{display:block}.approval-form-intro strong{font-size:13px}.approval-form-intro span{margin-top:4px;color:var(--muted);font-size:11px}.approval-node-editor-head{display:flex;align-items:end;justify-content:space-between;margin:22px 0 11px}.approval-node-editor-head strong,.approval-node-editor-head span{display:block}.approval-node-editor-head span{margin-top:4px;color:var(--muted);font-size:11px}.approval-node-editor{display:grid;gap:9px}.approval-node-edit{position:relative;display:grid;grid-template-columns:24px minmax(150px,1.2fr) minmax(130px,.8fr) minmax(190px,1.1fr) 34px;gap:9px;align-items:end;padding:12px 11px 12px 42px;border:1px solid #e5e8ef;border-radius:12px;background:#fafbfe}.approval-node-edit:before{content:var(--node-number,"01");position:absolute;left:11px;top:50%;display:grid;width:25px;height:25px;place-items:center;transform:translateY(-50%);border-radius:8px;background:#eae9ff;color:#4f46e5;font-size:9px;font-weight:900}.approval-node-edit label{color:#667286;font-size:10px}.approval-node-edit input,.approval-node-edit select{width:100%;height:38px;margin-top:5px;padding:0 9px;border:1px solid #dfe3eb;border-radius:8px;background:#fff;color:var(--ink);font-size:12px}.node-drag{align-self:center;color:#aab1be;font-size:13px}.node-remove{width:34px;height:38px;padding:0;font-size:18px}.approval-process-form>.form-actions{position:sticky;bottom:-22px;margin:22px -22px -22px;padding:15px 22px;border-top:1px solid var(--line);background:rgba(255,255,255,.96);backdrop-filter:blur(12px)}
@media(max-width:1050px){.approval-config-summary{grid-template-columns:repeat(2,1fr)}.approval-node-edit{grid-template-columns:22px 1fr 1fr 34px;padding-left:40px}.approval-node-edit label:nth-of-type(3){grid-column:2/4}.node-remove{grid-column:4;grid-row:1}}
@media(max-width:680px){.approval-config-head{grid-template-columns:auto 1fr}.approval-config-head>.primary{grid-column:1/-1}.approval-config-summary{grid-template-columns:1fr 1fr}.process-card-head{flex-direction:column}.process-actions{width:100%}.process-actions button{flex:1}.approval-node-edit{display:block;padding:42px 11px 11px}.approval-node-edit:before{top:9px;transform:none}.node-drag{display:none}.approval-node-edit label{display:block;margin-top:9px}.node-remove{position:absolute;right:9px;top:8px}}
.node-order-actions{display:grid;align-self:center;gap:3px}.node-order-actions button{width:23px;height:18px;padding:0;border:0;border-radius:5px;background:#edf0f5;color:#758196;font-size:10px;line-height:1;cursor:pointer}.node-order-actions button:hover{background:#e4e2ff;color:#4f46e5}
@media(max-width:680px){.node-order-actions{position:absolute;left:45px;top:8px;display:flex}}

/* Sales order entry and detail */
#dialog:has(.sales-order-form),#dialog:has(.order-detail-hero){width:min(1400px,calc(100vw - 36px))}.sales-order-form{display:grid;gap:16px}.order-form-banner{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:25px;padding:24px 27px;border-radius:16px;background:radial-gradient(circle at 90% 20%,rgba(255,255,255,.16),transparent 25%),linear-gradient(125deg,#26205c,#4f46e5 58%,#168fd5);color:#fff}.order-form-banner:after{content:"";position:absolute;right:26%;top:-75px;width:190px;height:190px;border:32px solid rgba(255,255,255,.07);border-radius:50%}.order-form-banner>div{position:relative;z-index:1}.order-form-banner>div:first-child{display:flex;flex-direction:column}.order-form-banner>div:first-child>span{color:#bfc8ff;font-size:9px;font-weight:800;letter-spacing:.17em}.order-form-banner>div:first-child>strong{margin:5px 0 3px;font-size:22px}.order-form-banner small{color:#dce3ff}.order-auto-meta{display:flex;gap:10px}.order-auto-meta>span{min-width:126px;padding:11px 13px;border:1px solid rgba(255,255,255,.14);border-radius:11px;background:rgba(255,255,255,.09);color:#cfd8ff;font-size:10px}.order-auto-meta strong{display:block;margin-top:3px;color:#fff;font-size:12px}.order-form-section,.order-detail-section{padding:20px;border:1px solid #e5e9f0;border-radius:15px;background:#fff}.form-section-title{display:flex;align-items:center;gap:11px;margin-bottom:18px}.form-section-title>span{display:grid;flex:0 0 30px;height:30px;place-items:center;border-radius:9px;background:#eeefff;color:#5149d8;font-size:10px;font-weight:800}.form-section-title>div{display:flex;flex:1;flex-direction:column}.form-section-title>div>strong{font-size:14px}.form-section-title>div>small{margin-top:2px;color:#8a96a8;font-size:10px}.form-section-title>button{margin-left:auto}.order-header-grid{grid-template-columns:repeat(4,minmax(180px,1fr))}.order-header-grid .full{grid-column:1/-1}.bom-complete-field{display:flex;align-items:center;gap:8px;margin:0;padding:0;border:0}.bom-complete-field legend{display:block;width:100%;margin-bottom:6px;color:#58677b;font-size:12px;font-weight:600}.bom-complete-field label{cursor:pointer}.bom-complete-field input{position:absolute;opacity:0;pointer-events:none}.bom-complete-field span{display:inline-flex;min-height:40px;align-items:center;padding:8px 14px;border:1px solid #dde3ec;border-radius:9px;background:#fbfcfe;color:#67758a;font-size:12px;transition:.16s ease}.bom-complete-field input:checked+span{border-color:#8f89ed;background:#eeefff;color:#4038bd;box-shadow:0 0 0 3px rgba(79,70,229,.08)}.order-upload-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.file-picker{position:relative;display:grid;grid-template-columns:42px auto;column-gap:12px;min-height:90px;align-content:center;padding:15px 18px;border:1px dashed #cbd3df;border-radius:12px;background:#fafbfe;cursor:pointer;transition:.18s ease}.file-picker:hover{border-color:#817aea;background:#f7f7ff;transform:translateY(-1px)}.file-picker input{position:absolute;width:1px;height:1px;opacity:0}.file-picker i{grid-row:1/3;display:grid;width:42px;height:42px;place-items:center;border-radius:11px;background:#eeefff;color:#4f46e5;font-size:20px;font-style:normal}.file-picker strong{align-self:end;font-size:12px}.file-picker span{overflow:hidden;align-self:start;color:#8995a6;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.order-lines-section{padding:20px 0 0}.order-lines-section>.form-section-title{padding:0 20px}.order-line-shell{border-top:1px solid #edf0f4;border-bottom:1px solid #edf0f4}.order-edit-table{min-width:1540px}.order-edit-table th{white-space:nowrap}.order-edit-table td{vertical-align:middle}.order-edit-table select,.order-edit-table input{width:100%;min-width:92px;padding:8px}.order-edit-table [name="productId"]{min-width:230px}.order-edit-table [name="materialNo"]{min-width:130px}.order-edit-table [data-specification]{display:block;max-width:130px}.order-edit-table .line-product-meta{display:block;margin-top:4px;color:#929daf;font-size:9px}.order-line-no{color:#98a4b5;font-variant-numeric:tabular-nums}.gift-toggle{display:block;cursor:pointer}.gift-toggle input{position:absolute;opacity:0;pointer-events:none}.gift-toggle span{display:inline-flex;padding:5px 8px;border-radius:99px;background:#f0f2f5;color:#7c8796;font-size:10px;font-weight:700}.gift-toggle input:checked+span{background:#fff1df;color:#c76b00}.tax-input{position:relative;min-width:90px}.tax-input span{position:absolute;right:9px;top:50%;color:#8b96a6;transform:translateY(-50%)}.tax-input input{padding-right:25px}.icon-button{min-width:34px;padding:5px;font-size:17px}.order-total-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 20px;background:#fafbfe;color:#748196;font-size:11px}.order-total-bar>div{display:flex;align-items:center;gap:24px}.order-total-bar>div>span{display:flex;align-items:baseline;gap:8px}.order-total-bar strong{color:#27354a;font-size:14px}.order-total-bar i{font-style:normal}.order-total-bar .grand-total{padding-left:22px;border-left:1px solid #dfe4ec}.order-total-bar .grand-total strong{color:#4338ca;font-size:20px}.order-submit-actions{position:sticky;bottom:-24px;z-index:3;margin:0 -24px -24px;padding:16px 24px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px)}
.order-list-table{min-width:1280px}.order-detail-hero{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 25px;border-radius:15px;background:linear-gradient(130deg,#f0f1ff,#f8fbff);border:1px solid #dfe3f7}.order-detail-hero>div:first-child>span{color:#5d55d6;font-size:10px;font-weight:800}.order-detail-hero h3{margin:5px 0 2px;font-size:22px}.order-detail-hero p{margin:0;color:#738096;font-size:11px}.order-detail-hero>div:last-child{display:grid;justify-items:end;gap:4px}.order-detail-hero>div:last-child>strong{color:#3730a3;font-size:24px}.order-detail-hero>div:last-child>small{color:#8b96a6}.order-detail-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:13px 0}.order-detail-grid>div{padding:12px 14px;border:1px solid #e9ecf2;border-radius:10px;background:#fbfcfe}.order-detail-grid span{display:block;margin-bottom:4px;color:#8a96a7;font-size:10px}.order-detail-grid strong{font-size:12px}.order-detail-section{margin-top:13px}.order-detail-table{min-width:1220px}.gift-badge{display:inline-flex;padding:4px 8px;border-radius:99px;background:#fff1df;color:#bf6804;font-size:10px;font-weight:800}.order-detail-totals{display:flex;justify-content:flex-end;gap:24px;padding:15px 4px 0;color:#7a8798;font-size:11px}.order-detail-totals strong{margin-left:7px;color:#26364b;font-size:14px}.order-detail-totals span:last-child strong{color:#4338ca;font-size:18px}.order-files{display:grid;grid-template-columns:1fr 1fr;gap:12px}.order-files-group{display:flex;flex-direction:column;gap:8px;min-height:85px;padding:13px;border:1px solid #e7eaf0;border-radius:11px;background:#fbfcfe}.order-files-group>strong{font-size:11px}.order-file{display:flex;align-items:center;gap:9px;width:100%;padding:8px;border:0;border-radius:9px;background:#f0f2ff;color:#27364a;text-align:left;cursor:pointer}.order-file:hover{background:#e7e9ff}.order-file i{display:grid;width:30px;height:30px;place-items:center;border-radius:8px;background:#fff;color:#4f46e5;font-style:normal}.order-file span{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.order-file small{display:block;color:#8793a4;font-size:9px}
@media(max-width:1150px){.order-header-grid{grid-template-columns:repeat(2,minmax(180px,1fr))}.order-detail-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:680px){.order-form-banner{align-items:flex-start;flex-direction:column;padding:20px}.order-auto-meta{width:100%}.order-auto-meta>span{flex:1;min-width:0}.order-header-grid{grid-template-columns:1fr}.order-upload-grid,.order-files{grid-template-columns:1fr}.order-total-bar{align-items:flex-start;flex-direction:column}.order-total-bar>div{width:100%;align-items:flex-start;flex-direction:column;gap:8px}.order-total-bar .grand-total{padding:0;border:0}.order-detail-grid{grid-template-columns:1fr 1fr}.order-detail-hero{align-items:flex-start}.order-detail-totals{align-items:flex-end;flex-direction:column;gap:7px}.order-submit-actions{bottom:-18px;margin:0 -18px -18px;padding:14px 18px}}

/* Compact business headers and single-scroll dialogs */
.business-page-head,
.module-hero,
.dashboard-hero {
  position: relative;
  display: flex;
  min-height: 0;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

/* Logistics delivery address master data */
.delivery-address-head .business-page-icon {
    background: linear-gradient(145deg, #e8f7f2, #dff3ff);
    color: #087b69;
}

.delivery-address-panel {
    overflow: hidden;
}

.delivery-address-table-shell {
    max-height: 470px;
    overflow: auto;
}

.delivery-company-cell,
.delivery-address-table-shell td:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.delivery-company-cell small,
.delivery-address-table-shell td:nth-child(2) small {
    color: var(--muted);
}

.delivery-default-tag {
    display: inline-flex;
    width: fit-content;
    margin-right: 7px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e9f8f1;
    color: #087b55;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
}

.delivery-address-form .vehicle-form-intro i {
    background: linear-gradient(145deg, #def6ee, #e3f2ff);
    color: #087b69;
}

.checkbox-label {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #dbe5f2;
    border-radius: 14px;
    background: #f8fbff;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.checkbox-label span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.checkbox-label small {
    color: var(--muted);
    font-weight: 400;
}

.vehicle-delivery-picker {
    position: relative;
}

.vehicle-delivery-picker > input[role="combobox"] {
    padding-right: 42px;
    background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%);
    background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.vehicle-delivery-suggestions {
    position: absolute;
    z-index: 30;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 330px;
    overflow-y: auto;
    padding: 7px;
    border: 1px solid #d6e0ee;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(29, 45, 75, .18);
}

.vehicle-delivery-suggestions button {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 13px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-align: left;
    box-shadow: none;
}

.vehicle-delivery-suggestions button:hover,
.vehicle-delivery-suggestions button:focus-visible {
    background: #f1f5ff;
    outline: none;
}

.vehicle-delivery-suggestions button span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vehicle-delivery-suggestions button em {
    padding: 2px 7px;
    border-radius: 999px;
    background: #e5f8ef;
    color: #087b55;
    font-size: 11px;
    font-style: normal;
}

.vehicle-delivery-suggestions button small {
    overflow: hidden;
    color: #71809a;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delivery-suggestion-state {
    padding: 20px 14px;
    color: var(--muted);
    text-align: center;
}

.vehicle-selected-delivery {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    padding: 11px 13px;
    border: 1px solid #cce9df;
    border-radius: 11px;
    background: #f0faf6;
}

.vehicle-selected-delivery strong {
    color: #087b69;
    font-size: 13px;
}

.vehicle-selected-delivery span {
    color: #526179;
    font-size: 12px;
    font-weight: 400;
}

@media (max-width: 800px) {
    .vehicle-delivery-suggestions {
        max-height: 260px;
    }
}

.module-hero { justify-content: space-between; }
.module-hero::after,
.dashboard-hero::after { display: none; }
.module-hero > div,
.dashboard-hero > div:first-child { max-width: none; }

.business-page-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 11px;
  background: #f0f1ff;
  color: #5149d8;
  font-size: 18px;
  font-weight: 800;
}

.business-page-head h3,
.module-hero h3,
.dashboard-hero h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -.01em;
}

.business-page-head p,
.module-hero p,
.dashboard-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.module-hero .eyebrow,
.dashboard-welcome,
.dashboard-orbit { display: none; }

.business-page-note {
  display: flex;
  min-width: 180px;
  margin-left: auto;
  padding-left: 18px;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.business-page-note span {
  color: #3f3aaf;
  font-size: 11px;
  font-weight: 800;
}

.business-page-note small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.order-list-panel {
  margin-top: 14px;
}

.module-summary,
.stats {
  margin-top: 14px;
}

.module-hero .hero-action {
  flex: 0 0 auto;
  margin: 0;
  color: #fff;
  background: linear-gradient(135deg, #5b53eb, #4338ca);
  box-shadow: 0 5px 13px rgba(79, 70, 229, .15);
}

#dialog {
  overflow: hidden;
  max-height: calc(100dvh - 40px);
}

#dialog[open] {
  display: flex;
  flex-direction: column;
}

#dialog > .dialog-head {
  flex: 0 0 auto;
}

#dialogBody {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
}

.order-form-banner {
  padding: 16px 18px;
  border: 1px solid #e2e6f2;
  border-radius: 13px;
  background: #f8f9fd;
  color: var(--ink);
}

.order-form-banner::after {
  display: none;
}

.order-form-banner > div:first-child > span {
  color: #625bd0;
}

.order-form-banner > div:first-child > strong {
  margin: 3px 0 1px;
  font-size: 17px;
}

.order-form-banner small {
  color: var(--muted);
}

.order-auto-meta > span {
  border-color: #e1e5ef;
  background: #fff;
  color: var(--muted);
}

.order-auto-meta strong {
  color: var(--ink);
}

.order-line-shell {
  width: 100%;
  overflow-x: auto;
}

.order-edit-table {
  min-width: 1720px;
  table-layout: auto;
}

.order-edit-table th,
.order-edit-table td,
.gift-toggle span {
  white-space: nowrap;
}

.order-edit-table th:nth-child(2),
.order-edit-table td:nth-child(2) {
  min-width: 72px;
}

.order-edit-table th:nth-child(3),
.order-edit-table td:nth-child(3) {
  min-width: 260px;
}

.order-edit-table th:nth-child(4),
.order-edit-table td:nth-child(4) {
  min-width: 145px;
}

.order-edit-table th:nth-child(5),
.order-edit-table td:nth-child(5) {
  min-width: 70px;
}

.order-edit-table th:nth-child(6),
.order-edit-table td:nth-child(6) {
  min-width: 140px;
}

.order-edit-table th:nth-child(7),
.order-edit-table td:nth-child(7) {
  min-width: 66px;
}

.order-edit-table th:nth-child(8),
.order-edit-table td:nth-child(8),
.order-edit-table th:nth-child(9),
.order-edit-table td:nth-child(9) {
  min-width: 125px;
}

.order-edit-table th:nth-child(10),
.order-edit-table td:nth-child(10) {
  min-width: 105px;
}

.order-edit-table th:nth-child(11),
.order-edit-table td:nth-child(11),
.order-edit-table th:nth-child(12),
.order-edit-table td:nth-child(12),
.order-edit-table th:nth-child(13),
.order-edit-table td:nth-child(13) {
  min-width: 108px;
}

.order-submit-actions {
  border-top: 1px solid #edf0f4;
}

@media (max-width: 680px) {
  .business-page-head,
  .module-hero,
  .dashboard-hero {
    align-items: flex-start;
    padding: 15px 16px;
    flex-wrap: wrap;
  }

  .business-page-head > div:nth-child(2) {
    min-width: calc(100% - 58px);
    flex: 1;
  }

  .business-page-note {
    width: 100%;
    margin-left: 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .business-page-head > .primary,
  .module-hero .hero-action {
    width: 100%;
    margin: 0;
  }

  #dialog {
    max-height: calc(100dvh - 20px);
  }

  .order-form-banner {
    padding: 15px 16px;
  }
}

/* Vehicle dispatch requests */
.vehicle-page-head {
  background:
    radial-gradient(circle at 84% 12%, rgba(79, 70, 229, .11), transparent 26%),
    linear-gradient(135deg, #fff 0%, #f8f9ff 100%);
}

.vehicle-page-head .business-page-icon {
  color: #fff;
  background: linear-gradient(145deg, #4f46e5, #312e81);
  box-shadow: 0 12px 30px rgba(79, 70, 229, .25);
}

.vehicle-summary > div:nth-child(3) {
  border-color: #fde2b7;
  background: linear-gradient(145deg, #fff, #fffaf1);
}

.vehicle-summary > div:nth-child(4) {
  border-color: #caeadf;
  background: linear-gradient(145deg, #fff, #f4fbf8);
}

.vehicle-list-panel {
  overflow: hidden;
  border-color: #dfe4ef;
  box-shadow: 0 18px 42px rgba(28, 39, 68, .07);
}

.vehicle-filter-bar {
  grid-template-columns: minmax(420px, 1fr) 210px auto;
}

.vehicle-table-shell {
  max-height: min(56vh, 600px);
  overflow: auto;
}

.vehicle-request-table {
  min-width: 1480px !important;
}

.vehicle-request-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f6f7fb;
  box-shadow: inset 0 -1px #e1e5ef;
}

.vehicle-request-table td {
  vertical-align: middle;
}

.vehicle-request-table td:nth-child(1) { min-width: 185px; }
.vehicle-request-table td:nth-child(2) { min-width: 280px; }
.vehicle-request-table td:nth-child(3) { min-width: 210px; }
.vehicle-request-table td:nth-child(4) { min-width: 145px; white-space: nowrap; }
.vehicle-request-table td:nth-child(5) { min-width: 150px; }
.vehicle-request-table td:nth-child(6) { min-width: 130px; white-space: nowrap; }
.vehicle-request-table td:nth-child(7) { min-width: 190px; }
.vehicle-request-table td:nth-child(8) { min-width: 220px; }

.vehicle-request-table td > small,
.vehicle-request-table td > strong + small {
  display: block;
  margin-top: 5px;
  color: #8490a8;
  line-height: 1.45;
}

.vehicle-row-actions {
  flex-wrap: nowrap;
  min-width: max-content;
}

.vehicle-plate {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid #b9d2ff;
  border-radius: 7px;
  color: #0d47a1;
  background: #edf5ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .04em;
}

.vehicle-urgent,
.vehicle-normal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.vehicle-urgent { color: #b42318; background: #fff0ee; border: 1px solid #ffd2cc; }
.vehicle-normal { color: #475467; background: #f2f4f7; border: 1px solid #e4e7ec; }

.vehicle-form-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 19px;
  margin-bottom: 22px;
  border: 1px solid #d9defa;
  border-radius: 15px;
  background: linear-gradient(135deg, #f5f6ff, #fbfcff);
}

.vehicle-form-intro i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #4f46e5, #312e81);
  font-style: normal;
  font-weight: 800;
}

.vehicle-form-intro strong,
.vehicle-form-intro span { display: block; }
.vehicle-form-intro strong { color: #12233f; font-size: 16px; }
.vehicle-form-intro span { margin-top: 4px; color: #7b879e; font-size: 13px; }

.vehicle-request-form .form-section-title,
.vehicle-arrange-form .form-section-title { margin: 24px 0 14px; }

.vehicle-detail { display: grid; gap: 18px; }

.vehicle-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-radius: 17px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 18%, rgba(129, 140, 248, .35), transparent 30%),
    linear-gradient(135deg, #15264a, #172554 60%, #312e81);
}

.vehicle-detail-hero > div:last-child { display: flex; gap: 8px; align-items: center; }
.vehicle-detail-hero > div > span:first-child { color: #aebaff; font-size: 11px; font-weight: 800; letter-spacing: .15em; }
.vehicle-detail-hero h3 { margin: 8px 0 4px; color: #fff; font-size: 25px; }
.vehicle-detail-hero p { margin: 0; color: #c8d0e3; }

.vehicle-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
  align-items: center;
  padding: 22px;
  border: 1px solid #e0e5ef;
  border-radius: 17px;
  background: #fff;
}

.vehicle-route > div { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.vehicle-route i { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: #4f46e5; font-style: normal; font-weight: 800; }
.vehicle-route > div:last-child i { background: #0f9f78; }
.vehicle-route span { min-width: 0; }
.vehicle-route small,
.vehicle-route strong,
.vehicle-route em { display: block; }
.vehicle-route small { color: #8b95a8; }
.vehicle-route strong { margin-top: 4px; color: #172b4d; line-height: 1.45; }
.vehicle-route em { margin-top: 5px; color: #778399; font-size: 12px; font-style: normal; }
.vehicle-route > b { height: 1px; margin: 0 15px; background: repeating-linear-gradient(90deg, #aeb7ca 0 7px, transparent 7px 12px); }

.vehicle-detail-section {
  padding: 21px;
  border: 1px solid #e0e5ef;
  border-radius: 17px;
  background: #fff;
}

.vehicle-detail-section.arranged { border-color: #c7e8dc; background: linear-gradient(145deg, #fff, #f7fcfa); }
.vehicle-detail-section.pending { border-style: dashed; background: #fafbfe; }
.vehicle-detail-section h4 { margin: 0 0 16px; color: #142542; font-size: 16px; }

.vehicle-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.vehicle-detail-grid > div {
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid #e7eaf1;
  border-radius: 12px;
  background: rgba(249, 250, 252, .82);
}

.vehicle-detail-grid span,
.vehicle-detail-grid strong { display: block; }
.vehicle-detail-grid span { color: #8792a6; font-size: 12px; }
.vehicle-detail-grid strong { margin-top: 7px; color: #172b4d; line-height: 1.4; }

.vehicle-note { margin-top: 13px; padding: 14px 16px; border-left: 3px solid #6366f1; border-radius: 8px; background: #f6f7ff; }
.vehicle-note span { color: #697386; font-size: 12px; font-weight: 700; }
.vehicle-note p { margin: 6px 0 0; color: #273858; line-height: 1.65; }

.vehicle-waiting { display: flex; align-items: center; justify-content: center; gap: 13px; min-height: 90px; color: #758198; }
.vehicle-waiting i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #4f46e5; background: #eeefff; font-style: normal; font-weight: 800; }
.vehicle-waiting strong,
.vehicle-waiting small { display: block; }
.vehicle-waiting strong { color: #253858; }
.vehicle-waiting small { margin-top: 4px; }

.vehicle-arrange-summary {
  display: grid;
  gap: 10px;
  padding: 17px 19px;
  border: 1px solid #dfe4ef;
  border-radius: 15px;
  background: #f8f9fc;
}

.vehicle-arrange-summary div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.vehicle-arrange-summary span { color: #8490a4; }
.vehicle-arrange-summary strong { color: #1d2e4e; }

@media (max-width: 1100px) {
  .vehicle-filter-bar { grid-template-columns: 1fr 190px; }
  .vehicle-filter-bar .document-search { grid-column: 1 / -1; }
  .vehicle-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .vehicle-filter-bar { grid-template-columns: 1fr; }
  .vehicle-detail-hero,
  .vehicle-route { display: flex; flex-direction: column; }
  .vehicle-route > b { width: 1px; height: 28px; margin: 4px 0 4px 18px; background: repeating-linear-gradient(180deg, #aeb7ca 0 7px, transparent 7px 12px); }
  .vehicle-detail-grid { grid-template-columns: 1fr; }
  .vehicle-arrange-summary div { grid-template-columns: 1fr; gap: 3px; }
}

/* Refined sign-in experience */
.login-shell {
  position: relative;
  isolation: isolate;
  grid-template-columns:minmax(420px, 1fr) 420px;
  gap: clamp(45px, 7vw, 105px);
  min-height: 100dvh;
  align-items: center;
  padding: clamp(36px, 6vw, 90px);
  overflow: hidden;
  background: radial-gradient(circle at 8% 12%, rgba(99, 102, 241, .16), transparent 30%), radial-gradient(circle at 92% 90%, rgba(14, 165, 233, .12), transparent 27%), linear-gradient(145deg, #f7f8ff, #eef4fb)
}

.login-shell::before, .login-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(99, 102, 241, .08);
  border-radius: 50%
}

.login-shell::before {
  right: -170px;
  top: -220px;
  width: 520px;
  height: 520px
}

.login-shell::after {
  left: -110px;
  bottom: -240px;
  width: 460px;
  height: 460px
}

.login-showcase {
  max-width: 670px
}

.login-showcase .login-brand {
  font-size: 24px
}

.login-showcase .brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(145deg, #6f67f4, #4338ca);
  box-shadow: 0 12px 28px rgba(79, 70, 229, .24)
}

.login-showcase-copy {
  margin-top: 64px
}

.login-showcase-copy > span {
  color: #625bd6;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em
}

.login-showcase-copy h2 {
  margin: 14px 0 16px;
  color: #172033;
  font-size: clamp(31px, 3.2vw, 48px);
  line-height: 1.2;
  letter-spacing: -.04em
}

.login-showcase-copy p {
  max-width: 590px;
  margin: 0;
  color: #718096;
  font-size: 14px;
  line-height: 1.9
}

.login-capabilities {
  display: grid;
  grid-template-columns:repeat(3, 1fr);
  gap: 12px;
  margin-top: 42px
}

.login-capabilities > div {
  display: grid;
  grid-template-columns:34px 1fr;
  column-gap: 10px;
  padding: 15px;
  border: 1px solid rgba(220, 225, 236, .9);
  border-radius: 14px;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: blur(8px)
}

.login-capabilities i {
  grid-row: 1/3;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #eeefff;
  color: #5149d8;
  font-size: 9px;
  font-style: normal;
  font-weight: 800
}

.login-capabilities strong {
  font-size: 11px
}

.login-capabilities span {
  margin-top: 2px;
  color: #8994a6;
  font-size: 9px
}

.login-card {
  width: 100%;
  padding: 34px 36px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 26px 70px rgba(30, 41, 75, .12);
  backdrop-filter: blur(18px)
}

.login-card-head {
  margin-bottom: 23px
}

.login-card h1 {
  margin: 6px 0 4px;
  font-size: 28px;
  letter-spacing: -.025em
}

.login-card-head p {
  margin: 0;
  font-size: 12px
}

.login-card label {
  margin: 13px 0;
  color: #526078;
  font-weight: 700
}

.login-card label > span {
  display: block;
  margin-bottom: 7px;
  font-size: 11px
}

.login-card input {
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border-color: #e1e5ed;
  border-radius: 11px;
  background: #fafbfe;
  color: #172033;
  transition: .17s ease
}

.login-card input:focus {
  border-color: #7771ea;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .09)
}

.login-submit {
  height: 46px;
  margin-top: 5px;
  border-radius: 11px;
  background: linear-gradient(135deg, #5f57ec, #4338ca);
  box-shadow: 0 10px 22px rgba(79, 70, 229, .2)
}

.demo-note {
  display: grid;
  grid-template-columns:auto 1fr;
  gap: 2px 12px;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #edf0f5;
  border-radius: 10px;
  background: #f8f9fc;
  font-size: 10px;
  line-height: 1.5
}

.demo-note strong {
  grid-row: 1/3;
  align-self: center;
  color: #59677b
}

.demo-note span {
  color: #8792a5
}

.login-divider {
  margin: 17px 0 12px
}

.wechat-login-btn {
  height: 44px;
  border-radius: 11px
}
.emergency-login{margin-top:18px;border-top:1px solid #e7ebf3;padding-top:14px}.emergency-login summary{cursor:pointer;text-align:center;color:#8a95a8;font-size:12px;list-style:none}.emergency-login summary::-webkit-details-marker{display:none}.emergency-login summary::after{content:'  ›';color:#5f67ee}.emergency-login[open] summary::after{content:'  ⌄'}.emergency-login-fields{padding-top:5px}.wechat-login-btn i{background:#13aa67!important}.login-card>.wechat-login-btn{height:58px;margin-top:22px;font-size:16px;font-weight:800;background:linear-gradient(135deg,#ecfbf3,#e5f8ee);border:1px solid #a9e2c3;color:#12854f}

.login-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
  color: #9aa3b1;
  font-size: 9px
}

.login-security i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a56a;
  box-shadow: 0 0 0 4px rgba(22, 165, 106, .1)
}

.wechat-login-dialog {
  width: min(390px, calc(100vw - 28px));
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .3)
}

.wechat-login-dialog::backdrop {
  background: rgba(13, 20, 36, .55);
  backdrop-filter: blur(4px)
}

.wechat-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 19px 21px;
  border-bottom: 1px solid #edf0f4
}

.wechat-dialog-head > div {
  display: flex;
  flex-direction: column
}

.wechat-dialog-head span {
  color: #18a35a;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .18em
}

.wechat-dialog-head h3 {
  margin: 3px 0 0;
  font-size: 17px
}

.wechat-dialog-head button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: #f3f5f8;
  color: #788497;
  font-size: 21px;
  cursor: pointer
}

.wechat-dialog-body {
  display: flex;
  min-height: 310px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 25px 25px 21px;
  background: linear-gradient(180deg, #fbfcfe, #f7f9fc)
}

.wechat-dialog-body img {
  width: 210px;
  height: 210px;
  padding: 8px;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(22, 32, 51, .08)
}

.wechat-qr-placeholder {
  display: flex;
  width: 210px;
  height: 210px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-direction: column;
  border: 1px dashed #d9dfe9;
  border-radius: 14px;
  background: #fff;
  color: #8994a5;
  font-size: 11px
}

.wechat-qr-placeholder i {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: #e9f9ef;
  color: #16a357;
  font-size: 17px;
  font-style: normal;
  font-weight: 800
}

.wechat-dialog-body > strong {
  margin-top: 16px;
  font-size: 12px;
  text-align: center
}

.wechat-dialog-body > p {
  margin: 5px 0 0;
  color: #929cab;
  font-size: 10px
}

.wechat-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 18px;
  border-top: 1px solid #edf0f4;
  background: #fff
}

.wechat-dialog-actions button {
  min-width: 82px
}

@media (max-width: 900px) {
  .login-shell {
    display: grid;
    grid-template-columns:minmax(0, 430px);
    justify-content: center;
    padding: 24px
  }

  .login-showcase {
    display: none
  }

  .login-card {
    padding: 31px
  }
}

@media (max-width: 480px) {
  .login-shell {
    align-items: start;
    padding: 18px 14px
  }

  .login-card {
    margin-top: 12px;
    padding: 25px 22px;
    border-radius: 20px
  }

  .login-card h1 {
    font-size: 25px
  }

  .demo-note {
    grid-template-columns:1fr
  }

  .demo-note strong {
    grid-row: auto
  }

  .wechat-dialog-body {
    min-height: 290px
  }
}

/* WeChat login */
.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  color: #98a2b2;
  font-size: 11px
}

.login-divider::before, .login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e8ebf1
}

.wechat-login-btn {
  display: flex;
  width: 100%;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #cfe8d8;
  border-radius: 10px;
  background: #f2fbf5;
  color: #16834b;
  font-weight: 750;
  cursor: pointer;
  transition: .18s ease
}

.wechat-login-btn:hover {
  border-color: #9bd2b0;
  background: #e9f8ef;
  transform: translateY(-1px)
}

.wechat-login-btn i {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: #18a957;
  color: #fff;
  font-size: 11px;
  font-style: normal
}

.wechat-qr-panel {
  display: flex;
  margin-top: 14px;
  padding: 16px;
  align-items: center;
  flex-direction: column;
  border: 1px solid #e5e9ef;
  border-radius: 14px;
  background: #fafbfd
}

.wechat-qr-panel img {
  width: 190px;
  height: 190px;
  border: 8px solid #fff;
  border-radius: 11px;
  box-shadow: 0 5px 18px rgba(22, 32, 51, .08)
}

.wechat-qr-panel strong {
  margin-top: 11px;
  font-size: 12px
}

.wechat-qr-panel > span {
  margin-top: 4px;
  color: #8c97a7;
  font-size: 10px
}

.wechat-qr-panel .link {
  margin-top: 5px;
  color: #4f46e5;
  cursor: pointer
}

/* Sales order modal sizing and polish */
#dialog:has(.sales-order-form) {
  width: min(1320px, calc(100vw - 48px));
}

#dialogBody,
.sales-order-form,
.order-form-section,
.order-lines-section,
.order-line-shell {
  min-width: 0;
  max-width: 100%;
}

#dialogBody {
  width: 100%;
}

.sales-order-form {
  width: 100%;
  gap: 13px;
}

.order-form-banner {
  min-width: 0;
  gap: 16px;
  padding: 13px 16px;
  border-color: #e5e8f1;
  box-shadow: 0 5px 18px rgba(30, 41, 59, .035);
}

.order-form-banner > div:first-child {
  min-width: 0;
}

.order-form-banner > div:first-child > span {
  font-size: 8px;
  letter-spacing: .14em;
}

.order-form-banner > div:first-child > strong {
  margin: 2px 0 0;
  font-size: 15px;
}

.order-form-banner > div:first-child > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-auto-meta {
  min-width: 0;
  flex: 0 1 auto;
}

.order-auto-meta > span {
  min-width: 112px;
  padding: 8px 11px;
  border-radius: 9px;
}

.order-form-section {
  padding: 18px;
  border-radius: 13px;
  box-shadow: 0 5px 18px rgba(30, 41, 59, .025);
}

.form-section-title {
  margin-bottom: 15px;
}

.form-section-title > span {
  flex-basis: 28px;
  height: 28px;
  border-radius: 8px;
}

.order-header-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 16px;
}

.order-header-grid > label,
.order-header-grid > fieldset {
  min-width: 0;
}

.order-header-grid input,
.order-header-grid select,
.order-header-grid textarea {
  min-width: 0;
  background: #fff;
}

.bom-complete-field {
  min-width: 0;
  flex-wrap: wrap;
  align-content: flex-start;
}

.bom-complete-field span {
  min-height: 40px;
  white-space: nowrap;
}

.order-lines-section {
  padding-right: 0;
  padding-left: 0;
  overflow: hidden;
}

.order-line-shell {
  display: block;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.order-edit-table {
  width: max-content;
  min-width: 1660px;
}

.order-submit-actions {
  box-shadow: 0 -8px 24px rgba(30, 41, 59, .045);
}

@media (max-width: 1180px) {
  .order-header-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #dialog:has(.sales-order-form) {
    width: calc(100vw - 28px);
  }

  .order-header-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  #dialog:has(.sales-order-form) {
    width: calc(100vw - 16px);
  }

  .order-form-banner {
    gap: 11px;
  }

  .order-form-banner > div:first-child > small {
    white-space: normal;
  }

  .order-auto-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .order-header-grid {
    grid-template-columns: 1fr;
  }

  .order-form-section {
    padding: 15px;
  }
}

.master-hero {
  background: linear-gradient(135deg, #fff 0%, #f5f7ff 100%);
  border: 1px solid #dfe5f3;
  color: #101a31;
  box-shadow: 0 16px 38px rgba(31, 45, 78, .08);
}

.master-hero h3 {
  color: #101a31;
}

.master-hero p {
  color: #66738d;
}

.master-hero .eyebrow {
  color: #5a55e6;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.product-cell > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.product-cell span {
  color: #6f7b91;
  font-size: 12px;
}

.product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e1e6f0;
  background: #f7f8fc;
  flex: 0 0 auto;
}

.product-thumb-empty {
  display: grid;
  place-items: center;
  color: #665cf4;
  font-size: 20px;
  background: linear-gradient(145deg, #f0efff, #f8fbff);
}

.master-field-hint {
  display: block;
  margin-top: 5px;
  font-size: 11px;
}

.master-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.master-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid #e2e7f1;
  border-radius: 16px;
  background: #fff;
  color: #17223a;
  text-align: left;
  box-shadow: 0 8px 24px rgba(31, 45, 78, .05);
}

.master-card:hover {
  transform: translateY(-2px);
  border-color: #bfc4ff;
  box-shadow: 0 14px 30px rgba(73, 65, 205, .11);
}

.master-card i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #5146d8;
  background: #f0efff;
  font-style: normal;
  font-weight: 800;
}

.master-card span {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.master-card strong {
  font-size: 15px;
}

.master-card small {
  color: #7a8599;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.master-card b {
  color: #5b52dc;
  font-size: 12px;
}

.master-group {
  padding: 22px;
}

.master-count {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #4e46c8;
  background: #f0efff;
  font-weight: 800;
  font-size: 12px;
}

.basic-list-hero,
.partner-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid #dfe5ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(29, 42, 73, .06);
}

.basic-list-hero h3,
.partner-hero h3 {
  margin: 3px 0 4px;
  font-size: 24px;
  color: #111b31;
}

.basic-list-hero p,
.partner-hero p {
  margin: 0;
  color: #6d7890;
}

.basic-back {
  align-self: start;
  padding: 9px 12px;
  border: 1px solid #dce2ed;
  border-radius: 11px;
  color: #4d5a72;
  background: #f8fafc;
  white-space: nowrap;
}

.basic-back:hover {
  border-color: #b9bef7;
  color: #4941c9;
  background: #f4f3ff;
}

.basic-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-left: 26px;
  border-left: 1px solid #e6eaf1;
}

.basic-hero-stat strong {
  color: #4f46d8;
  font-size: 30px;
  line-height: 1;
}

.basic-hero-stat span {
  margin-top: 6px;
  color: #7b8598;
  font-size: 12px;
}

.basic-list-panel,
.partner-panel {
  padding: 0;
  overflow: hidden;
}

.basic-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #e8ebf2;
  background: #fff;
}

.basic-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(420px, 100%);
  padding: 0 13px;
  border: 1px solid #dce2ec;
  border-radius: 12px;
  background: #f8fafc;
}

.basic-search span {
  color: #78849a;
  font-size: 18px;
}

.basic-search input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.basic-search input:focus {
  box-shadow: none;
}

.basic-table-shell {
  margin: 0;
  border: 0;
  border-radius: 0;
}

/* Procurement demand pool */
.procurement-page-head {
  margin-bottom: 15px
}

.procurement-page-head .business-page-icon {
  background: #e9f8f3;
  color: #078363
}

.procurement-kpis {
  display: grid;
  grid-template-columns:repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 15px
}

.procurement-kpis > div {
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft)
}

.procurement-kpis span {
  display: block;
  color: #718096;
  font-size: 12px
}

.procurement-kpis strong {
  display: block;
  margin-top: 7px;
  color: #102a4c;
  font-size: 23px
}

.procurement-pool {
  padding: 0;
  overflow: hidden
}

.procurement-tabs {
  display: flex;
  gap: 7px;
  padding: 12px 18px;
  border-bottom: 1px solid #e7ebf2
}

.procurement-tabs button {
  position: relative;
  padding: 9px 13px;
  border: 0;
  border-radius: 10px;
  background: #f5f7fb;
  color: #65758d;
  font-weight: 750;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease
}

.procurement-tabs button span {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 10px;
  background: #f0f3f8;
  color: #7b8799;
  font-size: 10px
}

.procurement-tabs button.active {
  background: #eeedff;
  color: #4f46e5;
  box-shadow: inset 0 0 0 1px #d9d6ff
}

.procurement-tabs button.active:after {
  display: none
}

.procurement-tabs button.active span {
  background: #eeedff;
  color: #4f46e5
}

.procurement-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #e8ebf2;
  background: #fafbfe
}

.procurement-search {
  display: flex;
  width: min(520px, 100%);
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #dce3ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(34, 48, 76, .035);
  transition: border-color .16s ease, box-shadow .16s ease
}

.procurement-search:focus-within {
  border-color: #8e87eb;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .08)
}

.procurement-search i {
  color: #7d899a;
  font-size: 18px;
  font-style: normal
}

.procurement-search input {
  width: 100%;
  min-height: 42px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent
}

.procurement-toolbar-note {
  display: flex;
  min-width: 190px;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  color: #42516a
}

.procurement-toolbar-note strong {
  font-size: 11px
}

.procurement-toolbar-note small {
  color: #8994a5;
  font-size: 10px
}

.procurement-toolbar > button {
  min-height: 42px;
  flex: 0 0 auto;
  padding-inline: 16px;
  white-space: nowrap
}

.procurement-demand-table {
  border-top: 0
}

.procurement-demand-table table {
  min-width: 1180px
}

.procurement-demand-table th {
  white-space: nowrap
}

.procurement-demand-table td {
  padding-top: 15px;
  padding-bottom: 15px;
  vertical-align: middle
}

.procurement-demand-table tr.selected {
  background: #f5f4ff
}

.procurement-demand-table td small {
  display: block;
  margin-top: 4px;
  color: #8190a5
}

.purchase-check {
  width: 42px;
  text-align: center !important
}

.purchase-check input {
  width: 16px;
  height: 16px;
  accent-color: #4f46e5
}

.purchase-state {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap
}

.purchase-state.UNPURCHASED {
  background: #fff4e5;
  color: #b76008
}

.purchase-state.PARTIAL {
  background: #edf2ff;
  color: #4058c9
}

.purchase-state.FULL {
  background: #eaf8f1;
  color: #15815d
}

.same-material {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 6px;
  border-radius: 5px;
  background: #eef7ff;
  color: #2774ad;
  font-size: 10px;
  font-style: normal;
  font-weight: 700
}

.procurement-selection {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 22px;
  border-top: 1px solid #e5eaf1;
  background: #fbfcfe
}

.procurement-selection.active {
  background: linear-gradient(90deg, #f7f6ff, #fbfbff)
}

.procurement-selection strong {
  color: #20334d
}

.procurement-selection small {
  display: block;
  margin-top: 3px;
  color: #78879b
}

.procurement-orders {
  margin-top: 15px
}

.procurement-order-table {
  min-width: 1040px !important
}

.procurement-order-table th,
.procurement-order-table td {
  vertical-align: middle;
  white-space: nowrap
}

.procurement-order-table tbody tr:hover td {
  background: #fafaff
}

.procurement-action-column {
  width: 180px;
  min-width: 180px
}

.procurement-order-actions {
  min-width: 0;
  align-items: center;
  flex-wrap: nowrap;
  gap: 7px
}

.procurement-order-actions button {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 11px;
  white-space: nowrap
}

.procurement-order-actions .detail {
  border-color: #dfe3ec;
  background: #fff;
  color: #35435a
}

.procurement-order-actions .detail:hover {
  border-color: #aaa5ef;
  background: #f7f6ff;
  color: #4f46d8
}

.procurement-order-actions .print {
  box-shadow: 0 5px 12px rgba(79, 70, 229, .14)
}

.procurement-order-link {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: #235ea9;
  font: inherit;
  font-weight: 800;
  cursor: pointer
}

.procurement-order-link:hover {
  color: #4f46dc;
  text-decoration: underline
}

.procurement-order-table td > small,
.procurement-order-status small {
  display: block;
  margin-top: 5px;
  color: #8994a5;
  font-size: 10px
}

.procurement-order-amount {
  color: #1e3554;
  font-weight: 800
}

.procurement-order-status {
  display: flex;
  align-items: flex-start;
  flex-direction: column
}

.purchase-delivery-state {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f0f3f8;
  color: #66758a;
  font-size: 10px;
  font-weight: 750
}

.purchase-delivery-state.done {
  background: #e9f8f1;
  color: #13785b
}

.purchase-order-detail {
  width: min(980px, calc(100vw - 96px));
  color: #1b2940
}

.purchase-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: -4px -4px 18px;
  padding: 22px 24px;
  border: 1px solid #e2e6ef;
  border-radius: 16px;
  background: linear-gradient(135deg, #fafaff, #f4f7fc)
}

.purchase-detail-hero span {
  color: #625be0;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 1.8px
}

.purchase-detail-hero h3 {
  margin: 6px 0 4px;
  color: #16243b;
  font-size: 22px
}

.purchase-detail-hero p {
  margin: 0;
  color: #748197;
  font-size: 11px
}

.purchase-detail-hero > div:last-child {
  display: flex;
  align-items: flex-end;
  flex-direction: column
}

.purchase-detail-hero > div:last-child small {
  margin-top: 7px;
  color: #808ca0
}

.purchase-detail-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px
}

.purchase-detail-info > div {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid #e4e8f0;
  border-radius: 12px;
  background: #fff
}

.purchase-detail-info span,
.purchase-detail-info small {
  display: block;
  color: #8490a3;
  font-size: 10px
}

.purchase-detail-info strong {
  display: block;
  overflow: hidden;
  margin: 6px 0 4px;
  color: #23344d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap
}

.purchase-receipt-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-radius: 13px 13px 0 0;
  background: #f6f8fc
}

.purchase-receipt-summary > div {
  padding: 2px 10px;
  border-right: 1px solid #e0e5ee
}

.purchase-receipt-summary > div:last-child {
  border-right: 0
}

.purchase-receipt-summary span,
.purchase-receipt-summary small {
  display: block;
  color: #8490a2;
  font-size: 10px
}

.purchase-receipt-summary strong {
  display: block;
  margin: 4px 0;
  color: #1b3d67;
  font-size: 21px
}

.purchase-receipt-summary .pending strong,
.pending-quantity {
  color: #c47a19
}

.completed-quantity {
  color: #168060
}

.purchase-overall-progress {
  height: 5px;
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 0 0 99px 99px;
  background: #e6eaf1
}

.purchase-overall-progress i,
.purchase-line-progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #5c52e3, #16a281)
}

.purchase-detail-lines {
  overflow: hidden;
  border: 1px solid #e1e6ee;
  border-radius: 14px
}

.purchase-detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid #e5e9f0;
  background: #fbfcfe
}

.purchase-detail-section-title > div {
  display: flex;
  align-items: flex-end;
  flex-direction: column
}

.purchase-detail-section-title > div:first-child {
  align-items: flex-start
}

.purchase-detail-section-title strong {
  color: #1d2d45;
  font-size: 13px
}

.purchase-detail-section-title span {
  margin-top: 4px;
  color: #8490a2;
  font-size: 10px
}

.purchase-detail-lines table {
  min-width: 820px
}

.purchase-detail-lines td,
.purchase-detail-lines th {
  padding-top: 12px;
  padding-bottom: 12px
}

.purchase-detail-lines td small {
  display: block;
  margin-top: 4px;
  color: #8793a5
}

.purchase-line-no {
  display: inline-flex;
  width: 27px;
  height: 27px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f0efff;
  color: #554bd5;
  font-weight: 800
}

.purchase-line-progress {
  width: 76px;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8ebf1
}

.purchase-detail-remark {
  margin-top: 13px;
  padding: 14px 16px;
  border: 1px solid #ebe3ce;
  border-radius: 12px;
  background: #fffdf7
}

.purchase-detail-remark span {
  color: #967332;
  font-size: 10px;
  font-weight: 800
}

.purchase-detail-remark p {
  margin: 6px 0 0;
  color: #5f5545;
  line-height: 1.65
}

.purchase-detail-actions {
  margin-top: 18px
}

@media (max-width: 900px) {
  .purchase-order-detail {width: calc(100vw - 42px)}
  .purchase-detail-info,.purchase-receipt-summary {grid-template-columns: 1fr 1fr}
  .purchase-receipt-summary > div {border-right: 0}
}

.purchase-dialog-summary {
  display: grid;
  grid-template-columns:repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px
}

.purchase-dialog-summary > div {
  padding: 12px 14px;
  border: 1px solid #e1e7f0;
  border-radius: 10px;
  background: #f8faff
}

.purchase-dialog-summary span {
  display: block;
  color: #75849a;
  font-size: 11px
}

.purchase-dialog-summary strong {
  display: block;
  margin-top: 5px;
  color: #20334d
}

.purchase-dialog-table table {
  min-width: 900px
}

.warehouse-page-head {
  margin-bottom: 15px
}

.warehouse-page-head .business-page-icon {
  background: #e9f4ff;
  color: #1f67ad
}

.warehouse-kpis {
  grid-template-columns:repeat(5, minmax(130px, 1fr))
}

.warehouse-kpis > div {
  border-top: 3px solid #dbeafe
}

.warehouse-section {
  margin-top: 15px;
  padding: 0;
  overflow: hidden
}

.warehouse-section .panel-head {
  margin: 0;
  padding: 18px 22px;
  border-bottom: 1px solid #e8edf4
}

.warehouse-section .panel-head h3 {
  margin-bottom: 4px
}

.warehouse-section .table-shell {
  border: 0;
  border-radius: 0
}

.warehouse-section table {
  margin: 0
}

.warehouse-section .compact-empty {
  padding: 38px 20px
}

.warehouse-section button.small {
  min-height: 34px;
  padding: 7px 12px
}

.warehouse-actions {
  display: flex;
  align-items: center;
  gap: 8px
}

.inventory-operation-type {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800
}

.inventory-operation-type.OTHER_INBOUND {
  background: #eaf8f1;
  color: #15815d
}

.inventory-operation-type.OTHER_OUTBOUND {
  background: #fff1f2;
  color: #be123c
}

.inventory-operation-type.TRANSFER {
  background: #eef2ff;
  color: #4058c9
}

.inventory-operation-line select {
  min-width: 380px
}

.inventory-operation-line input {
  min-width: 160px
}

@media (max-width: 900px) {
  .procurement-kpis, .warehouse-kpis {
    grid-template-columns:repeat(2, 1fr)
  }

  .procurement-toolbar {
    align-items: stretch;
    flex-direction: column
  }

  .procurement-search {
    width: 100%
  }

  .procurement-toolbar-note {
    min-width: 0
  }

  .procurement-toolbar > button {
    width: 100%
  }

  .procurement-tabs {
    overflow-x: auto;
    white-space: nowrap
  }

  .purchase-dialog-summary {
    grid-template-columns:1fr
  }

  .procurement-selection {
    align-items: stretch;
    flex-direction: column
  }

  .procurement-selection button {
    width: 100%
  }

  .warehouse-section .panel-head {
    align-items: flex-start;
    flex-direction: column
  }

  .warehouse-actions {
    width: 100%;
    flex-wrap: wrap
  }

  .warehouse-actions button {
    flex: 1
  }

  .inventory-operation-line select {
    min-width: 260px
  }
}

.procurement-receipts, .procurement-returns {
  margin-top: 15px
}

.procurement-returns .table-shell table {
  min-width: 980px
}

.return-hint {
  margin-bottom: 15px;
  border-color: #f1d7dc;
  border-left-color: #d94a5c;
  background: #fff7f8
}

.purchase-return-table table {
  min-width: 900px
}

.purchase-return-table input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: #d83b52
}

.negative-qty {
  color: #c93448;
  font-weight: 800
}

.positive-qty {
  color: #148361;
  font-weight: 800
}

.basic-data-table {
  min-width: 860px;
}

.basic-data-table th {
  white-space: nowrap;
  color: #68758e;
  font-size: 12px;
  letter-spacing: .02em;
  background: #f6f8fb;
}

.basic-data-table td {
  min-width: 118px;
  max-width: 260px;
  padding-top: 16px;
  padding-bottom: 16px;
  vertical-align: middle;
  line-height: 1.55;
}

.basic-data-table tbody tr:hover td {
  background: #fafaff;
}

.basic-data-table .sticky-action {
  position: sticky;
  right: 0;
  min-width: 140px;
  background: #fff;
  box-shadow: -8px 0 16px rgba(35, 46, 75, .04);
}

.basic-data-table thead .sticky-action {
  background: #f6f8fb;
}

.basic-cell-value {
  display: block;
  overflow-wrap: anywhere;
  color: #26344d;
}

.cell-empty {
  color: #b0b7c4;
}

.updated-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
}

.updated-cell strong {
  color: #35415a;
  font-size: 13px;
}

.updated-cell small {
  color: #929bad;
}

.mini-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.mini-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.mini-status.enabled {
  color: #11845f;
  background: #eaf8f2;
}

.mini-status.disabled {
  color: #9a5660;
  background: #fff0f2;
}

.polished-empty {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 240px;
  justify-content: center;
}

.polished-empty strong {
  color: #2a3650;
  font-size: 16px;
}

.partner-hero {
  border-left: 4px solid #5b51df;
}

.partner-stats {
  display: flex;
  gap: 12px;
}

.partner-stats span {
  display: flex;
  flex-direction: column;
  min-width: 86px;
  padding: 12px 14px;
  border-radius: 13px;
  color: #748096;
  background: #f6f7fb;
  font-size: 11px;
}

.partner-stats strong {
  margin-bottom: 4px;
  color: #282f48;
  font-size: 20px;
}

.partner-list {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #f5f7fb;
}

.partner-card {
  overflow: hidden;
  border: 1px solid #e0e5ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 43, 75, .05);
}

.partner-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf0f5;
}

.partner-identity {
  display: flex;
  align-items: center;
  gap: 13px;
}

.partner-identity > i {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #fff;
  background: #5750d9;
  font-style: normal;
  font-size: 18px;
  font-weight: 800;
}

.partner-identity > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.partner-identity span {
  color: #7a8498;
  font-size: 11px;
  letter-spacing: .06em;
}

.partner-identity h4 {
  margin: 0;
  color: #18233a;
  font-size: 17px;
}

.partner-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.partner-info-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(125px, 1fr));
  gap: 1px;
  padding: 1px;
  background: #edf0f5;
}

.partner-info-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  background: #fff;
}

.partner-info-grid > div.wide {
  grid-column: span 2;
}

.partner-info-grid span {
  color: #8993a5;
  font-size: 11px;
}

.partner-info-grid strong {
  overflow: hidden;
  color: #33405a;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-level {
  padding: 17px 20px 20px;
  background: #fafbfe;
}

.contact-level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.contact-level-head > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.contact-level-head strong {
  color: #202c44;
  font-size: 14px;
}

.contact-level-head span {
  color: #8b95a6;
  font-size: 11px;
}

.contact-add {
  padding: 7px 11px;
  border: 1px solid #cbc9f7;
  border-radius: 9px;
  color: #4f47cf;
  background: #f3f2ff;
  font-size: 12px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 10px;
}

.contact-card {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: start;
  gap: 11px;
  padding: 13px;
  border: 1px solid #e3e7ef;
  border-radius: 13px;
  background: #fff;
}

.contact-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #4d46ce;
  background: #eeedff;
  font-weight: 800;
}

.contact-main {
  min-width: 0;
}

.contact-main > div:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}

.contact-main strong {
  color: #25314a;
}

.contact-main small {
  display: block;
  margin-top: 3px;
  color: #8992a3;
}

.primary-contact {
  padding: 2px 6px;
  border-radius: 999px;
  color: #19745a;
  background: #e9f8f1;
  font-size: 10px;
}

.contact-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  margin-top: 9px;
  color: #5d6980;
  font-size: 12px;
}

.contact-lines .address {
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-actions {
  display: flex;
  gap: 5px;
}

.contact-actions button {
  padding: 6px 8px;
  font-size: 11px;
}

.contact-empty {
  padding: 18px;
  border: 1px dashed #d6dbe7;
  border-radius: 12px;
  color: #8791a3;
  text-align: center;
  background: #fff;
}

.master-edit-form {
  padding: 4px 2px 0;
}

.master-form-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #e4e7f1;
  border-radius: 14px;
  background: #f8f9fd;
}

.master-form-intro i {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  background: #5750d9;
  font-style: normal;
  font-weight: 800;
}

.master-form-intro > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.master-form-intro strong {
  color: #202c45;
}

.master-form-intro span {
  color: #7e889b;
  font-size: 12px;
}

.master-edit-form label > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: #4c5971;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .basic-list-hero,
  .partner-hero {
    grid-template-columns: auto 1fr;
  }

  .basic-hero-stat,
  .partner-stats {
    grid-column: 2;
    justify-self: start;
  }

  .partner-info-grid {
    grid-template-columns: repeat(3, minmax(125px, 1fr));
  }
}

@media (max-width: 720px) {
  .basic-list-hero,
  .partner-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .basic-hero-stat,
  .partner-stats {
    grid-column: 1;
  }

  .partner-stats {
    width: 100%;
    overflow-x: auto;
  }

  .basic-list-toolbar,
  .partner-card > header,
  .contact-level-head {
    align-items: stretch;
    flex-direction: column;
  }

  .basic-search {
    width: 100%;
  }

  .partner-card-actions {
    flex-wrap: wrap;
  }

  .partner-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partner-info-grid > div.wide {
    grid-column: span 2;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    grid-template-columns: 38px 1fr;
  }

  .contact-actions {
    grid-column: 2;
  }
}

/* Customer and supplier modules: BOM-style master/detail workspace */
.partner-module-hero {
  margin-bottom: 0;
}

.partner-summary {
  margin-bottom: 16px;
}

.partner-module-panel {
  min-height: 360px;
}

.partner-subnav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fafbfe;
}

.partner-subnav button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #66738b;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.partner-subnav button span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #e9edf5;
  color: #7a8496;
  font-size: 10px;
}

.partner-subnav button.active {
  border-color: #d9d7ff;
  background: #eeedff;
  color: #4c43d7;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .08);
}

.partner-subnav button.active span {
  background: #fff;
  color: #5148dc;
}

.partner-pane.hidden {
  display: none;
}

.partner-module-table {
  min-width: 1120px;
}

.partner-contact-table {
  min-width: 1050px;
}

.partner-level-table {
  min-width: 760px;
}

.partner-address-cell {
  min-width: 190px;
  max-width: 280px;
  white-space: normal;
  line-height: 1.55;
}

.partner-detail {
  min-width: min(980px, calc(100vw - 110px));
}

.partner-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.partner-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.partner-detail-grid > div {
  min-height: 68px;
  padding: 13px 15px;
  border: 1px solid #e8ebf2;
  border-radius: 11px;
  background: #f8f9fc;
}

.partner-detail-grid span, .partner-detail-grid strong {
  display: block;
}

.partner-detail-grid span {
  margin-bottom: 6px;
  color: #8a95a7;
  font-size: 10px;
}

.partner-detail-grid strong {
  color: #273249;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.partner-detail-section {
  margin-top: 15px;
  padding: 16px;
  border: 1px solid #e5e8f0;
  border-radius: 13px;
  background: #fafbfe;
}

.partner-detail-section .contact-grid {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .partner-subnav {
    align-items: stretch;
    flex-direction: column;
  }

  .partner-subnav button {
    justify-content: space-between;
  }

  .partner-detail {
    min-width: 0;
  }

  .partner-detail-head {
    align-items: stretch;
    flex-direction: column;
  }

  .partner-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .partner-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Login feedback and first-use WeChat guidance */
.login-message {
  display: flex;
  min-height: 42px;
  align-items: center;
  margin: 5px 0 13px;
  padding: 10px 12px;
  border: 1px solid #ffd0d7;
  border-radius: 10px;
  background: #fff3f5;
  color: #b72f45;
  font-size: 12px;
  line-height: 1.55;
}

.login-message::before {
  content: "!";
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-right: 8px;
  place-items: center;
  border-radius: 50%;
  background: #d94b60;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.login-message.success {
  border-color: #bfe9d2;
  background: #effaf4;
  color: #147444;
}

.login-message.success::before {
  content: "✓";
  background: #20a665;
}

.login-message.info {
  border-color: #cddcff;
  background: #f2f6ff;
  color: #345888;
}

.login-message.info::before {
  content: "i";
  background: #5d7edb;
}

.login-field-error > span {
  color: #b72f45;
}

.login-field-error input {
  border-color: #e66b7c;
  background: #fffafb;
  box-shadow: 0 0 0 3px rgba(217, 75, 96, .08);
}

.login-submit:disabled {
  cursor: wait;
  opacity: .72;
}
.login-options{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:13px 0 17px;color:#69768a;font-size:12px}
.login-options label{display:flex!important;align-items:center;gap:8px;margin:0!important;cursor:pointer}
.login-options input{width:16px!important;height:16px!important;margin:0!important;accent-color:#5147dc}
.login-options button,.register-entry{border:0;background:transparent;color:#5147dc;font-size:12px;font-weight:700;cursor:pointer}
.register-entry{display:block;width:100%;margin-top:13px;padding:6px;text-align:center}
.register-dialog{width:min(620px,calc(100vw - 32px));padding:0;border:0;border-radius:22px;box-shadow:0 28px 80px rgba(25,35,65,.24)}
.register-dialog::backdrop{background:rgba(16,24,40,.58);backdrop-filter:blur(3px)}
.register-dialog form{padding:27px}
.register-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:20px;border-bottom:1px solid #e8ebf2}
.register-head span{color:#6158df;font-size:10px;font-weight:900;letter-spacing:.13em}.register-head h2{margin:6px 0 5px;font-size:24px}.register-head p{margin:0;color:#7b8799;font-size:12px}
.register-head button{width:38px;height:38px;border:0;border-radius:10px;background:#f2f4f8;color:#758196;font-size:24px;cursor:pointer}
.register-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:21px}.register-grid label{color:#536176;font-size:12px;font-weight:700}.register-grid label span{display:block;margin-bottom:7px}.register-grid input{width:100%;height:45px;padding:0 12px;border:1px solid #dce2ec;border-radius:10px;outline:none}.register-grid input:focus{border-color:#6158df;box-shadow:0 0 0 3px rgba(81,71,220,.1)}
.register-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;padding-top:17px;border-top:1px solid #edf0f4}
@media(max-width:640px){.register-grid{grid-template-columns:1fr}.login-options{align-items:flex-start;flex-direction:column;gap:9px}}

.wechat-register-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 9px;
  background: #f3f8f5;
  color: #6e7b73;
  font-size: 10px;
  line-height: 1.55;
}

.wechat-register-note strong {
  flex: 0 0 auto;
  color: #198652;
}

/* Keep both sign-in methods visible on a standard laptop viewport. */
.login-shell {
  padding-block: clamp(20px, 4vh, 48px);
}

.login-card {
  padding: 26px 32px;
}

.login-card-head {
  margin-bottom: 14px;
}

.login-card label {
  margin: 10px 0;
}

.login-options {
  margin: 12px 0 15px;
}

.login-card .wechat-login-btn {
  margin-top: 10px;
  min-height: 46px;
}

.login-card .register-entry {
  margin-top: 11px;
}

.login-card .login-security {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .login-shell { padding: 20px; }
  .login-card { width: min(100%, 480px); margin: auto; }
}

@media (max-width: 480px) {
  .login-shell { padding: 14px; }
  .login-card { padding: 24px 20px; }
}

/* Approval workbench, document review and returned-application reminders */
.nav-alert {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  margin-left: auto;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #ef5367;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  box-shadow: 0 0 0 4px rgba(239, 83, 103, .1);
}

.approval-work-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 15px;
  padding: 20px 23px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.approval-work-hero > div:first-child > span {
  color: #5951da;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .16em;
}

.approval-work-hero h3 {
  margin: 5px 0 3px;
  font-size: 20px;
}

.approval-work-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.approval-work-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 9px;
}

.approval-work-summary > div {
  min-width: 105px;
  padding: 10px 13px;
  border: 1px solid #e7eaf0;
  border-radius: 11px;
  background: #fafbfe;
}

.approval-work-summary small, .approval-work-summary strong {
  display: block;
}

.approval-work-summary small {
  color: #8994a5;
  font-size: 9px;
}

.approval-work-summary strong {
  margin-top: 3px;
  font-size: 19px;
}

.approval-work-summary .warn {
  border-color: #ffd8bd;
  background: #fff8f1;
}

.approval-work-summary .warn strong {
  color: #c46222;
}

.approval-work-panel {
  min-height: 380px;
  padding: 0;
  overflow: hidden;
}

.approval-work-tabs {
  display: flex;
  gap: 5px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #fafbfe;
}

.approval-work-tabs button {
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #68758a;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.approval-work-tabs button span {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #e9edf4;
  font-size: 9px;
}

.approval-work-tabs button.active {
  border-color: #d9d7ff;
  background: #eeedff;
  color: #4c43d7;
}

.approval-work-tabs button i {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef5367;
  box-shadow: 0 0 0 3px #fff;
}

.approval-work-pane {
  padding: 15px;
}

.approval-card-list {
  display: grid;
  gap: 10px;
}

.approval-work-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 17px;
  border: 1px solid #e7eaf0;
  border-radius: 13px;
  background: #fff;
  transition: .16s ease;
}

.approval-work-card:hover {
  border-color: #d9d7ef;
  box-shadow: 0 8px 22px rgba(30, 45, 72, .06);
  transform: translateY(-1px);
}

.approval-work-card.returned {
  border-left: 4px solid #e15b4d;
  background: linear-gradient(90deg, #fff8f5, #fff 24%);
}

.approval-card-main {
  min-width: 0;
  flex: 1;
}

.approval-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.approval-card-title > span {
  padding: 4px 7px;
  border-radius: 6px;
  background: #eeefff;
  color: #5148d7;
  font-size: 9px;
  font-weight: 800;
}

.approval-card-title strong {
  font-size: 13px;
}

.approval-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 8px;
  color: #8792a4;
  font-size: 10px;
}

.approval-card-main > p {
  margin: 9px 0 0;
  color: #647187;
  font-size: 10px;
}

.approval-card-main .return-reason {
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff2ed;
  color: #a54b37;
}

.approval-card-side {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.approval-empty {
  display: flex;
  min-height: 250px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #8a96a8;
}

.approval-empty i {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 14px;
  background: #f0f1f6;
  color: #6f78a4;
  font-size: 18px;
  font-style: normal;
}

.approval-empty strong {
  color: #556276;
  font-size: 13px;
}

.approval-empty span {
  margin-top: 5px;
  font-size: 10px;
}

#dialog:has(.approval-detail) {
  width: min(1320px, calc(100vw - 42px));
}

.approval-detail {
  display: grid;
  gap: 13px;
}

.approval-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 21px;
  border: 1px solid #e1e4f4;
  border-radius: 14px;
  background: linear-gradient(120deg, #f3f3ff, #f9fbff);
}

.approval-detail-hero > div:first-child > span {
  color: #5d55d6;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .13em;
}

.approval-detail-hero h3 {
  margin: 5px 0 3px;
  font-size: 19px;
}

.approval-detail-hero p, .approval-detail-hero small {
  display: block;
  margin: 0;
  color: #7f8a9c;
  font-size: 10px;
}

.approval-detail-hero > div:last-child {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.approval-return-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid #ffd5cc;
  border-radius: 11px;
  background: #fff5f2;
  color: #9f4433;
  font-size: 11px;
}

.approval-return-alert strong {
  flex: 0 0 auto;
}

.approval-return-alert span {
  padding-left: 12px;
  border-left: 1px solid #f1c7be;
}

.approval-detail-section {
  padding: 18px;
  border: 1px solid #e5e8ef;
  border-radius: 14px;
  background: #fff;
}

.approval-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.approval-info-grid > div {
  min-height: 60px;
  padding: 11px 12px;
  border: 1px solid #e9ecf2;
  border-radius: 9px;
  background: #fafbfe;
}

.approval-info-grid span, .approval-info-grid strong {
  display: block;
}

.approval-info-grid span {
  margin-bottom: 5px;
  color: #8b96a7;
  font-size: 9px;
}

.approval-info-grid strong {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.approval-detail-table {
  min-width: 900px;
}

.approval-detail-table.sales {
  min-width: 850px;
}

.approval-files {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 13px;
}

.approval-file-group {
  display: flex;
  min-height: 78px;
  padding: 11px;
  flex-direction: column;
  gap: 7px;
  border: 1px solid #e7eaf0;
  border-radius: 10px;
  background: #fafbfe;
}

.approval-file-group > strong {
  font-size: 10px;
}

.approval-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border: 0;
  border-radius: 8px;
  background: #f0f1ff;
  color: #344057;
  text-align: left;
  cursor: pointer;
}

.approval-file i {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 7px;
  background: #fff;
  color: #4f46e5;
  font-style: normal;
}

.approval-file span {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-file small {
  display: block;
  margin-top: 2px;
  color: #8d97a7;
  font-size: 8px;
}

.approval-history {
  display: grid;
  gap: 0;
}

.approval-history-row {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  min-height: 64px;
}

.approval-history-row::before {
  content: "";
  position: absolute;
  top: 19px;
  bottom: -2px;
  left: 7px;
  width: 1px;
  background: #e1e5ec;
}

.approval-history-row:last-child::before {
  display: none;
}

.approval-history-row > i {
  position: relative;
  z-index: 1;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #e2a03a;
  box-shadow: 0 0 0 2px #e2a03a;
}

.approval-history-row > i.APPROVED {
  background: #18a572;
  box-shadow: 0 0 0 2px #18a572;
}

.approval-history-row > i.REJECTED {
  background: #df4c5d;
  box-shadow: 0 0 0 2px #df4c5d;
}

.approval-history-row > div > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.approval-history-row strong {
  font-size: 11px;
}

.approval-history-row span {
  display: block;
  margin-top: 4px;
  color: #8994a6;
  font-size: 9px;
}

.approval-history-row p {
  margin: 7px 0 14px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f8fb;
  color: #566378;
  font-size: 10px;
}

.approval-detail-actions {
  position: sticky;
  bottom: -24px;
  z-index: 3;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin: 0 -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

@media (max-width: 900px) {
  .approval-work-hero {
    align-items: flex-start;
    flex-direction: column
  }

  .approval-work-summary {
    width: 100%
  }

  .approval-info-grid {
    grid-template-columns:repeat(2, 1fr)
  }
}

@media (max-width: 650px) {
  .approval-work-summary {
    grid-template-columns:1fr
  }

  .approval-work-tabs {
    overflow-x: auto
  }

  .approval-work-card {
    align-items: flex-start;
    flex-direction: column
  }

  .approval-card-side {
    width: 100%;
    justify-content: space-between
  }

  .approval-info-grid, .approval-files {
    grid-template-columns:1fr
  }

  .approval-return-alert {
    align-items: flex-start;
    flex-direction: column
  }

  .approval-return-alert span {
    padding: 0;
    border: 0
  }
}

/* Independent warehouse modules */
.nav-group-label {
  margin: 13px 11px 3px;
  padding: 8px 7px 4px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: #66738d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em
}

nav button.nav-subitem {
  min-height: 39px;
  padding-block: 7px;
  padding-left: 22px;
  font-size: 12px
}

.nav-subitem .nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px
}

.warehouse-module-grid {
  display: grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap: 13px
}

.warehouse-module-grid > button {
  display: grid;
  grid-template-columns:48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 19px;
  border: 1px solid #dfe6f0;
  border-radius: 16px;
  background: #fff;
  color: #26364f;
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: .18s ease
}

.warehouse-module-grid > button:hover {
  border-color: #c7d2fe;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(48, 64, 105, .11)
}

.warehouse-module-grid i {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #eef2ff, #e5ecff);
  color: #4f46e5;
  font-size: 15px;
  font-style: normal;
  font-weight: 900
}

.warehouse-module-grid span {
  min-width: 0
}

.warehouse-module-grid strong {
  display: block;
  font-size: 15px
}

.warehouse-module-grid small {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: #7b879a;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap
}

.warehouse-module-grid b {
  color: #5b55df;
  font-size: 11px;
  white-space: nowrap
}

@media (max-width: 900px) {
  .nav-group-label {
    display: none
  }

  .warehouse-module-grid {
    grid-template-columns:1fr
  }
}

@media (max-width: 520px) {
  .warehouse-module-grid > button {
    grid-template-columns:40px minmax(0, 1fr);
    min-height: 92px;
    padding: 15px
  }

  .warehouse-module-grid i {
    width: 40px;
    height: 40px
  }

  .warehouse-module-grid b {
    display: none
  }
}

/* Sales outbound and fulfillment */
.sales-fulfillment {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap
}

.sales-fulfillment.UNSHIPPED {
  background: #f0f2f6;
  color: #697589
}

.sales-fulfillment.PARTIAL {
  background: #fff2df;
  color: #a76008
}

.sales-fulfillment.FULL {
  background: #e7f8f0;
  color: #087d58
}

.sales-progress-summary {
  display: grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 13px
}

.sales-progress-summary > div {
  min-height: 62px;
  padding: 11px 12px;
  border: 1px solid #e7eaf0;
  border-radius: 10px;
  background: #fafbfe
}

.sales-progress-summary span, .sales-progress-summary strong {
  display: block
}

.sales-progress-summary > div > span:first-child {
  margin-bottom: 5px;
  color: #8994a5;
  font-size: 9px
}

.sales-progress-summary strong {
  font-size: 14px
}

.sales-progress-summary .sales-fulfillment {
  display: inline-flex
}

@media (max-width: 720px) {
  .sales-progress-summary {
    grid-template-columns:repeat(2, 1fr)
  }
}

/* Approval routing by submitter */
.approval-node-edit {
  display: block;
  padding: 12px 11px 12px 42px
}

.approval-node-edit:before {
  top: 20px;
  transform: none
}

.approval-node-main {
  display: grid;
  grid-template-columns:24px minmax(150px, 1.2fr) minmax(130px, .8fr) minmax(190px, 1.1fr) 34px;
  gap: 9px;
  align-items: end
}

.approval-route-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #d9ddeb;
  border-radius: 10px;
  background: #fff
}

.approval-route-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px
}

.approval-route-head strong, .approval-route-head span {
  display: block
}

.approval-route-head strong {
  font-size: 11px;
  color: #344057
}

.approval-route-head span {
  margin-top: 3px;
  color: #8a95a6;
  font-size: 9px
}

.approval-route-head .small {
  min-height: 31px;
  padding: 6px 10px;
  font-size: 10px
}

.approval-route-list {
  display: grid;
  gap: 8px;
  margin-top: 9px
}

.approval-route-list:empty {
  display: none;
  margin: 0
}

.approval-route-edit {
  display: grid;
  grid-template-columns:minmax(150px, 1fr) minmax(140px, .8fr) minmax(190px, 1fr) 32px;
  gap: 8px;
  align-items: end;
  padding: 9px;
  border-radius: 9px;
  background: #f7f8fc
}

.approval-route-edit label {
  font-size: 9px
}

.approval-route-edit select {
  height: 34px;
  margin-top: 4px;
  font-size: 10px
}

.route-remove {
  width: 32px;
  height: 34px;
  padding: 0;
  font-size: 16px
}

.node-route-summary {
  display: grid;
  gap: 3px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px dashed #dfe3ec
}

.node-route-summary b {
  color: #635bdf;
  font-size: 9px
}

.node-route-summary small {
  display: block;
  margin: 0;
  color: #78859a;
  font-size: 8px
}

.node-route-summary.empty-route {
  color: #a0a8b7;
  font-size: 8px
}

@media (max-width: 1050px) {
  .approval-node-main {
    grid-template-columns:22px 1fr 1fr 34px
  }

  .approval-node-main label:nth-of-type(3) {
    grid-column: 2/4
  }

  .approval-route-edit {
    grid-template-columns:1fr 1fr 32px
  }

  .approval-route-edit label:nth-of-type(3) {
    grid-column: 1/3
  }

  .route-remove {
    grid-column: 3;
    grid-row: 1
  }
}

@media (max-width: 680px) {
  .approval-node-edit {
    padding: 42px 11px 11px
  }

  .approval-node-edit:before {
    top: 9px
  }

  .approval-node-main {
    display: block
  }

  .approval-node-main .node-order-actions {
    position: absolute;
    left: 45px;
    top: 8px;
    display: flex
  }

  .approval-node-main .node-remove {
    position: absolute;
    right: 9px;
    top: 8px
  }

  .approval-route-head {
    align-items: flex-start;
    flex-direction: column
  }

  .approval-route-head button {
    width: 100%
  }

  .approval-route-edit {
    display: block
  }

  .approval-route-edit label {
    display: block;
    margin-top: 8px
  }

  .route-remove {
    width: 100%;
    margin-top: 8px
  }
}

/* Procurement price ownership and safety stock alerts */
.purchase-price-head {
  background: linear-gradient(125deg, #18294b, #2d4c83 58%, #316dac)
}

.purchase-price-head .business-page-icon {
  background: rgba(255, 255, 255, .15);
  color: #fff
}

.price-source, .price-enabled, .inventory-alert-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap
}

.price-source.manual {
  background: #efefff;
  color: #5148d7
}

.price-source.order {
  background: #e8f7f0;
  color: #087b57
}

.price-source.legacy {
  background: #fff2df;
  color: #a96109
}

.price-enabled.on, .inventory-alert-status.normal {
  background: #e9f8f1;
  color: #087f59
}

.price-enabled.future {
  background: #fff4dc;
  color: #a96308
}

.price-enabled.off {
  background: #f0f2f5;
  color: #7f8998
}

.disabled-row {
  opacity: .62;
  background: #fafafa
}

.price-origin {
  display: block;
  margin-top: 4px;
  color: #8a95a6;
  font-size: 8px;
  white-space: nowrap
}

/* Purchase order signature and print preparation */
#dialog:has(.purchase-order-form) {
  width:min(1320px, calc(100vw - 36px))
}

.purchase-order-form {
  display:grid;
  gap:16px
}

.purchase-contact-grid {
  grid-template-columns:repeat(4, minmax(180px, 1fr))
}

.purchase-signature-card {
  padding:16px;
  border:1px solid #dfe5ee;
  border-radius:14px;
  background:linear-gradient(135deg, #fbfcff, #f5f7fb)
}

.purchase-signature-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:10px
}

.purchase-signature-head > div:first-child {
  display:flex;
  flex-direction:column;
  gap:4px
}

.purchase-signature-head strong {
  color:#24324a;
  font-size:13px
}

.purchase-signature-head span {
  color:#7d899b;
  font-size:10px
}

.purchase-signature-head > div:last-child {
  display:flex;
  gap:8px
}

#purchaseSignatureCanvas {
  display:block;
  width:100%;
  height:145px;
  border:1px dashed #b9c4d4;
  border-radius:10px;
  background:#fff;
  cursor:crosshair;
  touch-action:none
}

.save-signature-choice {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:10px;
  color:#536178;
  font-size:11px;
  cursor:pointer
}

.save-signature-choice input {
  width:16px;
  height:16px;
  accent-color:#5149d8
}

@media (max-width: 920px) {
  .purchase-contact-grid {
    grid-template-columns:1fr 1fr
  }
}

@media (max-width: 620px) {
  .purchase-contact-grid {
    grid-template-columns:1fr
  }
  .purchase-signature-head {
    align-items:flex-start;
    flex-direction:column
  }
  #purchaseSignatureCanvas {
    height:125px
  }
}

/* Searchable document lists and visible document ownership */
.document-filter-bar {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  border-top: 1px solid #e8ebf2; border-bottom: 1px solid #e8ebf2;
  background: linear-gradient(180deg, #fcfdff, #f8faff)
}
.document-search { display: flex; min-width: 360px; max-width: 590px; flex: 1; align-items: center; gap: 8px; padding: 0 6px 0 13px; border: 1px solid #dce2ed; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgba(31,45,70,.025) }
.document-search:focus-within { border-color: #8179eb; box-shadow: 0 0 0 3px rgba(79,70,229,.08) }
.document-search > span { color: #8793a6; font-size: 16px }
.document-search input { height: 42px; min-width: 0; flex: 1; border: 0; background: transparent; box-shadow: none; outline: 0 }
.document-search button { flex: none }
.document-filter-bar > select { width: 155px; height: 44px; border: 1px solid #dce2ed; border-radius: 11px; background: #fff; color: #344158 }
.document-filter-bar > small { margin-left: auto; color: #8a95a6; white-space: nowrap }
.owner-identity { display: inline-flex; min-width: 150px; align-items: center; gap: 9px; text-align: left }
.owner-identity > i { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 11px; background: linear-gradient(145deg,#ecebff,#e5efff); color: #4f49d8; font-size: 12px; font-style: normal; font-weight: 900; box-shadow: inset 0 0 0 1px rgba(89,78,220,.07) }
.owner-identity > span { display: flex; min-width: 0; flex-direction: column; gap: 3px }
.owner-identity strong { overflow: hidden; color: #26354d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap }
.owner-identity small { overflow: hidden; max-width: 210px; color: #8a95a6; font-size: 9px; text-overflow: ellipsis; white-space: nowrap }
.order-list-table td, .requisition-list-table td { vertical-align: middle }
.order-list-table td:nth-child(4), .requisition-list-table td:nth-child(5) { min-width: 180px }
.sales-outbound-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 0 0 16px }
.sales-outbound-overview > div { display: flex; min-height: 102px; flex-direction: column; justify-content: center; padding: 17px 20px; border: 1px solid #e0e6ef; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(28,43,69,.045) }
.sales-outbound-overview span { color: #7b879a; font-size: 11px }
.sales-outbound-overview strong { margin: 5px 0; color: #193b65; font-size: 25px }
.sales-outbound-overview small { color: #98a2b1; font-size: 9px }
.outbound-filter { margin-bottom: 16px; border: 1px solid #e1e6ef; border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgba(28,43,69,.04) }
.warehouse-section table td > small { display: block; margin-top: 4px; color: #8b96a7; font-size: 9px }

/* Refined administration workspace */
.administration-head { padding: 20px 22px; border-color: #dfe5ef; background: linear-gradient(120deg,#fff 55%,#f7f8ff); box-shadow: 0 12px 34px rgba(28,42,68,.055) }
.administration-head-copy { display: flex; align-items: center; gap: 15px }
.administration-head-copy > i { display: grid; width: 50px; height: 50px; flex: 0 0 50px; place-items: center; border-radius: 15px; background: linear-gradient(145deg,#5249df,#766df0); color: #fff; font-size: 17px; font-style: normal; font-weight: 900; box-shadow: 0 9px 20px rgba(80,69,215,.2) }
.administration-head h3 { margin: 3px 0 4px }
.administration-summary > div { position: relative; overflow: hidden; min-height: 100px; padding: 16px 19px }
.administration-summary > div::after { position: absolute; top: -24px; right: -20px; width: 80px; height: 80px; border: 13px solid #f2f3ff; border-radius: 50%; content: "" }
.administration-summary strong { position: relative; z-index: 1; margin: 3px 0; font-size: 25px }
.administration-panel { border-color: #dfe5ef; box-shadow: 0 14px 34px rgba(25,39,64,.055) }
.administration-tabs { gap: 7px; padding: 12px 16px; border-bottom: 1px solid #e7eaf1; background: #fff }
.administration-tabs button { padding: 9px 13px; border: 1px solid transparent; border-radius: 10px; color: #6f7c91; transition: .16s ease }
.administration-tabs button:hover { background: #f5f6fb; color: #4f49ce }
.administration-tabs button.active { border-color: #d8d5ff; background: #eeedff; color: #4e46d4; box-shadow: 0 3px 10px rgba(78,70,212,.07) }
.administration-tabs button.active::after { display: none }
.administration-toolbar { min-height: 70px; padding: 13px 16px; background: #fafbfe }
.administration-toolbar .search-box { max-width: 600px; border-radius: 12px }
.administration-toolbar .search-box:focus-within { border-color: #8179eb; box-shadow: 0 0 0 3px rgba(79,70,229,.08) }
.administration-toolbar .search-box input { min-width: 0 }
.administration-filter-note { margin-left: auto; color: #8b96a7; font-size: 10px; white-space: nowrap }
.administration-table tbody tr { transition: background .15s ease }
.administration-table tbody tr:hover { background: #fafbff }
.administration-table td { height: 70px }
.administration-table td:first-child strong { color: #263954; font-size: 11px }
.administration-table .owner-identity { min-width: 175px }

.receipt-photo-section { margin: 16px 0 }
.receipt-photo-section .file-picker strong .required-indicator { display: inline; color: #b42318 }
#receiptPhotoCount { margin: 8px 0 }
.receipt-photo-selection { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0 }
.receipt-photo-selection li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 10px; border: 1px solid #e9ecf2; border-radius: 8px;
}
.receipt-photo-selection li span, .receipt-photo-link strong {
  overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap;
}
.receipt-photo-selection button { flex-shrink: 0 }
.receipt-photo-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 8px }
.receipt-photo-link {
  display: grid; gap: 5px; min-width: 0; padding: 10px 12px;
  color: #34425a; border: 1px solid #e1e5ee; border-radius: 8px;
  background: #fbfcff; text-decoration: none;
}
.receipt-photo-link span { font-size: 12px; color: #5c6184 }
.receipt-photo-link:hover, .receipt-photo-link:focus-visible { border-color: #8179eb; background: #f6f5ff }

@media (max-width: 900px) {
  .document-filter-bar { align-items: stretch; flex-wrap: wrap }
  .document-search { min-width: 100%; max-width: none }
  .document-filter-bar > small { width: 100%; margin-left: 0 }
  .sales-outbound-overview { grid-template-columns: 1fr 1fr }
  .administration-filter-note { width: 100%; margin-left: 0 }
}
@media (max-width: 620px) {
  .document-filter-bar > select, .document-filter-bar > .ghost { width: 100% }
  .sales-outbound-overview { grid-template-columns: 1fr }
  .administration-head-copy { align-items: flex-start }
  .administration-head-copy > i { width: 42px; height: 42px; flex-basis: 42px }
  .administration-tabs { padding: 9px 10px }
  .administration-tabs button { padding: 8px 10px }
}

.warehouse-module-grid > button.warehouse-alert-button {
  border-color: #f2c7bd;
  background: linear-gradient(130deg, #fff, #fff8f5)
}

.warehouse-module-grid > button.warehouse-alert-button i {
  background: #fff0ea;
  color: #d6533c
}

.inventory-alert-status.warning {
  background: #fff0ea;
  color: #c74631
}

.inventory-alert-summary {
  display: grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px
}

.inventory-alert-summary > div {
  padding: 17px 18px;
  border: 1px solid #e0e6ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft)
}

.inventory-alert-summary span, .inventory-alert-summary strong, .inventory-alert-summary small {
  display: block
}

.inventory-alert-summary span {
  color: #7e8a9e;
  font-size: 10px
}

.inventory-alert-summary strong {
  margin: 6px 0 4px;
  color: #1d2d49;
  font-size: 22px
}

.inventory-alert-summary small {
  color: #929cab;
  font-size: 9px
}

.stock-load-status {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 9px 11px;
  border: 1px dashed #d7ddea;
  border-radius: 9px;
  background: #f8f9fc;
  color: #7b8798;
  font-size: 10px
}

.stock-load-status.found {
  border-color: #b9e3d3;
  background: #f0faf6;
  color: #18775b
}

@media (max-width: 760px) {
  .inventory-alert-summary {
    grid-template-columns:1fr
  }
}

/* Supplier quotation comparison */
.price-terms {
  display: grid;
  grid-template-columns:repeat(2, minmax(88px, 1fr));
  gap: 4px 10px;
  min-width: 220px;
  color: #7c8798;
  font-size: 9px
}

.price-terms b {
  color: #334158;
  font-weight: 750
}

.comparison-head {
  background: linear-gradient(125deg, #172847, #2f4e84 58%, #277d92)
}

.comparison-head .business-page-icon {
  background: rgba(255, 255, 255, .14);
  color: #fff
}

.comparison-select {
  min-width: 280px;
  margin-left: auto;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .23);
  border-radius: 11px;
  background: rgba(255, 255, 255, .1)
}

.comparison-select label {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, .7);
  font-size: 9px;
  font-weight: 750
}

.comparison-select select {
  width: 100%;
  height: 36px;
  border-color: rgba(255, 255, 255, .23);
  background: rgba(255, 255, 255, .96);
  color: #25354f
}

.comparison-summary {
  display: grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0
}

.comparison-summary > div {
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid #e1e7ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft)
}

.comparison-summary span, .comparison-summary strong, .comparison-summary small {
  display: block
}

.comparison-summary span {
  color: #7d899c;
  font-size: 9px
}

.comparison-summary strong {
  margin: 7px 0 4px;
  color: #1e2e49;
  font-size: 20px
}

.comparison-summary small {
  overflow: hidden;
  color: #909aaa;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap
}

.comparison-panel {
  padding: 0;
  overflow: hidden
}

.comparison-panel .panel-head {
  padding: 17px 19px
}

.comparison-table {
  min-width: 1050px
}

.comparison-table tr.recommended {
  background: linear-gradient(90deg, #f0fbf7, #fff 28%)
}

.comparison-rank {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  background: #edf0f5;
  color: #637086;
  font-size: 10px;
  font-weight: 850
}

.comparison-rank.best {
  background: #dff6ec;
  color: #087b57
}

.recommend-label {
  display: inline-flex;
  margin-top: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e7f7ef;
  color: #087b57;
  font-size: 8px
}

.comparison-price strong, .comparison-price small {
  display: block
}

.comparison-price strong {
  color: #d56a23;
  font-size: 13px
}

.comparison-price small {
  margin-top: 3px;
  color: #8b95a5;
  font-size: 8px
}

.comparison-empty {
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #8b96a7
}

.comparison-empty i {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 15px;
  background: #eef0ff;
  color: #5148d7;
  font-size: 17px;
  font-style: normal;
  font-weight: 850
}

.comparison-empty strong {
  color: #536075;
  font-size: 13px
}

.comparison-empty span {
  margin: 6px 0 14px;
  font-size: 10px
}

@media (max-width: 980px) {
  .comparison-head {
    align-items: flex-start;
    flex-wrap: wrap
  }

  .comparison-select {
    width: 100%;
    margin-left: 0
  }

  .comparison-summary {
    grid-template-columns:repeat(2, 1fr)
  }
}

@media (max-width: 560px) {
  .comparison-summary {
    grid-template-columns:1fr
  }

  .price-terms {
    grid-template-columns:1fr
  }
}

/* Collapsible primary sidebar navigation */
#nav {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(157, 167, 194, .35) transparent
}

#nav > .nav-home {
  flex: 0 0 auto;
  margin-bottom: 4px
}

.nav-section {
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: .18s ease
}

.nav-section.group-active {
  border-color: rgba(125, 118, 255, .15);
  background: rgba(255, 255, 255, .025)
}

nav button.nav-section-toggle {
  display: grid;
  width: 100%;
  grid-template-columns:28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 11px;
  color: #aab5c9
}

nav button.nav-section-toggle:hover {
  transform: none;
  background: rgba(255, 255, 255, .05)
}

.nav-section-toggle > span:nth-child(2) {
  min-width: 0
}

.nav-section-toggle strong, .nav-section-toggle small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.nav-section-toggle strong {
  color: #c8d0df;
  font-size: 12px
}

.nav-section-toggle small {
  margin-top: 3px;
  color: #65728b;
  font-size: 9px;
  font-weight: 600
}

.nav-section-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: #aeb8cf;
  font-size: 12px;
  font-weight: 850
}

.nav-section-toggle > i {
  color: #64728d;
  font-size: 19px;
  font-style: normal;
  text-align: center;
  transition: transform .2s ease
}

.nav-section.open > .nav-section-toggle > i {
  transform: rotate(90deg);
  color: #a8a2ff
}

.nav-section.open > .nav-section-toggle .nav-section-icon, .nav-section.group-active > .nav-section-toggle .nav-section-icon {
  background: rgba(109, 100, 255, .18);
  color: #c8c4ff
}

.nav-section-items {
  display: grid;
  max-height: 0;
  gap: 3px;
  overflow: hidden;
  opacity: 0;
  transition: max-height .28s ease, opacity .18s ease, padding .2s ease
}

.nav-section.open > .nav-section-items {
  max-height: 620px;
  padding: 2px 5px 7px;
  opacity: 1
}

nav .nav-section-items > button {
  min-height: 38px;
  padding: 7px 10px 7px 38px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 650
}

nav .nav-section-items > button .nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 10px
}

nav .nav-section-items > button.active {
  background: linear-gradient(100deg, rgba(99, 102, 241, .25), rgba(79, 70, 229, .09))
}

.nav-group-badge {
  position: absolute;
  right: 35px;
  top: 8px;
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #ef5367;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  box-shadow: 0 0 0 3px rgba(239, 83, 103, .12)
}

@media (max-width: 900px) {
  #nav, .sidebar nav {
    display: flex;
    max-height: 58vh;
    grid-template-columns:none;
    overflow-y: auto
  }

  .nav-section {
    width: 100%
  }

  .nav-section.open > .nav-section-items {
    max-height: 620px
  }

  .nav-group-label {
    display: none
  }
}

/* Inventory count */
.inventory-count-table {
  max-height: min(52vh, 560px);
  overflow: auto
}

.inventory-count-table table {
  min-width: 760px
}

.inventory-count-table input.req-qty {
  min-width: 120px;
  text-align: right
}

.count-difference, .count-gain {
  color: #0b8b65 !important
}

.count-loss {
  color: #d24d5c !important
}

.count-remark {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: #43516a;
  font-size: 10px;
  font-weight: 750
}

.count-remark textarea {
  min-height: 70px
}

.status.POSTED {
  background: #e8f7f0;
  color: #087b57
}

/* Production execution */
.production-page-head {
  background: linear-gradient(120deg, #17355f, #245ca3 58%, #168b86)
}

.production-page-head .business-page-icon {
  background: rgba(255, 255, 255, .14);
  color: #fff
}

.production-page-head h3, .production-page-head p, .production-page-head .business-page-note span, .production-page-head .business-page-note small {
  color: #fff
}

.production-page-head .business-page-note {
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1)
}

.production-module-grid > button i {
  background: #e8f3ff;
  color: #1d609e
}

.production-module-grid > button:nth-child(2) i {
  background: #fff2dc;
  color: #b86d12
}

.production-module-grid > button:nth-child(3) i {
  background: #e9f8f2;
  color: #0b8561
}

.production-module-grid > button:nth-child(4) i {
  background: #eeeaff;
  color: #5a4fd6
}

.production-module-grid > button:nth-child(5) i {
  background: #e5f7f7;
  color: #087d83
}

.production-module-grid > button:nth-child(6) i {
  background: #e9f7ef;
  color: #087c57
}

.quality-result {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap
}

.quality-result.QUALIFIED {
  background: #e7f8ef;
  color: #087b57
}

.quality-result.PARTIAL {
  background: #fff3dc;
  color: #a7660d
}

.quality-result.REJECTED {
  background: #ffebed;
  color: #bf4050
}

.status.RELEASED {
  background: #eaf1ff;
  color: #3564ae
}

.status.IN_PROGRESS {
  background: #fff3dc;
  color: #a86612
}

.status.COMPLETED {
  background: #e6f7ef;
  color: #087b57
}

/* Sales quotation */
.quotation-head {
  background: linear-gradient(120deg, #2a276c, #5348d7 58%, #7c66e8)
}

.quotation-head .business-page-icon {
  background: rgba(255, 255, 255, .15);
  color: #fff
}

.quotation-head h3, .quotation-head p {
  color: #fff
}

.quotation-summary {
  margin: 14px 0
}

.quotation-panel {
  padding: 0;
  overflow: hidden
}

.quotation-panel > .panel-head {
  padding: 17px 19px
}

.quotation-table {
  min-width: 1120px
}

.quotation-table .link-button {
  border: 0;
  background: transparent;
  color: #5148d7;
  font-weight: 750;
  cursor: pointer
}

.danger-text {
  color: #c34052 !important
}

.quotation-banner {
  background: linear-gradient(120deg, #f6f5ff, #eef1ff)
}

.quotation-line-shell {
  max-height: 360px
}

.quotation-line-shell table {
  min-width: 1250px
}

.quotation-line-shell input[name=lineRemark] {
  min-width: 150px
}

.quotation-total-bar > div {
  flex-wrap: wrap
}

.quotation-detail-hero {
  background: linear-gradient(120deg, #2f2c75, #6156dc)
}

.quotation-detail-hero > div:first-child span, .quotation-detail-hero > div:first-child p {
  color: rgba(255, 255, 255, .72)
}

.quotation-detail-hero h3, .quotation-detail-hero > div:last-child strong, .quotation-detail-hero > div:last-child small {
  color: #fff
}

.quotation-detail-hero .status {
  background: rgba(255, 255, 255, .16);
  color: #fff
}

.status.CONFIRMED {
  background: #e8f2ff;
  color: #2762a9
}

@media (max-width: 760px) {
  .quotation-summary {
    grid-template-columns:repeat(2, 1fr)
  }

  .quotation-line-shell {
    max-height: 52vh
  }
}

/* Organization permissions and server-side pagination */
.server-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-top: 1px solid var(--line, #e6eaf2);
  color: #64748b;
  background: #fbfcff
}

.server-pager > div {
  display: flex;
  gap: 10px
}

.server-pager strong {
  color: #17233c
}

.organization-grid {
  display: grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 4px 0
}

.organization-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e1e7f2;
  border-radius: 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: .2s ease
}

.organization-card:hover {
  border-color: #8b7cf6;
  box-shadow: 0 10px 28px rgba(79, 70, 229, .10);
  transform: translateY(-1px)
}

.organization-card i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #efedff;
  color: #5145e5;
  font-style: normal;
  font-weight: 800
}

.organization-card span {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 5px
}

.organization-card strong {
  color: #14213a
}

.organization-card small {
  overflow: hidden;
  color: #7a879d;
  text-overflow: ellipsis;
  white-space: nowrap
}

.organization-card em {
  color: #61708a;
  font-size: 12px;
  font-style: normal
}

.scope-chip {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 700
}

.scope-chip.ALL {
  background: #e8f8ef;
  color: #128052
}

.scope-chip.DEPARTMENT, .scope-chip.DEPARTMENT_AND_CHILDREN {
  background: #eaf4ff;
  color: #1768b5
}

.security-intro h3 {
  margin: 0 0 8px
}

@media (max-width: 760px) {
  .server-pager {
    align-items: flex-start;
    flex-direction: column
  }

  .organization-grid {
    grid-template-columns:1fr
  }
}

/* Unified module chrome: keep newly added pages consistent with the original ERP panels. */
.business-page-head,
.module-hero,
.bom-hero,
.basic-list-hero,
.quotation-head,
.procurement-page-head,
.purchase-price-head,
.partner-module-hero {
  min-height: 0 !important;
  padding: 17px 20px !important;
  overflow: visible !important;
  border: 1px solid var(--line) !important;
  border-radius: 15px !important;
  background: #fff !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-soft) !important;
}

.business-page-head::after,
.module-hero::after,
.bom-hero::after,
.basic-list-hero::after,
.partner-module-hero::after {
  display: none !important;
}

.business-page-head h3,
.module-hero h3,
.bom-hero h3,
.basic-list-hero h3,
.quotation-head h3,
.procurement-page-head h3,
.purchase-price-head h3,
.partner-module-hero h3 {
  margin: 0 0 3px !important;
  color: var(--ink) !important;
  font-size: 17px !important;
}

.business-page-head p,
.module-hero p,
.bom-hero p,
.basic-list-hero p,
.quotation-head p,
.procurement-page-head p,
.purchase-price-head p,
.partner-module-hero p {
  margin: 0 !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  line-height: 1.6 !important;
}

.business-page-icon,
.quotation-head .business-page-icon,
.procurement-page-head .business-page-icon,
.purchase-price-head .business-page-icon {
  background: #f0f1ff !important;
  color: #5149d8 !important;
  box-shadow: none !important;
}

.module-hero .eyebrow,
.bom-hero .eyebrow,
.basic-list-hero .eyebrow,
.partner-module-hero .eyebrow {
  display: none !important;
}

.module-summary,
.procurement-kpis,
.quotation-summary {
  margin: 14px 0 0 !important;
}

.module-summary > div,
.procurement-kpis > div,
.quotation-summary > div {
  border: 1px solid var(--line) !important;
  background: #fff !important;
  box-shadow: var(--shadow-soft) !important;
}

.document-select {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.document-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}

tr.selected > td {
  background: #f3f4ff;
}

.panel-head > button[id$="ExportButton"] {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media(max-width:680px) {
  .business-page-head,
  .module-hero,
  .bom-hero,
  .basic-list-hero,
  .partner-module-hero {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .business-page-note {
    width: 100%;
    margin-left: 0;
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

/* Requisition workspace: batch-oriented selection and resubmission */
.requisition-page-head{margin-bottom:16px}
.requisition-page-head .business-page-icon{background:#eef0ff;color:#4f46d8}
.requisition-summary{margin-top:0}
.requisition-summary>div{position:relative;overflow:hidden;padding:17px 19px}
.requisition-summary>div::after{content:"";position:absolute;right:-18px;bottom:-24px;width:72px;height:72px;border:13px solid #f1f2ff;border-radius:50%}
.requisition-summary strong{position:relative;z-index:1;color:#25324a;font-size:22px}
.requisition-summary small{position:relative;z-index:1;display:block;margin-top:5px;color:#929cad;font-size:10px}
.requisition-rule{display:grid;grid-template-columns:auto minmax(220px,.8fr) minmax(360px,1.4fr);align-items:center;gap:15px;margin:16px 0;padding:14px 18px;border:1px solid #dfe3f6;border-radius:13px;background:#f7f7ff;color:#59667a}
.requisition-rule>span{padding:6px 10px;border-radius:99px;background:#e8e9ff;color:#4c43ca;font-size:10px;font-weight:800}
.requisition-rule>strong{color:#293650;font-size:12px}
.requisition-rule>p{margin:0;font-size:11px;line-height:1.65}
.requisition-list-panel .panel-head{background:#fff}
.requisition-list-table{min-width:1180px}
.requisition-list-table td{vertical-align:middle}
.requisition-list-table .document-no{display:block;color:#27344a}
.requisition-list-table .document-no-link{width:max-content;max-width:230px;color:#4f46e5;text-decoration:none;cursor:pointer;border-bottom:1px dashed transparent;transition:color .16s ease,border-color .16s ease}
.requisition-list-table .document-no-link:hover,.requisition-list-table .document-no-link:focus{color:#3730a3;border-color:#7c74ef;outline:none}
.requisition-list-table td>small{display:block;margin-top:5px;color:#8b96a8}

.req-tracking-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:20px 22px;border:1px solid #e0e3f6;border-radius:16px;background:linear-gradient(125deg,#f7f7ff,#eef4ff)}
.req-tracking-hero>div:first-child{display:grid;gap:5px}.req-tracking-hero>div:first-child>span{color:#6d66dc;font-size:11px;font-weight:800;letter-spacing:.08em}.req-tracking-hero>div:first-child>strong{font-size:19px;color:#1d2a3d}.req-tracking-hero p{margin:0;color:#77849a;font-size:12px}.req-tracking-hero>div:last-child{display:grid;justify-items:end;gap:8px}.req-tracking-hero>div:last-child small{color:#77849a}
.req-tracking-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}.req-tracking-summary>div{min-height:105px;padding:16px 17px;border:1px solid #e4e8f0;border-radius:14px;background:#fff;box-shadow:0 7px 20px rgba(26,50,82,.05)}.req-tracking-summary span,.req-tracking-summary small{display:block;color:#8591a4;font-size:11px}.req-tracking-summary strong{display:block;margin:8px 0 6px;font-size:21px;color:#1e3553}.req-tracking-summary .warning{border-color:#f3d5cc;background:#fff8f5}.req-tracking-summary .warning strong{color:#c54a2f;font-size:16px}
.req-tracking-note{display:flex;gap:10px;align-items:flex-start;margin-bottom:14px;padding:11px 14px;border:1px solid #dbe7fb;border-radius:10px;background:#f4f8ff;color:#60718a;font-size:12px}.req-tracking-note strong{flex:0 0 auto;color:#4f46e5}.req-tracking-table{border:1px solid #e5e9f0;border-radius:14px}.req-tracking-table table{min-width:1050px}.req-tracking-table th{padding:12px 14px;background:#f7f8fc}.req-tracking-table td{padding:14px;vertical-align:middle}.req-tracking-table td>small{display:block;margin-top:6px;color:#8591a4}.req-track-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800}.req-track-status.unpurchased,.req-track-status.not_purchased,.req-track-status.waiting{background:#f0f2f6;color:#69768a}.req-track-status.partial{background:#fff3dd;color:#ad6b09}.req-track-status.full{background:#e7f8f0;color:#16815c}.req-track-status.skipped{background:#f2f3f5;color:#9099a7}.req-track-progress{display:flex;align-items:center;gap:7px;margin-top:8px}.req-track-progress>div{width:92px;height:6px;overflow:hidden;border-radius:99px;background:#e7ebf2}.req-track-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#5d54e8,#1fa77b)}.req-track-progress span{width:30px;color:#77849a;font-size:10px}.arrival-copy{display:block;color:#2b405d;font-size:12px}.arrival-copy.soon{color:#ad6b09}.arrival-copy.overdue{color:#c63d50}.req-order-stack{display:grid;gap:7px;min-width:195px}.req-order-stack>div{padding:8px 10px;border:1px solid #e8eaf1;border-radius:9px;background:#fafbfe}.req-order-stack strong,.req-order-stack span{display:block}.req-order-stack strong{color:#4f46e5;font-size:11px}.req-order-stack span{margin-top:3px;color:#77849a;font-size:10px}.req-tracking-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:15px;color:#8490a2;font-size:11px}
@media(max-width:850px){.req-tracking-summary{grid-template-columns:1fr 1fr}.req-tracking-hero{align-items:flex-start;flex-direction:column}.req-tracking-hero>div:last-child{justify-items:start}.req-tracking-footer{align-items:flex-start;flex-direction:column}}

.required-indicator{display:inline-block;margin-left:4px;color:#e23a4f;font-size:13px;font-weight:900;line-height:1;vertical-align:baseline}.form-grid label:has(.required-indicator)>input,.form-grid label:has(.required-indicator)>select,.form-grid label:has(.required-indicator)>textarea{border-color:#d9dfea}.form-grid label:has(.required-indicator)>input:focus,.form-grid label:has(.required-indicator)>select:focus,.form-grid label:has(.required-indicator)>textarea:focus{border-color:#756cf0;box-shadow:0 0 0 3px rgba(91,83,235,.1)}
.source-chip{display:inline-flex;padding:6px 10px;border-radius:99px;background:#edf0ff;color:#4d46ca;font-size:10px;font-weight:800;white-space:nowrap}
.source-chip.direct{background:#edf8f4;color:#087c59}
.flow-tip{display:inline-flex;max-width:150px;color:#6d788b;font-size:11px;line-height:1.45}
#dialog:has(.req-batch-form){width:min(1480px,calc(100vw - 36px))}
.req-batch-form{display:grid;gap:16px}
.req-batch-banner{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 25px;border:1px solid #e0e4f6;border-radius:16px;background:linear-gradient(135deg,#f8f8ff,#f3f6fb)}
.req-batch-banner>div{display:flex;min-width:0;flex-direction:column}
.req-batch-banner span{color:#625bd8;font-size:9px;font-weight:800;letter-spacing:.13em}
.req-batch-banner strong{margin:5px 0;color:#202d44;font-size:20px}
.req-batch-banner p{margin:0;color:#778397;font-size:11px;line-height:1.65}
.req-batch-banner i{display:grid;width:54px;height:54px;flex:0 0 54px;place-items:center;border-radius:16px;background:#5750da;color:#fff;font-size:21px;font-style:normal;font-weight:800;box-shadow:0 10px 22px rgba(79,70,229,.18)}
.req-batch-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.req-batch-summary>div{padding:14px 17px;border:1px solid #e3e7ef;border-radius:13px;background:#fff}
.req-batch-summary span,.req-batch-summary strong{display:block}
.req-batch-summary span{color:#8792a4;font-size:10px}
.req-batch-summary strong{margin-top:5px;color:#28364d;font-size:19px}
.req-batch-fields{padding:18px;border:1px solid #e6e9f0;border-radius:14px;background:#fff}
.req-batch-fields textarea{min-height:70px}
.req-table-heading{display:flex;align-items:center;justify-content:space-between;padding:2px 3px 0}
.req-table-heading>div{display:flex;flex-direction:column}
.req-table-heading strong{font-size:14px}
.req-table-heading span{margin-top:4px;color:#8a95a7;font-size:10px}
.req-edit-table{overflow:auto;border:1px solid #e2e6ee;border-radius:14px;background:#fff}
.req-batch-table{min-width:1280px;margin:0}
.req-batch-table thead th{position:sticky;top:0;z-index:1;background:#f6f7fa;color:#69768a;white-space:nowrap}
.req-batch-table tbody tr:hover td{background:#fafaff}
.req-batch-table td{vertical-align:middle}
.req-batch-table td:nth-child(2){min-width:190px}
.req-batch-table td:nth-child(2)>strong,.req-batch-table td:nth-child(2)>small{display:block}
.req-batch-table td:nth-child(2)>small{margin-top:4px;color:#8994a6}
.req-check{display:inline-flex;cursor:pointer}
.req-check input{position:absolute;opacity:0;pointer-events:none}
.req-check span{display:inline-flex;min-width:74px;justify-content:center;padding:7px 10px;border:1px solid #dfe4ec;border-radius:9px;background:#f5f7fa;color:#748094;font-size:10px;font-weight:800}
.req-check input:checked+span{border-color:#aaa5f2;background:#eeefff;color:#4a42c7;box-shadow:0 0 0 3px rgba(79,70,229,.06)}
.req-batch-table .req-qty{width:126px;min-width:126px;background:#fff}
.req-batch-table .req-qty:disabled{background:#f0f2f5;color:#9aa3b1}
.quantity-limit{display:block;margin-top:5px;color:#909aab;font-size:9px;white-space:nowrap}
.req-batch-table .req-note{min-width:190px}
.req-batch-table tr.req-over-limit td{background:#fff4f4;border-top-color:#f4c6ca;border-bottom-color:#f4c6ca}
.req-batch-table tr.req-over-limit:hover td{background:#ffeded}
.req-batch-table tr.req-over-limit .req-qty,.req-batch-table tr.req-over-limit .req-note{border-color:#dc5360;background:#fff;box-shadow:0 0 0 3px rgba(220,83,96,.1)}
.req-batch-table tr.req-over-limit .remaining-qty{color:#b42335}
.req-over-warning{display:block;margin-top:5px;color:#c52f43;font-size:10px;font-weight:800}
.req-over-warning[hidden]{display:none}
.req-note[aria-invalid="true"]{border-color:#dc5360!important}
.approval-detail-table tr.approval-over-limit td{background:#fff1f2;color:#8f2030}
.over-limit-badge{display:inline-flex;margin-left:7px;padding:2px 6px;border-radius:999px;background:#c9364a;color:#fff;font-size:9px;font-weight:800;vertical-align:middle}
.req-batch-footnote{display:flex;gap:11px;padding:13px 15px;border:1px solid #d9ebdf;border-radius:11px;background:#f2faf5;color:#577064;font-size:10px;line-height:1.6}
.req-batch-footnote strong{flex:0 0 auto;color:#167153}
.req-batch-actions{position:sticky;bottom:-24px;z-index:2;margin:0 -24px -24px;padding:15px 24px;background:rgba(255,255,255,.95);backdrop-filter:blur(12px)}

@media(max-width:900px){
  .requisition-rule{grid-template-columns:auto 1fr}
  .requisition-rule>p{grid-column:1/-1}
}

@media (max-width: 680px) {
  .requisition-summary, .req-batch-summary {
    grid-template-columns:1fr 1fr
  }

  .requisition-rule {
    grid-template-columns:1fr;
    gap: 8px
  }

  .requisition-rule > p {
    grid-column: auto
  }

  .req-batch-banner {
    align-items: flex-start;
    padding: 18px
  }

  .req-batch-banner i {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 12px;
    font-size: 16px
  }

  .req-batch-summary > div {
    padding: 12px
  }

  .req-batch-summary > div:first-child {
    grid-column: 1/-1
  }
}

/* Unified data-table tools: filtering, sorting and pagination */
.data-table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 14px;
  border-top: 1px solid #e8ebf2;
  border-bottom: 1px solid #e8ebf2;
  background: #fbfcff;
}

.data-table-search {
  display: flex;
  width: min(320px, 100%);
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #dfe4ed;
  border-radius: 10px;
  background: #fff;
}

.data-table-search:focus-within {
  border-color: #8b83ef;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .08)
}

.data-table-search span {
  color: #8792a4;
  font-size: 16px
}

.data-table-search input {
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: 0
}

.data-table-sort-hint {
  margin-left: auto;
  color: #8490a3;
  font-size: 11px;
  white-space: nowrap
}

.table-sortable {
  position: relative;
  padding-right: 24px !important;
  cursor: pointer;
  user-select: none
}

.table-sortable::after {
  content: '⇅';
  position: absolute;
  right: 8px;
  color: #b1b9c8;
  font-size: 10px
}

.table-sortable[data-sort-direction="asc"]::after {
  content: '↑';
  color: #5149d8
}

.table-sortable[data-sort-direction="desc"]::after {
  content: '↓';
  color: #5149d8
}

.table-sortable:hover {
  color: #443bc4;
  background: #f1f2ff !important
}

.data-pager, .client-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid #e5e9f1;
  background: #fbfcff;
  color: #6b778b;
  font-size: 12px;
}

.data-pager strong {
  color: #202d44
}

.pager-controls {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  flex-wrap: wrap
}

.pager-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #748096;
  font-size: 11px;
  white-space: nowrap
}

.pager-controls select, .pager-controls input {
  height: 34px;
  border: 1px solid #dce2ec;
  border-radius: 8px;
  background: #fff;
  color: #27344a
}

.pager-controls select {
  min-width: 78px;
  padding: 0 26px 0 9px
}

.pager-controls input {
  width: 58px;
  padding: 0 7px;
  text-align: center
}

.pager-controls .ghost {
  min-height: 34px;
  padding: 7px 11px
}

@media (max-width: 760px) {
  .data-table-tools {
    align-items: stretch;
    flex-wrap: wrap
  }

  .data-table-search {
    width: 100%
  }

  .data-table-sort-hint {
    margin-left: 0
  }

  .data-pager, .client-pager {
    align-items: flex-start;
    flex-direction: column
  }

  .pager-controls {
    width: 100%
  }
}

/* Standalone production-site reporting */
.site-report-head {
  display: grid;
  grid-template-columns:auto minmax(0, 1fr) auto auto;
  align-items: center
}

.site-report-summary {
  display: grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0
}

.site-report-summary > div {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: center;
  padding: 20px 22px;
  border: 1px solid #e1e6ef;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(22, 34, 55, .045)
}

.site-report-summary span {
  color: #7d899c;
  font-size: 12px
}

.site-report-summary strong {
  margin: 6px 0;
  color: #18365c;
  font-size: 28px
}

.site-report-summary small {
  color: #98a1b1
}

.site-report-summary .warn {
  border-color: #f1d7d9;
  background: #fff8f8
}

.site-report-summary .warn strong {
  color: #c43142
}

.site-report-toolbar {
  gap: 18px
}

.site-report-toolbar .toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px
}

.site-report-toolbar input {
  width: 240px
}

.site-report-toolbar select {
  min-width: 112px
}

.site-report-table td {
  vertical-align: middle
}

.site-report-table td:nth-child(2) {
  min-width: 190px
}

.site-report-table td:nth-child(2) small {
  display: block;
  margin-top: 4px;
  color: #8692a6
}

.site-report-table td:nth-child(5), .site-report-table td:nth-child(6) {
  min-width: 110px
}

.site-report-overdue {
  background: #fff9f9 !important
}

.attachment-count {
  padding: 0;
  border: 0;
  background: transparent;
  color: #4d46d6;
  font-weight: 700;
  cursor: pointer
}

.attachment-count:hover {
  text-decoration: underline
}

.site-photo-state {
  display: inline-flex;
  min-width: 108px;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eff2f6;
  color: #697589;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap
}

.site-photo-state.normal {
  background: #edf8f4;
  color: #13775d
}

.site-photo-state.overdue {
  background: #fff0f1;
  color: #c63043
}

.site-photo-state.closed {
  background: #f0f2f5;
  color: #778295
}

.site-report-form-note {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #dce5f5;
  border-radius: 12px;
  background: #f6f9ff
}

.site-report-form-note strong {
  flex: none;
  color: #3f47ad
}

.site-report-form-note span {
  color: #66748a;
  line-height: 1.55
}

.site-report-detail {
  display: grid;
  gap: 18px
}

.site-report-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #173f6b, #197b83);
  color: #fff
}

.site-report-detail-head span {
  font-size: 11px;
  opacity: .76
}

.site-report-detail-head h3 {
  margin: 5px 0;
  font-size: 24px
}

.site-report-detail-head p {
  margin: 0;
  opacity: .8
}

.site-file-section {
  padding: 18px;
  border: 1px solid #e2e7ef;
  border-radius: 15px;
  background: #fbfcfe
}

.site-file-section h4 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 13px
}

.site-file-section h4 span {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 99px;
  background: #eeefff;
  color: #4f46d8;
  font-size: 11px
}

.site-file {
  display: grid;
  width: 100%;
  grid-template-columns:auto 1fr;
  gap: 2px 10px;
  margin-top: 8px;
  padding: 11px 12px;
  border: 1px solid #e2e6ee;
  border-radius: 11px;
  background: #fff;
  text-align: left;
  cursor: pointer
}

.site-file > span {
  grid-row: 1/3;
  align-self: center;
  color: #4f46d8;
  font-size: 18px
}

.site-file strong {
  color: #28364c
}

.site-file small {
  color: #8b95a5
}

@media (max-width: 980px) {
  .site-report-head {
    grid-template-columns:auto 1fr
  }

  .site-report-head .business-page-note, .site-report-head > .primary {
    grid-column: 2;
    margin-top: 10px;
    justify-self: start
  }

  .site-report-summary {
    grid-template-columns:1fr 1fr
  }

  .site-report-toolbar {
    align-items: flex-start;
    flex-direction: column
  }

  .site-report-toolbar .toolbar-actions {
    width: 100%;
    flex-wrap: wrap
  }

  .site-report-toolbar input {
    width: min(100%, 320px)
  }
}

/* Administrator-editable purchase print template */
.config-admin-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #d9d6ff;
  border-radius: 999px;
  background: #f1f0ff;
  color: #4e46d3;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap
}

.purchase-template-fieldset {
  padding: 16px;
  border: 1px solid #e1e5ee;
  border-radius: 14px;
  background: #f9faff
}

.purchase-template-fieldset > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px
}

.purchase-template-fieldset > div:first-child strong {
  color: #283750;
  font-size: 12px
}

.purchase-template-fieldset > div:first-child small {
  margin: 0
}

.purchase-template-columns {
  display: grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap: 10px
}

.purchase-template-columns label {
  padding: 10px;
  border: 1px solid #e5e8f0;
  border-radius: 10px;
  background: #fff
}

.purchase-template-columns label span {
  display: block;
  color: #8a94a5;
  font-size: 9px;
  font-weight: 700
}

.purchase-template-columns input {
  height: 36px;
  margin-top: 5px;
  background: #fff
}

@media (max-width: 900px) {
  .config-admin-badge {
    grid-column: 2;
    justify-self: start
  }

  .purchase-template-columns {
    grid-template-columns:repeat(2, minmax(0, 1fr))
  }
}

@media (max-width: 560px) {
  .purchase-template-columns {
    grid-template-columns:1fr
  }

  .purchase-template-fieldset > div:first-child {
    align-items: flex-start;
    flex-direction: column
  }
}

.session-boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: radial-gradient(circle at 50% 35%, #fff 0, #f4f6fc 48%, #edf1f8 100%);
  color: #17243b
}

.session-boot-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, #6b63f4, #4b42dc);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 14px 35px rgba(79, 70, 229, .24)
}

.session-boot strong {font-size: 15px}
.session-boot span {color: #7a869a;font-size: 11px}

/* Dedicated purchase print-template workspace */
.print-config-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 1px solid #dedff0;
  border-radius: 18px;
  background: linear-gradient(125deg, #fff, #f7f7ff);
  box-shadow: 0 10px 30px rgba(32, 42, 75, .055)
}

.print-config-hero > div:first-child span {
  color: #665de3;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.5px
}

.print-config-hero h3 {
  margin: 6px 0 5px;
  color: #17243b;
  font-size: 21px
}

.print-config-hero p {
  max-width: 760px;
  margin: 0;
  color: #758197;
  font-size: 11px;
  line-height: 1.65
}

.print-config-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px
}

.print-config-hero-actions > span {
  padding: 8px 11px;
  border-radius: 999px;
  background: #ecebff;
  color: #5048d2;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap
}

.print-config-workspace {
  display: grid;
  grid-template-columns:minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding-bottom: 24px
}

.print-config-editor {
  display: grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px
}

.print-config-editor > .print-config-card:first-child,
.print-config-editor > .terms-card {
  grid-column: 1 / -1
}

.print-config-card {
  overflow: hidden;
  border: 1px solid #e0e4ed;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(31, 43, 69, .045)
}

.print-config-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e9ecf2;
  background: #fafbfe
}

.print-config-card-head i {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  background: #ecebff;
  color: #5149d8;
  font-size: 10px;
  font-style: normal;
  font-weight: 900
}

.print-config-card-head h4 {
  margin: 0 0 3px;
  color: #26344c;
  font-size: 14px
}

.print-config-card-head p {
  margin: 0;
  color: #8791a2;
  font-size: 10px
}

.print-config-fields {
  display: grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px
}

.print-config-fields.three {
  grid-template-columns:repeat(3, minmax(0, 1fr))
}

.print-config-fields label {
  color: #46536a;
  font-size: 10px;
  font-weight: 800
}

.print-config-fields label.full {
  grid-column: 1/-1
}

.print-config-fields input {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid #dce2ec;
  border-radius: 10px;
  background: #fbfcfe;
  color: #25334a;
  outline: 0
}

.print-config-fields input:focus, .print-column-editor input:focus, .terms-card textarea:focus {
  border-color: #8078ed;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .08)
}

.print-column-editor {
  display: grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px
}

.print-column-editor label {
  display: grid;
  grid-template-columns:32px 1fr;
  align-items: center;
  overflow: hidden;
  border: 1px solid #e1e5ed;
  border-radius: 11px;
  background: #fbfcfe
}

.print-column-editor label span {
  display: grid;
  height: 42px;
  place-items: center;
  border-right: 1px solid #e1e5ed;
  background: #f1f2f7;
  color: #7d8798;
  font-size: 9px;
  font-weight: 900
}

.print-column-editor input {
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #27344b;
  font-size: 11px;
  font-weight: 700;
  outline: 0
}

.terms-card textarea {
  display: block;
  width: calc(100% - 36px);
  min-height: 260px;
  margin: 18px;
  padding: 15px 16px;
  resize: vertical;
  border: 1px solid #dce2ec;
  border-radius: 12px;
  background: #fbfcfe;
  color: #303d52;
  font-family: inherit;
  font-size: 11px;
  line-height: 1.8;
  outline: 0
}

.print-preview-panel {
  position: relative;
  top: auto;
  width: 100%;
  max-width: 960px;
  justify-self: center;
  align-self: start;
  overflow: hidden;
  border: 1px solid #dfe3ec;
  border-radius: 18px;
  background: #eef1f7;
  box-shadow: 0 16px 38px rgba(31, 43, 70, .08)
}

.print-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  border-bottom: 1px solid #dfe3ec;
  background: #fff
}

.print-preview-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px
}

.print-preview-head strong {
  color: #26334a;
  font-size: 12px
}

.print-preview-head span {
  color: #9099a8;
  font-size: 9px
}

.preview-live {
  display: flex !important;
  align-items: center;
  gap: 6px !important;
  padding: 6px 8px;
  border-radius: 999px;
  background: #eef8f4;
  color: #16805f !important;
  font-weight: 800
}

.preview-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #19a875;
  box-shadow: 0 0 0 3px #d9f4e9
}

.purchase-print-preview {
  width: min(794px, calc(100% - 44px));
  min-height: 0;
  aspect-ratio: 210 / 297;
  margin: 22px auto;
  padding: 42px 38px;
  overflow: hidden;
  border: 1px solid #d7d9df;
  background: #fff;
  box-shadow: 0 8px 20px rgba(27, 37, 56, .09);
  color: #111;
  font-family: "SimSun", serif;
  font-size: 10px
}

.preview-company {
  display: block;
  margin: 0;
  text-align: center
}

.preview-company strong {
  display: block;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .5px
}

.preview-company > span {
  display: block;
  margin: 5px 0 8px;
  font-family: "Courier New", "SimSun", monospace;
  font-size: 10px;
  font-weight: 700
}

.preview-address, .preview-company-line {
  display: flex;
  text-align: left;
  font-weight: 700
}

.preview-address {
  margin: 0 14px 7px
}

.preview-address b, .preview-company-line b {
  display: inline-block;
  min-width: 35px
}

.preview-address em {
  font-style: normal
}

.preview-company-line {
  justify-content: space-between;
  margin: 0 14px 9px
}

.preview-company-line span {
  margin: 0;
  font-family: inherit;
  font-size: 9px
}

.preview-company-line span:last-child {
  min-width: 46%
}

.purchase-print-preview > h4 {
  margin: 0 0 4px;
  text-align: center;
  font-size: 18px;
  line-height: 1
}

.purchase-print-preview table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed
}

.purchase-print-preview th, .purchase-print-preview td {
  padding: 8px 4px;
  border: 1px solid #222;
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.15;
  word-break: break-all
}

.preview-order-table .order-meta-row {
  height: 50px
}

.preview-order-table .order-meta-row th,
.preview-order-table .order-meta-row td {
  font-size: 9px
}

.preview-order-table .supplier-value {
  padding-left: 8px;
  text-align: left
}

.preview-order-table .order-line-head {
  height: 42px
}

.preview-order-table .order-item-row td {
  height: 105px;
  font-size: 9px
}

.preview-order-table .order-item-row td:nth-child(5),
.preview-order-table .order-item-row td:nth-child(7),
.preview-order-table .order-item-row td:nth-child(8) {
  font-size: 8px;
  white-space: nowrap
}

.preview-items-table {
  margin-top: -1px
}

.preview-items-table th, .preview-items-table td {
  padding-left: 1px;
  padding-right: 1px
}

.preview-items-table thead th {
  border-top: 0
}

.preview-items-table tbody td {
  height: 48px
}

.preview-items-table td:nth-child(5), .preview-items-table td:nth-child(7), .preview-items-table td:nth-child(8) {
  font-size: 7.5px;
  white-space: nowrap
}

.preview-sign {
  display: grid;
  grid-template-columns:1fr 1fr;
  align-items: center;
  min-height: 56px;
  padding: 8px 30px
}

.preview-sign span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700
}

.preview-sign i {
  font-size: 10px;
  font-weight: 400
}

.preview-terms {
  padding: 0 4px
}

.preview-terms > b {
  display: block;
  margin-bottom: 7px
}

.preview-terms p {
  max-height: 145px;
  margin: 0;
  overflow: hidden;
  font-weight: 700;
  line-height: 1.42;
  text-align: justify
}

.print-preview-note {
  padding: 0 17px 16px;
  color: #788499;
  font-size: 9px;
  line-height: 1.55
}

.print-config-savebar {
  position: static;
  grid-column: 1 / -1;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border: 1px solid rgba(79, 70, 229, .18);
  border-radius: 15px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 40px rgba(34, 40, 83, .16);
  backdrop-filter: blur(14px)
}

.print-config-savebar > div {
  display: flex;
  flex-direction: column;
  gap: 3px
}

.print-config-savebar strong {
  font-size: 11px
}

.print-config-savebar span {
  color: #7e899b;
  font-size: 9px
}

.print-config-savebar button {
  min-width: 160px
}

@media (max-width: 1180px) {
  .print-config-workspace {
    grid-template-columns:1fr
  }

  .print-preview-panel {
    position: relative;
    top: auto
  }

  .purchase-print-preview {
    min-height: 440px
  }

  .print-config-savebar {
    grid-column: 1
  }
}

@media (max-width: 1000px) {
  .print-config-editor {
    grid-template-columns: 1fr
  }

  .print-config-editor > .print-config-card:first-child,
  .print-config-editor > .terms-card {
    grid-column: 1
  }
}

@media (max-width: 760px) {
  .print-config-hero {
    align-items: flex-start;
    flex-direction: column
  }

  .print-config-hero-actions {
    width: 100%;
    justify-content: space-between
  }

  .print-config-fields, .print-config-fields.three, .print-column-editor {
    grid-template-columns:1fr
  }

  .print-config-fields label.full {
    grid-column: auto
  }

  .print-config-savebar {
    bottom: 8px;
    width: 100%
  }

  .print-config-savebar > div {
    display: none
  }

  .print-config-savebar button {
    width: 100%
  }
}

/* Administration workspace */
.administration-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 22px 25px;
  border: 1px solid #e0e5ed;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(27, 42, 70, .05)
}

.administration-head h3 {
  margin: 5px 0;
  color: #18263d;
  font-size: 22px
}

.administration-head p {
  margin: 0;
  color: #758197;
  font-size: 11px;
  line-height: 1.6
}

.administration-head .eyebrow {
  color: #635be0
}

.administration-summary {
  display: grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px
}

.administration-summary > div {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  justify-content: center;
  padding: 18px 20px;
  border: 1px solid #e0e6ef;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(30, 44, 72, .045)
}

.administration-summary span {
  color: #7d899b;
  font-size: 11px
}

.administration-summary strong {
  margin: 5px 0;
  color: #18365c;
  font-size: 27px
}

.administration-summary small {
  color: #9aa3b1;
  font-size: 9px
}

.administration-summary .warn {
  border-color: #f2d8dc;
  background: #fff9f9
}

.administration-summary .warn strong {
  color: #c63245
}

.administration-panel {
  overflow: hidden;
  padding: 0
}

.administration-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 15px 18px 0;
  border-bottom: 1px solid #e8ebf1;
  background: #fbfcfe
}

.administration-tabs button {
  position: relative;
  flex: none;
  padding: 10px 13px 13px;
  border: 0;
  background: transparent;
  color: #748096;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer
}

.administration-tabs button.active {
  color: #4f46dc
}

.administration-tabs button.active:after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 3px;
  border-radius: 9px 9px 0 0;
  background: #5a50e4;
  content: ""
}

.administration-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #e8ebf1
}

.administration-toolbar .search-box {
  display: flex;
  max-width: 520px;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 6px 0 12px;
  border: 1px solid #dce2ec;
  border-radius: 11px;
  background: #fff
}

.administration-toolbar .search-box > span {
  color: #8995a7
}

.administration-toolbar .search-box input {
  height: 41px;
  flex: 1;
  border: 0;
  background: transparent;
  outline: 0
}

.administration-toolbar select {
  width: 150px;
  height: 43px;
  border: 1px solid #dce2ec;
  border-radius: 11px;
  background: #fff;
  color: #344158
}

.administration-table {
  min-width: 1120px
}

.administration-table th {
  white-space: nowrap
}

.administration-table th > button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer
}

.administration-table td {
  vertical-align: middle
}

.administration-table td strong {
  color: #25354d
}

.administration-table td small {
  display: block;
  margin-top: 4px;
  color: #929cac;
  font-size: 9px
}

.administration-type {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  background: #efefff;
  color: #5148d4;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap
}

.administration-type.type-LEAVE {
  background: #fff3e7;
  color: #b76619
}

.administration-type.type-BUSINESS_TRIP {
  background: #eaf5ff;
  color: #2671ad
}

.administration-type.type-VEHICLE {
  background: #edf7f3;
  color: #16785c
}

.administration-type.type-SEAL {
  background: #fff0f2;
  color: #b8374b
}

.administration-type.type-MEETING_ROOM {
  background: #f1efff;
  color: #5a47cf
}

.administration-type.type-VISITOR {
  background: #eef7fb;
  color: #287991
}

.administration-type.type-OFFICE_SUPPLY {
  background: #f3f5e9;
  color: #6f7921
}

.administration-form {
  min-width: min(820px, 80vw)
}

.administration-form-note {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #dddffc;
  border-radius: 11px;
  background: #f7f7ff;
  color: #5d5bb3;
  font-size: 10px
}

.administration-form label small {
  display: block;
  margin-top: 5px;
  color: #929bab;
  font-weight: 400
}

.administration-form textarea {
  min-height: 116px;
  line-height: 1.6
}

.administration-detail {
  display: grid;
  gap: 16px
}

.administration-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #263d69, #4a54b5);
  color: #fff
}

.administration-detail-head > div > span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  opacity: .78
}

.administration-detail-head h3 {
  margin: 5px 0;
  font-size: 21px
}

.administration-detail-head p {
  margin: 0;
  font-size: 10px;
  opacity: .78
}

.administration-detail-head .status {
  background: rgba(255, 255, 255, .16);
  color: #fff
}

.administration-detail-grid {
  display: grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap: 9px
}

.administration-detail-grid > div {
  min-height: 72px;
  padding: 12px 13px;
  border: 1px solid #e2e6ee;
  border-radius: 12px;
  background: #fbfcfe
}

.administration-detail-grid span {
  display: block;
  margin-bottom: 6px;
  color: #8994a6;
  font-size: 9px
}

.administration-detail-grid strong {
  color: #293850;
  font-size: 11px;
  word-break: break-word
}

.administration-detail-text {
  padding: 16px 17px;
  border: 1px solid #e1e6ee;
  border-radius: 13px;
  background: #fff
}

.administration-detail-text > strong {
  color: #314158;
  font-size: 11px
}

.administration-detail-text p {
  margin: 9px 0 0;
  color: #5d6a7e;
  font-size: 10px;
  line-height: 1.75;
  white-space: normal
}

@media (max-width: 1000px) {
  .administration-summary {
    grid-template-columns:1fr 1fr
  }

  .administration-toolbar {
    align-items: stretch;
    flex-wrap: wrap
  }

  .administration-toolbar .search-box {
    min-width: 100%;
    max-width: none
  }

  .administration-detail-grid {
    grid-template-columns:1fr 1fr
  }
}

@media (max-width: 620px) {
  .administration-head {
    align-items: flex-start;
    flex-direction: column
  }

  .administration-summary {
    grid-template-columns:1fr 1fr
  }

  .administration-summary > div {
    min-height: 90px;
    padding: 14px
  }

  .administration-toolbar select {
    width: 100%
  }

  .administration-form {
    min-width: 0
  }

  .administration-detail-grid {
    grid-template-columns:1fr
  }
}

/* Final administration visual overrides */
.administration-head { padding: 20px 22px; border-color: #dfe5ef; background: linear-gradient(120deg,#fff 55%,#f7f8ff); box-shadow: 0 12px 34px rgba(28,42,68,.055) }
.administration-head-copy { display: flex; align-items: center; gap: 15px }
.administration-head-copy > i { display: grid; width: 50px; height: 50px; flex: 0 0 50px; place-items: center; border-radius: 15px; background: linear-gradient(145deg,#5249df,#766df0); color: #fff; font-size: 17px; font-style: normal; font-weight: 900; box-shadow: 0 9px 20px rgba(80,69,215,.2) }
.administration-head h3 { margin: 3px 0 4px }
.administration-summary > div { position: relative; overflow: hidden; min-height: 100px; padding: 16px 19px }
.administration-summary > div::after { position: absolute; top: -24px; right: -20px; width: 80px; height: 80px; border: 13px solid #f2f3ff; border-radius: 50%; content: "" }
.administration-summary strong { position: relative; z-index: 1; margin: 3px 0; font-size: 25px }
.administration-panel { border-color: #dfe5ef; box-shadow: 0 14px 34px rgba(25,39,64,.055) }
.administration-tabs { gap: 7px; padding: 12px 16px; border-bottom: 1px solid #e7eaf1; background: #fff }
.administration-tabs button { padding: 9px 13px; border: 1px solid transparent; border-radius: 10px; color: #6f7c91; transition: .16s ease }
.administration-tabs button:hover { background: #f5f6fb; color: #4f49ce }
.administration-tabs button.active { border-color: #d8d5ff; background: #eeedff; color: #4e46d4; box-shadow: 0 3px 10px rgba(78,70,212,.07) }
.administration-tabs button.active::after { display: none }
.administration-toolbar { min-height: 70px; padding: 13px 16px; background: #fafbfe }
.administration-toolbar .search-box { max-width: 600px; border-radius: 12px }
.administration-toolbar .search-box:focus-within { border-color: #8179eb; box-shadow: 0 0 0 3px rgba(79,70,229,.08) }
.administration-toolbar .search-box input { min-width: 0 }
.administration-filter-note { margin-left: auto; color: #8b96a7; font-size: 10px; white-space: nowrap }
.administration-table tbody tr { transition: background .15s ease }
.administration-table tbody tr:hover { background: #fafbff }
.administration-table td { height: 70px }
.administration-table td:first-child strong { color: #263954; font-size: 11px }
.administration-table .owner-identity { min-width: 175px }

.approval-detail-actions { flex-wrap: wrap; }
.approval-detail .status.WITHDRAWN { background: #eef1f6; color: #526177; }
.approval-detail .status.COPIED, .approval-work-card .status.COPIED { background: #edeaff; color: #4f40aa; }
.partner-contact-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Dense business lists: consistent toolbars, readable columns and local scrolling. */
.panel-head {
  gap: 18px;
}

.panel-head > div:first-child {
  min-width: 0;
}

.panel-head .toolbar-actions {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.panel-head .toolbar-actions > input,
.panel-head .toolbar-actions > select {
  min-height: 42px;
  border: 1px solid #dce2ec;
  border-radius: 11px;
  background: #fff;
  color: #26354c;
}

.panel-head .toolbar-actions > input {
  width: min(320px, 42vw);
  min-width: 220px;
  padding: 0 13px;
}

.panel-head .toolbar-actions > select {
  min-width: 132px;
  padding: 0 34px 0 12px;
}

.table-shell {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.business-data-table thead th {
  vertical-align: middle;
  white-space: nowrap;
}

.business-data-table tbody td {
  vertical-align: middle;
  line-height: 1.5;
}

.business-data-table .row-actions {
  min-width: max-content;
  flex-wrap: nowrap;
}

.business-data-table td > small,
.business-data-table td > .muted {
  line-height: 1.45;
}

.data-pager,
.server-pager {
  min-height: 68px;
  flex-wrap: wrap;
}

/* Production-site reporting */
.site-report-panel {
  overflow: hidden;
  border-color: #dfe5ef;
  box-shadow: 0 14px 36px rgba(28, 43, 71, .06);
}

.site-report-toolbar {
  display: grid;
  grid-template-columns:minmax(210px, 1fr) auto;
  align-items: center;
  gap: 18px;
  background: linear-gradient(180deg, #fff, #fcfdff);
}

.site-report-toolbar .toolbar-actions {
  flex: 0 1 auto;
  flex-wrap: nowrap;
}

.site-report-toolbar .toolbar-actions > input {
  width: 300px;
  min-width: 220px;
}

.site-overdue-filter {
  min-width: 160px;
  white-space: nowrap;
}

.site-overdue-filter.active {
  border-color: #f0c7cd;
  background: #fff1f3;
  color: #bf3044;
}

.site-report-table-shell {
  max-height: min(55vh, 570px);
  overflow: auto;
  border-bottom: 1px solid #e8ecf2;
}

.site-report-table {
  min-width: 1360px !important;
}

.site-report-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px #e2e7ef;
}

.site-report-table th:nth-child(1) { width: 58px }
.site-report-table th:nth-child(2) { min-width: 220px }
.site-report-table th:nth-child(3) { min-width: 82px }
.site-report-table th:nth-child(4) { min-width: 112px }
.site-report-table th:nth-child(5),
.site-report-table th:nth-child(6) { min-width: 108px }
.site-report-table th:nth-child(7),
.site-report-table th:nth-child(9) { min-width: 98px }
.site-report-table th:nth-child(8) { min-width: 104px }
.site-report-table th:nth-child(10) { min-width: 138px }
.site-report-table th:nth-child(11) { min-width: 205px }

.site-report-table td:not(.site-report-product) {
  white-space: nowrap;
}

.site-report-product {
  min-width: 220px !important;
}

.site-report-product strong,
.site-report-product small {
  display: block;
}

.site-report-product small {
  margin-top: 5px;
  color: #8692a6;
}

.site-report-sequence {
  color: #53627a;
  font-variant-numeric: tabular-nums;
}

.site-report-date,
.site-report-person,
.site-report-attachment,
.site-report-due {
  white-space: nowrap;
  word-break: keep-all;
}

.attachment-count {
  white-space: nowrap;
}

.site-report-actions {
  min-width: max-content;
  flex-wrap: nowrap;
}

/* Purchase-price history */
.purchase-price-panel {
  overflow: hidden;
  border-color: #dfe5ef;
  box-shadow: 0 14px 36px rgba(28, 43, 71, .06);
}

.purchase-price-shell {
  max-height: min(55vh, 570px);
  overflow: auto;
  border-bottom: 1px solid #e8ecf2;
}

.purchase-price-table {
  min-width: 1320px !important;
}

.purchase-price-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px #e2e7ef;
}

.purchase-price-table td {
  vertical-align: middle;
}

.purchase-price-material {
  min-width: 230px;
}

.purchase-price-material strong,
.purchase-price-material .muted {
  display: block;
}

.purchase-price-material .muted {
  max-width: 265px;
  margin-top: 5px;
  line-height: 1.5;
}

.purchase-price-supplier {
  min-width: 185px;
  word-break: keep-all;
}

.purchase-price-amount,
.purchase-price-date,
.purchase-price-source,
.purchase-price-owner {
  white-space: nowrap;
}

.purchase-price-date { min-width: 108px }
.purchase-price-source { min-width: 118px }
.purchase-price-owner { min-width: 100px }

.purchase-price-actions {
  min-width: max-content;
  flex-wrap: nowrap;
}

@media (max-width: 1100px) {
  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .panel-head .toolbar-actions {
    width: 100%;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .site-report-toolbar {
    grid-template-columns:1fr;
  }

  .site-report-toolbar .toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  .panel-head .toolbar-actions > input,
  .panel-head .toolbar-actions > select,
  .site-report-toolbar .toolbar-actions > input {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .panel-head .toolbar-actions > button {
    flex: 1 1 auto;
  }

  .site-overdue-filter {
    min-width: 0;
  }
}
