:root{--bg:#e9eef4;--surface:#fff;--primary:#0a84d8;--primary-dark:#0069ae;--navy:#0b1f33;--text:#18212b;--muted:#677481;--border:#e5eaf0;--soft:#eaf6ff;--green:#18a675;--red:#d83b45;--orange:#f28a00;--purple:#7049e8;--shadow:0 8px 24px rgba(11,31,51,.07)}
*{box-sizing:border-box}html{font-family:"Segoe UI","Noto Sans Thai",Tahoma,Arial,sans-serif;color:var(--text);background:var(--bg)}body{margin:0;min-height:100vh}a{color:var(--primary-dark);text-decoration:none}button,input,select,textarea{font:inherit}.topbar{height:72px;padding:0 28px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:28px;position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:10px;color:var(--navy);font-weight:750;white-space:nowrap}.brand-mark{display:inline-flex;width:42px;height:42px;align-items:center;justify-content:center;border-radius:12px;color:#fff;background:linear-gradient(145deg,#1597e5,#0069ae);font-size:12px;letter-spacing:.4px;box-shadow:0 7px 18px rgba(10,132,216,.25)}.brand-mark.large{width:58px;height:58px;border-radius:16px;font-size:16px;margin-bottom:18px}.main-nav{display:flex;align-items:center;gap:4px;flex:1}.main-nav a{padding:9px 12px;border-radius:9px;color:#41505d;font-size:14px;font-weight:600}.main-nav a:hover{background:var(--soft);color:var(--primary-dark)}.user-menu{display:flex;align-items:center;gap:14px}.user-menu span{display:flex;flex-direction:column;text-align:right;font-size:13px}.user-menu small{color:var(--muted);font-size:11px;margin-top:2px}.nav-toggle{display:none;border:0;background:var(--soft);color:var(--primary-dark);padding:8px 12px;border-radius:8px}.page-shell{width:min(1180px,calc(100% - 32px));margin:28px auto 60px}.page-heading{background:linear-gradient(130deg,#1597e5,#0a84d3 55%,#0069ae);color:#fff;padding:32px 36px;border-radius:20px;box-shadow:0 12px 30px rgba(0,105,174,.18);display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;overflow:hidden;position:relative}.page-heading:after{content:"";position:absolute;width:210px;height:210px;border:38px solid rgba(255,255,255,.08);border-radius:50%;right:-55px;bottom:-120px}.page-heading h1,.page-title h1{margin:5px 0 5px;font-size:30px;line-height:1.2}.page-heading p{margin:0;color:rgba(255,255,255,.82)}.page-title{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:6px 0 22px}.page-title p{margin:4px 0 0;color:var(--muted)}.eyebrow{font-size:11px;font-weight:800;letter-spacing:1.2px;color:var(--primary-dark)}.page-heading .eyebrow{color:rgba(255,255,255,.72)}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}.metric{position:relative;min-height:126px;padding:20px;color:#fff;border-radius:15px;overflow:hidden;box-shadow:var(--shadow)}.metric:after{content:"";position:absolute;width:86px;height:86px;background:rgba(255,255,255,.12);border-radius:50%;right:-24px;bottom:-32px}.metric.blue{background:#168be5}.metric.teal{background:#1597a2}.metric.orange{background:#f28a00}.metric.purple{background:#7049e8}.metric span,.metric small{display:block;color:rgba(255,255,255,.84);font-size:13px}.metric strong{display:block;font-size:34px;line-height:1.1;margin:9px 0 2px}.card{background:#fff;border:1px solid var(--border);border-radius:15px;padding:22px;box-shadow:var(--shadow);margin-bottom:18px}.card h2{font-size:18px;color:var(--navy);margin:0 0 16px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}.card-head h2{margin:0}.card-head p{color:var(--muted);margin:3px 0 0;font-size:13px}.highlight{background:linear-gradient(135deg,#eaf6ff,#f7fbff);border-color:#cce9fb;border-left:5px solid var(--primary)}.detail-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:18px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;min-width:720px}th{font-size:12px;text-align:left;color:var(--muted);font-weight:700;padding:11px 12px;border-bottom:1px solid var(--border);white-space:nowrap}td{padding:13px 12px;border-bottom:1px solid #edf1f5;font-size:13px;vertical-align:top}tbody tr:hover{background:#f9fbfd}.num{text-align:right}.empty{text-align:center!important;color:var(--muted);padding:32px!important}.block{display:block;margin-top:3px}.muted{color:var(--muted)}code{font-family:Consolas,monospace;font-size:12px;background:#f1f5f8;color:#234158;padding:3px 6px;border-radius:6px}.badge{display:inline-flex;padding:4px 9px;border-radius:999px;font-size:11px;font-weight:700;background:#edf1f5;color:#4d5a66;margin:1px}.badge-blue,.badge-approved,.badge-mer{background:#e4f3fd;color:#0069ae}.badge-green,.badge-transferred{background:#e7f7f1;color:#0a7651}.badge-pending,.badge-sale{background:#fff3de;color:#a75c00}.badge-rejected,.badge-cancelled{background:#fdecee;color:#a91f2a}.badge-admin{background:#eee9ff;color:#5933c7}.status-on{color:#087750;font-weight:700}.status-off{color:#a91f2a;font-weight:700}.btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:9px;padding:10px 15px;font-size:13px;font-weight:700;cursor:pointer;transition:.15s ease;text-decoration:none}.btn:hover{transform:translateY(-1px)}.btn-primary{color:#fff;background:var(--primary);box-shadow:0 5px 12px rgba(10,132,216,.2)}.btn-light{color:var(--primary-dark);background:#fff;position:relative;z-index:2}.btn-ghost{color:#43515e;background:#fff;border-color:#dfe5eb}.btn-success{color:#fff;background:var(--green)}.btn-danger{color:#fff;background:var(--red)}.btn-sm{padding:6px 9px;font-size:11px}.btn-block{width:100%;padding:12px}.alert{padding:12px 16px;border-radius:10px;margin-bottom:16px;border:1px solid}.alert-success{background:#e7f7f1;border-color:#bce9d8;color:#087750}.alert-error{background:#fdecee;border-color:#f6c8cc;color:#a91f2a}label{font-size:13px;font-weight:650;color:#304050;display:flex;flex-direction:column;gap:6px}input,select,textarea{width:100%;border:1px solid #cfd8e1;border-radius:9px;padding:10px 11px;background:#fff;color:var(--text);outline:none}input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(10,132,216,.12)}textarea{resize:vertical}.form-stack{display:grid;gap:15px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.form-grid.three{grid-template-columns:repeat(3,1fr)}.form-grid .full{grid-column:1/-1}.check{display:flex;flex-direction:row;align-items:center}.check input{width:auto}.form-note{padding:10px 12px;background:var(--soft);border-radius:9px;color:var(--primary-dark);font-size:12px}.inline-form{display:grid;grid-template-columns:1fr 160px auto;gap:10px;margin-bottom:18px}.action-row{display:flex;gap:4px;flex-wrap:wrap}dialog{border:0;border-radius:16px;padding:0;width:min(620px,calc(100% - 24px));box-shadow:0 24px 70px rgba(11,31,51,.25)}dialog::backdrop{background:rgba(11,31,51,.48);backdrop-filter:blur(2px)}.dialog-form{padding:22px}.dialog-form.wide{width:100%}.dialog-head,.dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.dialog-head{margin-bottom:18px}.dialog-head h2{margin:0;color:var(--navy)}.dialog-actions{justify-content:flex-end;margin-top:20px}.icon-btn{border:0;background:#edf2f6;width:34px;height:34px;border-radius:50%;font-size:22px;color:#586572;cursor:pointer}.details{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin:0}.details div{border-bottom:1px solid var(--border);padding-bottom:10px}.details dt{color:var(--muted);font-size:11px}.details dd{margin:4px 0 0;font-weight:700;color:var(--navy)}.big-number{font-size:42px;font-weight:800;color:var(--primary-dark)}.big-number small{display:block;font-size:12px;color:var(--muted);font-weight:500}.timeline>div{display:flex;gap:12px;border-left:2px solid #dbe9f3;margin-left:6px;padding:0 0 18px 18px;position:relative}.timeline>div>span{position:absolute;width:10px;height:10px;border-radius:50%;background:var(--primary);left:-6px;top:4px}.timeline p{margin:0;font-size:13px}.timeline small{display:block;color:var(--muted);margin-top:3px}.back-link{font-size:12px;font-weight:700}.error-page{text-align:center;background:#fff;border-radius:18px;padding:70px 20px;box-shadow:var(--shadow)}.error-code{font-size:64px;color:var(--primary);font-weight:800}.guest-page{background:linear-gradient(140deg,#eef5fa,#e4ebf2)}.guest-main{min-height:100vh;display:grid;place-items:center;padding:24px}.login-shell{display:grid;grid-template-columns:1.3fr .8fr;width:min(1040px,100%);min-height:590px;border-radius:24px;overflow:hidden;background:#fff;box-shadow:0 30px 80px rgba(11,31,51,.16)}.login-visual{padding:70px 58px;color:#fff;background:linear-gradient(145deg,#1597e5,#0a84d3 55%,#0069ae);display:flex;flex-direction:column;justify-content:center;position:relative;overflow:hidden}.login-visual:before,.login-visual:after{content:"";position:absolute;border:55px solid rgba(255,255,255,.07);border-radius:50%}.login-visual:before{width:280px;height:280px;right:-180px;top:-150px}.login-visual:after{width:180px;height:180px;left:-120px;bottom:-120px}.login-visual .eyebrow{color:rgba(255,255,255,.72)}.login-visual h1{font-size:38px;line-height:1.25;margin:14px 0}.login-visual p{color:rgba(255,255,255,.82);max-width:520px}.login-features{display:flex;gap:9px;margin-top:34px}.login-features span{border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.1);padding:8px 12px;border-radius:9px;font-size:11px;font-weight:800}.login-card{padding:56px 44px;display:flex;flex-direction:column;justify-content:center}.login-card h2{font-size:28px;margin:0 0 5px;color:var(--navy)}.login-card>p{margin:0 0 25px}.login-card>small{margin-top:22px}
@media(max-width:900px){.topbar{padding:0 16px;gap:12px}.nav-toggle{display:block;margin-left:auto}.main-nav{display:none;position:absolute;top:72px;left:12px;right:12px;background:#fff;box-shadow:var(--shadow);border:1px solid var(--border);padding:10px;border-radius:12px;flex-direction:column;align-items:stretch}.main-nav.open{display:flex}.user-menu>span{display:none}.metric-grid{grid-template-columns:repeat(2,1fr)}.detail-grid{grid-template-columns:1fr}.form-grid.three{grid-template-columns:repeat(2,1fr)}.login-shell{grid-template-columns:1fr;min-height:auto}.login-visual{display:none}.login-card{padding:44px 30px}}
@media(max-width:600px){.page-shell{width:min(100% - 20px,1180px);margin-top:16px}.page-heading{padding:24px;align-items:flex-start}.page-heading h1,.page-title h1{font-size:24px}.page-title{align-items:flex-start;flex-direction:column}.metric{min-height:110px;padding:16px}.metric strong{font-size:28px}.card{padding:16px}.form-grid,.form-grid.three,.inline-form{grid-template-columns:1fr}.user-menu{gap:4px}.topbar{height:64px}.main-nav{top:64px}.brand span:last-child{display:none}.details{grid-template-columns:1fr}}
.narrow-card{max-width:560px}
@media print{.topbar,.btn,.nav-toggle{display:none!important}.page-shell{width:100%;margin:0}.page-heading,.metric,.highlight{print-color-adjust:exact;-webkit-print-color-adjust:exact}.card,.metric{break-inside:avoid;box-shadow:none}}

/* Left sidebar application shell */
.app-page{padding-left:264px}.sidebar{position:fixed;inset:0 auto 0 0;width:264px;background:#fff;border-right:1px solid var(--border);z-index:40;display:flex;flex-direction:column;box-shadow:8px 0 28px rgba(11,31,51,.045)}.sidebar-brand{height:82px;padding:18px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}.sidebar-brand .brand>span:last-child{display:flex;flex-direction:column;gap:2px}.sidebar-brand .brand strong{font-size:15px}.sidebar-brand .brand small{font-size:9px;letter-spacing:.8px;color:var(--muted)}.sidebar-close{display:none;border:0;background:transparent;color:var(--muted);font-size:26px;cursor:pointer}.sidebar-user{display:flex;align-items:center;gap:11px;margin:17px 14px 8px;padding:12px;border-radius:12px;background:var(--soft);border:1px solid #d8eefc}.sidebar-user>span:last-child{display:flex;min-width:0;flex-direction:column}.sidebar-user strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--navy)}.sidebar-user small{font-size:10px;color:var(--primary-dark);margin-top:2px}.user-avatar{flex:0 0 38px;width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(145deg,#1597e5,#0069ae);color:#fff;font-size:15px;font-weight:800}.sidebar .main-nav{display:flex;flex:1;overflow-y:auto;flex-direction:column;align-items:stretch;gap:4px;padding:8px 12px}.sidebar .main-nav a{display:flex;align-items:center;gap:11px;padding:10px 11px;border-radius:10px;color:#425363;font-size:13px}.sidebar .main-nav a:hover{background:#f1f7fb;color:var(--primary-dark)}.sidebar .main-nav a.active{background:linear-gradient(105deg,#e5f4ff,#f1f9ff);color:#0069ae;box-shadow:inset 3px 0 0 var(--primary)}.nav-icon{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;border-radius:8px;background:#edf2f6;color:#627383;font-size:9px;font-weight:800;letter-spacing:.3px}.main-nav a.active .nav-icon{background:var(--primary);color:#fff}.nav-label{padding:15px 10px 5px;color:#93a0ac;font-size:9px;font-weight:800;letter-spacing:1.1px;text-transform:uppercase}.sidebar-footer{padding:14px;border-top:1px solid var(--border);display:grid;gap:9px}.account-link{display:block;text-align:center;padding:8px;border-radius:8px;color:var(--primary-dark);font-size:11px;font-weight:700}.account-link:hover,.account-link.active{background:var(--soft)}.mobile-topbar{display:none}.sidebar-overlay{display:none}.app-page .page-shell{width:min(1180px,calc(100% - 48px));margin:28px auto 60px}
@media(max-width:900px){.app-page{padding-left:0}.mobile-topbar{height:64px;padding:0 16px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:30}.mobile-topbar .nav-toggle{display:flex;width:40px;height:40px;padding:10px;flex-direction:column;justify-content:center;gap:4px}.mobile-topbar .nav-toggle span{height:2px;width:100%;background:var(--primary-dark);border-radius:2px}.sidebar{width:min(286px,86vw);transform:translateX(-105%);transition:transform .2s ease}.sidebar-open .sidebar{transform:translateX(0)}.sidebar-close{display:block}.sidebar-overlay{position:fixed;inset:0;border:0;background:rgba(11,31,51,.42);z-index:35}.sidebar-open .sidebar-overlay{display:block}.app-page .page-shell{width:min(100% - 24px,1180px);margin-top:18px}}
@media print{.sidebar,.mobile-topbar,.sidebar-overlay{display:none!important}.app-page{padding-left:0}.app-page .page-shell{width:100%;margin:0}}
.sidebar .main-nav{position:static;inset:auto;background:transparent;border:0;border-radius:0;box-shadow:none}.sidebar-brand .brand span:last-child{display:flex}

/* Blue sidebar theme */
.sidebar{background:linear-gradient(180deg,#0a84d8 0%,#0878c4 48%,#0069ae 100%);border-right:0;box-shadow:10px 0 30px rgba(0,72,124,.14)}.sidebar-brand{border-bottom-color:rgba(255,255,255,.16)}.sidebar-brand .brand,.sidebar-brand .brand strong{color:#fff}.sidebar-brand .brand small{color:rgba(255,255,255,.66)}.sidebar .brand-mark{background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.2);box-shadow:none}.sidebar-close{color:#fff}.sidebar-user{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.17)}.sidebar-user strong{color:#fff}.sidebar-user small{color:rgba(255,255,255,.72)}.sidebar .user-avatar{background:#fff;color:#0878c4;box-shadow:0 6px 15px rgba(0,65,112,.16)}.sidebar .nav-label{color:rgba(255,255,255,.56)}.sidebar .main-nav a{color:rgba(255,255,255,.86);transition:background .15s ease,color .15s ease,box-shadow .15s ease}.sidebar .main-nav a:hover{background:rgba(255,255,255,.11);color:#fff}.sidebar .main-nav a.active{background:rgba(255,255,255,.18);color:#fff;font-weight:700;box-shadow:none}.sidebar .nav-icon{background:rgba(255,255,255,.14);color:rgba(255,255,255,.9);transition:background .15s ease,color .15s ease,box-shadow .15s ease}.sidebar .main-nav a.active .nav-icon{background:#fff;color:#0069ae;box-shadow:none}.sidebar-footer{border-top-color:rgba(255,255,255,.16)}.sidebar .account-link{color:rgba(255,255,255,.88)}.sidebar .account-link:hover,.sidebar .account-link.active{background:rgba(255,255,255,.12);color:#fff}.sidebar-footer .btn-ghost{color:#fff;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.28)}.sidebar-footer .btn-ghost:hover{background:#fff;color:#0069ae}.sidebar .main-nav{scrollbar-color:rgba(255,255,255,.28) transparent;scrollbar-width:thin}

/* Incoming stock reference view */
.incoming-header{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:4px 0 16px}.incoming-header h1{font-size:30px;line-height:1.2;margin:5px 0}.incoming-header p,.product-section-head p{margin:0;color:var(--muted)}.incoming-summary{display:flex;align-items:baseline;gap:8px;padding:10px 15px;border-radius:12px;background:#fff;border:1px solid var(--border);box-shadow:var(--shadow)}.incoming-summary strong{font-size:24px;color:var(--primary-dark)}.incoming-summary span{font-size:12px;color:var(--muted)}.category-pills{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 14px;margin-bottom:4px}.category-pill{display:flex;align-items:center;gap:7px;flex:0 0 auto;padding:9px 14px;border-radius:999px;border:1px solid #cfdae4;background:#fff;color:#33485a;font-size:12px}.category-pill span{color:var(--muted)}.category-pill:hover{border-color:#9bcceb}.category-pill.active{background:#112130;border-color:#112130;color:#fff}.category-pill.active span{color:rgba(255,255,255,.7)}.schedule-card{padding:20px}.schedule-table .bucket-row td{padding:9px 12px;background:#f1f5f8;color:#536574;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.45px}.available-text{color:var(--green)}.text-danger{color:var(--red)}.product-section{scroll-margin-top:20px}.product-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:28px 0 14px}.product-section-head h2{font-size:21px;margin:0 0 4px;color:var(--navy)}.incoming-filters{display:grid;grid-template-columns:minmax(210px,1fr) 150px auto;align-items:end;gap:8px}.incoming-filters label{font-size:11px}.incoming-product-card{background:#fff;border:1px solid var(--border);border-radius:15px;box-shadow:var(--shadow);margin-bottom:18px;overflow:hidden}.product-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid var(--border)}.product-identity{display:flex;gap:15px;min-width:0}.product-identity>img,.image-placeholder{width:82px;height:82px;flex:0 0 82px;border-radius:12px;object-fit:cover;background:#edf2f6;border:1px solid var(--border)}.image-placeholder{display:grid;place-items:center;color:#8b98a4;font-size:9px;font-weight:800}.product-category{display:inline-block;color:var(--primary-dark);font-size:10px;font-weight:800;letter-spacing:.8px}.product-identity h3{font-size:20px;margin:3px 0;color:var(--navy)}.product-identity p{margin:0 0 4px;color:#4f5f6d;font-size:12px}.product-identity small{color:var(--muted)}.product-po-tags{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.product-po-tags>span{display:flex;flex-direction:column;min-width:120px;padding:8px 10px;border-radius:9px;background:var(--soft);border:1px solid #d8eefc}.product-po-tags strong{font-size:11px;color:var(--primary-dark)}.product-po-tags small{font-size:9px;color:#587184;margin-top:2px}.product-lot-table th small{display:block;font-size:9px;line-height:1.4;font-weight:500;margin-top:3px}.variant-cell{display:flex;align-items:center;gap:9px}.variant-cell img{width:38px;height:38px;border-radius:8px;object-fit:cover;border:1px solid var(--border)}.variant-cell span{display:flex;flex-direction:column}.variant-cell small{color:var(--muted);font-size:10px;margin-top:2px}.availability-button{display:inline-flex;align-items:center;justify-content:center;min-width:58px;padding:7px 10px;border-radius:8px;background:#e5f7ef;color:#087750;font-size:12px;font-weight:800;border:1px solid #bce9d8}.availability-button:hover{background:var(--green);color:#fff}.sold-out{display:inline-block;padding:5px 8px;border-radius:7px;background:#f1f3f5;color:#88949e;font-size:10px}.incoming-product-card footer{padding:10px 20px;background:#f8fafc;color:var(--muted);font-size:10px;border-top:1px solid var(--border)}
@media(max-width:900px){.product-section-head,.product-card-head{align-items:stretch;flex-direction:column}.incoming-filters{grid-template-columns:1fr 140px auto}.product-po-tags{justify-content:flex-start}}
@media(max-width:600px){.incoming-header{align-items:flex-start;flex-direction:column}.incoming-header h1{font-size:25px}.incoming-summary{width:100%}.incoming-filters{width:100%;grid-template-columns:1fr}.product-identity>img,.image-placeholder{width:66px;height:66px;flex-basis:66px}.product-card-head{padding:15px}.product-po-tags>span{min-width:calc(50% - 4px)}.schedule-card{padding:14px}}
.compact-metrics .metric{min-height:110px;padding:17px 19px}.compact-metrics .metric strong{font-size:29px;margin-top:6px}.filter-card{padding:16px 18px}.booking-filters{display:grid;grid-template-columns:minmax(210px,1.5fr) repeat(3,minmax(125px,.8fr)) auto auto auto;gap:9px;align-items:end}.booking-filters label{font-size:11px}.booking-filters .mine-filter{align-items:center;flex-direction:row;white-space:nowrap;padding-bottom:10px}.booking-filters .mine-filter input{width:auto}.view-switch{display:inline-flex;align-items:center;gap:10px;background:transparent!important;border:none!important;padding:0!important;margin:0 0 14px}.view-switch a{display:inline-flex;align-items:center;gap:7px;padding:8px 16px;border-radius:999px;color:#1e293b;background:#e2e8f0;font-size:13px;font-weight:500;border:none!important;transition:all 0.15s ease;text-decoration:none;box-shadow:none!important}.view-switch a:hover{color:#fff!important;background:#334155!important}.view-switch a.active{background:#0a84d8!important;border:none!important;color:#fff!important;font-weight:500;box-shadow:none!important}.view-switch a.active span{background:#0b1f33!important;color:#fff!important}.po-management-table{min-width:1280px}
@media(max-width:1100px){.booking-filters{grid-template-columns:repeat(3,1fr)}.booking-filters label:first-child{grid-column:span 2}}
@media(max-width:700px){.booking-filters{grid-template-columns:1fr 1fr}.booking-filters label:first-child{grid-column:1/-1}.compact-metrics{grid-template-columns:repeat(2,1fr)}.view-switch{display:flex}.view-switch a{flex:1;text-align:center}}
.catalog-section{padding:0;overflow:hidden}.catalog-section summary{display:flex;align-items:center;justify-content:space-between;cursor:pointer;padding:18px 20px;list-style:none}.catalog-section summary::-webkit-details-marker{display:none}.catalog-section summary span{display:flex;flex-direction:column;gap:3px}.catalog-section summary strong{color:var(--navy)}.catalog-section summary small{color:var(--muted)}.catalog-section summary em{font-style:normal;color:var(--primary-dark);font-size:12px;font-weight:700}.catalog-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:0 20px 20px}.catalog-grid article{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid var(--border);border-radius:10px;background:#fbfcfd}.catalog-grid article>img,.catalog-grid article>.image-placeholder{width:44px;height:44px;flex:0 0 44px;border-radius:8px;object-fit:cover}.catalog-grid article div:last-child{display:flex;min-width:0;flex-direction:column}.catalog-grid article span{font-size:9px;font-weight:800;color:var(--primary-dark)}.catalog-grid article strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:var(--navy)}.catalog-grid article small{font-size:9px;color:var(--muted)}
@media(max-width:900px){.catalog-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:560px){.catalog-grid{grid-template-columns:1fr}}
.workflow-card>h2,.workflow-card .card-head h2{display:flex;align-items:center;gap:9px}.workflow-card h2>b{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--primary);color:#fff;font-size:13px}.summary-panel{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:18px;border-radius:12px;background:var(--soft)}.summary-panel>strong{font-size:38px;color:var(--primary-dark)}.summary-panel>span{color:var(--muted);font-size:12px;margin-bottom:14px}.subheading{font-size:14px;color:var(--navy);margin:20px 0 9px}.payment-grid{display:grid;grid-template-columns:90px repeat(5,1fr);gap:7px;align-items:center}.payment-grid>strong{font-size:12px;color:var(--navy)}.cost-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:15px 0}.cost-summary span{padding:12px;border-radius:9px;background:var(--soft);font-size:10px;color:var(--muted)}.cost-summary strong{display:block;color:var(--primary-dark);font-size:19px}.appointment-list,.handover-list{display:grid;gap:8px;margin-bottom:16px}.appointment-list article,.handover-list article{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--border);border-radius:10px}.appointment-list article>div,.handover-list article>div{display:flex;flex-direction:column}.appointment-list small,.handover-list small{color:var(--muted);margin-top:3px}.appointment-list form{display:flex;gap:7px}.appointment-list input{width:145px;padding:7px}.appointment-qty-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:14px 0}.appointment-qty-grid label{padding:9px;border:1px solid var(--border);border-radius:9px}.appointment-qty-grid small{font-weight:400;color:var(--muted)}.danger-zone{border-left:4px solid var(--red)}.btn:disabled{cursor:not-allowed;opacity:.45;transform:none}
@media(max-width:900px){.payment-grid{grid-template-columns:80px repeat(2,1fr)}.cost-summary,.appointment-qty-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.payment-grid{grid-template-columns:1fr}.cost-summary,.appointment-qty-grid{grid-template-columns:1fr}.appointment-list article,.handover-list article{align-items:flex-start;flex-direction:column}}

/* Lot-based stock views (incoming, bookings, PO workflow) */
.badge.stage-prod{background:#eee9ff;color:#5933c7}.badge.stage-ship{background:#e4f3fd;color:#0069ae}.badge.stage-qc{background:#fff3de;color:#a75c00}.badge.stage-part{background:#e3f6f4;color:#0f7d74}.badge.stage-done{background:#e7f7f1;color:#0a7651}.text-warn{color:#a75c00;font-weight:700}.wrap-cell{white-space:normal;max-width:240px}.product-identity .product-po-tags{justify-content:flex-start;margin-top:9px}.product-identity .product-po-tags strong{display:flex;align-items:center;gap:5px}.product-identity h3 .muted{font-weight:600}.lot-table{min-width:0}.lot-table th,.lot-table td{white-space:nowrap}.lot-table th:first-child,.lot-table td:first-child{width:80px}.lot-table .lot-head{vertical-align:bottom;min-width:120px}.lot-head strong{display:block;color:var(--navy);font-size:12px}.lot-head span{display:block;color:var(--text);font-size:13px;font-weight:800}.lot-head small{display:block;font-size:10px;font-weight:500}button.availability-button{cursor:pointer;font-family:inherit}.book-summary{display:flex;align-items:center;gap:12px;padding:10px;border-radius:10px;background:var(--soft);margin-bottom:14px}.book-summary img{width:52px;height:52px;border-radius:9px;object-fit:cover;border:1px solid var(--border)}.size-rows{display:grid;gap:6px;margin-top:6px}.size-row{display:grid;grid-template-columns:70px 1fr 70px 100px;gap:8px;align-items:center;padding:6px 8px;border:1px solid var(--border);border-radius:9px}.size-row small{color:var(--muted);text-align:right}.size-row input{padding:7px 9px;text-align:right}.qty-input{width:96px;padding:6px 8px;text-align:right}.booking-table td{white-space:normal}.booking-items{min-width:210px}.booking-parts{min-width:200px;font-size:12px}.booking-note{max-width:180px;color:var(--muted)}.date-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0}.date-steps>label{padding:10px;border:1px solid var(--border);border-radius:10px;background:#fbfcfd}.date-steps>label.sales-visible{border-color:#9bcceb;background:var(--soft)}.date-steps .check{font-weight:500;font-size:12px;gap:6px}.form-grid.four{grid-template-columns:repeat(4,1fr);margin:12px 0}.appointment-create{border-top:1px dashed var(--border);margin-top:16px;padding-top:4px}.add-line{margin:14px 0 6px}.new-po-groups{display:grid;gap:10px;margin-top:12px}.new-po-group{padding:12px;border:1px solid var(--border);border-radius:10px;display:grid;gap:6px}.new-po-group .card-head{margin-bottom:4px}.history-filters{grid-template-columns:minmax(200px,1.5fr) 160px 160px auto}.report-details{grid-template-columns:repeat(4,1fr)}#sec1 .inline-form{margin:0 0 8px;align-items:end}
@media(max-width:900px){.date-steps,.form-grid.four,.report-details{grid-template-columns:repeat(2,1fr)}.history-filters{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.date-steps,.form-grid.four,.report-details{grid-template-columns:1fr}.size-row{grid-template-columns:60px 1fr 80px}.size-row small{display:none}}
.nav-count{margin-left:auto;min-width:22px;padding:2px 7px;border-radius:999px;background:#fff;color:#c2410c;font-size:11px;font-style:normal;font-weight:800;text-align:center}.sidebar .main-nav a.active .nav-count{background:#fff3de}
.product-identity .product-po-tags>span{flex-direction:row;align-items:center;gap:8px;min-width:0;padding:6px 10px;white-space:nowrap}.product-identity .product-po-tags small{margin-top:0;font-size:11px}
.lot-table th{padding:7px 12px}.lot-table td{padding:5px 12px;vertical-align:middle;line-height:1.35}.lot-table .availability-button{padding:4px 10px}.lot-table .sold-out{padding:3px 8px}.lot-head small,.lot-head span{line-height:1.3}.product-card-head{padding:14px 18px}.product-identity h3{margin:2px 0}.product-identity p{margin:0 0 2px}.product-identity .product-po-tags{gap:6px;margin-top:6px}.product-identity .product-po-tags>span{padding:4px 9px}.incoming-product-card footer{padding:7px 18px}.incoming-product-card{margin-bottom:14px}
.size-row.is-over{border-color:var(--red);background:#fdecee}.size-row.is-over input{border-color:var(--red);color:var(--red);font-weight:700;box-shadow:0 0 0 3px rgba(216,59,69,.15)}.size-row.is-over small{color:var(--red);font-weight:700}
.sum-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}.sum-chips span{display:inline-flex;align-items:baseline;gap:6px;padding:7px 12px;background:#fff;border:1px solid var(--border);border-radius:10px;font-size:12.5px;color:#4d5a66}.sum-chips strong{font-family:Consolas,monospace;font-size:15px;color:var(--navy)}.po-toolbar{margin:0 0 14px}
.app-page .page-shell{width:calc(100% - 40px);max-width:none;margin:20px auto 48px}.po-management-table{min-width:0}.po-management-table th,.po-management-table td{padding:8px 7px;font-size:12.5px}.po-management-table th{white-space:normal;vertical-align:bottom;line-height:1.3}.po-management-table td{white-space:nowrap}.po-management-table td.wrap-cell{white-space:normal;max-width:200px}.po-management-table td:first-child,.po-management-table th:first-child{padding-left:4px}.po-management-table .btn-sm{padding:5px 9px}
@media(max-width:900px){.app-page .page-shell{width:calc(100% - 20px);margin-top:14px}}
.availability-button{font-weight:400}
.btn-primary{box-shadow:none}
.po-page-title{align-items:center;margin-bottom:14px}.po-toolbar{display:grid;gap:10px;margin:0 0 14px}.po-toolbar .category-pills{padding:0 2px 2px;margin:0}.po-toolbar-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.po-toolbar-row .view-switch{margin:0}.po-toolbar-row .sum-chips{margin:0;justify-content:flex-end}.sum-chips span.is-alert{border-color:#f6c8cc;background:#fdecee;color:#a91f2a}.sum-chips span.is-alert strong{color:#a91f2a}
@media(max-width:700px){.po-page-title{flex-direction:row;align-items:center}.po-toolbar-row .sum-chips{justify-content:flex-start}}
.sidebar-footer .sidebar-user{margin:0 0 2px}.nav-icon svg{display:block}
.product-meta-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;margin-top:2px}.product-meta-row p{margin:0!important}.product-identity .product-meta-row .product-po-tags{margin-top:0}
.incoming-filters{grid-template-columns:minmax(220px,1fr) 220px 170px auto;align-items:end}.incoming-filters .btn{height:42px}
@media(max-width:900px){.incoming-filters{grid-template-columns:1fr 1fr}}@media(max-width:600px){.incoming-filters{grid-template-columns:1fr}}
.lot-table tbody tr:nth-child(even){background:#fdfdfe}.lot-table tbody tr:hover{background:#eef5fb}

/* Profile page styling */
.profile-grid{display:grid;grid-template-columns:300px 1fr;gap:20px;align-items:start}
@media(max-width:850px){.profile-grid{grid-template-columns:1fr}}
.profile-card{text-align:center;padding:28px 20px}
.profile-avatar-large{width:76px;height:76px;border-radius:20px;margin:0 auto 14px;display:grid;place-items:center;background:linear-gradient(145deg,#1597e5,#0069ae);color:#fff;font-size:30px;font-weight:800;box-shadow:0 8px 20px rgba(10,132,216,.25)}
.profile-card h3{margin:8px 0 2px;font-size:19px;color:var(--navy)}
.profile-card p{margin:0 0 14px;color:var(--muted);font-size:13px}
.profile-badges{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-bottom:18px}
.profile-info-list{text-align:left;border-top:1px solid var(--border);padding-top:16px;display:grid;gap:12px}
.profile-info-item{display:flex;justify-content:space-between;align-items:center;font-size:12.5px}
.profile-info-item span{color:var(--muted)}
.profile-info-item strong{color:var(--navy)}
.muted-input{background:#f4f7f9!important;color:#6b7c8c!important;cursor:not-allowed}
.sidebar-user-link{display:block;text-decoration:none}
.sidebar-user-link:hover .sidebar-user{background:rgba(255,255,255,.2);border-color:rgba(255,255,255,.3)}
.sidebar-user{transition:background .15s ease,border-color .15s ease}
.dialog-alert{margin:-4px 0 16px;padding:10px 14px;border-radius:10px;font-size:12.5px;font-weight:600;animation:dialogAlertFade .2s ease-out}
@keyframes dialogAlertFade{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}

/* Compact sidebar layout with font-weight 500 & transparent icons */
.app-page { padding-left: 220px; }
.sidebar { width: 220px; }
.sidebar-brand { height: 60px; padding: 10px 14px; }
.sidebar-brand .brand-mark { width: 32px; height: 32px; border-radius: 8px; font-size: 10.5px; }
.sidebar-brand .brand strong { font-size: 13.5px; font-weight: 500; }
.sidebar-brand .brand small { font-size: 8px; }
.sidebar .main-nav { padding: 4px 8px; gap: 3px; }
.sidebar .main-nav a { gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.sidebar .main-nav a.active { font-weight: 500; }
.nav-icon { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 0; background: transparent !important; box-shadow: none !important; }
.sidebar .nav-icon { background: transparent !important; color: rgba(255, 255, 255, 0.85); }
.sidebar .main-nav a:hover .nav-icon { color: #ffffff; }
.sidebar .main-nav a.active .nav-icon { background: transparent !important; color: #ffffff; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-label { padding: 10px 10px 3px; font-size: 9px; font-weight: 500; letter-spacing: 0.9px; }
.sidebar-user { margin: 4px 8px 2px; padding: 6px 8px; border-radius: 8px; gap: 8px; }
.sidebar .user-avatar { width: 28px; height: 28px; flex: 0 0 28px; font-size: 12px; border-radius: 7px; font-weight: 500; }
.sidebar-user strong { font-size: 12px; font-weight: 500; }
.sidebar-user small { font-size: 9px; }
.sidebar-footer { padding: 8px 10px; gap: 5px; }
.account-link { padding: 4px; font-size: 11px; font-weight: 500; }
.sidebar-footer .btn-block { padding: 6px; font-size: 11.5px; font-weight: 500; }


/* Unified Blue & Dark Grey Category Pills (No Border & Spaced) */
.category-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    margin-bottom: 6px;
    scrollbar-width: thin;
}
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    padding: 8px 16px;
    border-radius: 999px;
    border: none !important;
    background: #e2e8f0;
    color: #1e293b;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: none !important;
    transition: all 0.15s ease;
}
.category-pill strong {
    font-weight: 500;
}
.category-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: #cbd5e1;
    color: #0f172a;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.15s ease;
}
.category-pill:hover {
    background: #334155 !important;
    border: none !important;
    color: #ffffff !important;
}
.category-pill:hover span {
    background: #475569 !important;
    color: #ffffff !important;
}

/* Inactive Category Pills - Solid Dark Grey (#e2e8f0 / #1e293b), No Border */
.category-pill.pill-all,
.category-pill.pill-jacket,
.category-pill.pill-cap,
.category-pill.pill-apporn,
.category-pill.pill-apron,
.category-pill.pill-workwear,
.category-pill:nth-child(n) {
    background: #e2e8f0;
    border: none !important;
    color: #1e293b;
}
.category-pill.pill-all span,
.category-pill.pill-jacket span,
.category-pill.pill-cap span,
.category-pill.pill-apporn span,
.category-pill.pill-apron span,
.category-pill.pill-workwear span,
.category-pill:nth-child(n) span {
    background: #cbd5e1;
    color: #0f172a;
}

/* Active Category Pill & Active Tab -> System Theme Blue (#0a84d8), No Border */
.category-pill.active,
.category-pill.pill-all.active,
.category-pill.pill-jacket.active,
.category-pill.pill-cap.active,
.category-pill.pill-apporn.active,
.category-pill.pill-apron.active,
.category-pill.pill-workwear.active,
.category-pill:nth-child(n).active {
    background: #0a84d8 !important;
    border: none !important;
    color: #ffffff !important;
}
.category-pill.active span,
.category-pill.pill-all.active span,
.category-pill.pill-jacket.active span,
.category-pill.pill-cap.active span,
.category-pill.pill-apporn.active span,
.category-pill.pill-apron.active span,
.category-pill.pill-workwear.active span,
.category-pill:nth-child(n).active span {
    background: #0b1f33 !important;
    color: #ffffff !important;
}
.category-pill.active:hover,
.category-pill:nth-child(n).active:hover {
    background: #0069ae !important;
    border: none !important;
    color: #ffffff !important;
}

/* Incoming Summary Solid Theme Blue Pill Badge Styling (No Border) */
.incoming-summary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #0a84d8;
    border: none !important;
    color: #ffffff;
    box-shadow: none !important;
    transition: all 0.15s ease;
}
.incoming-summary:hover {
    background: #0069ae !important;
    transform: translateY(-1px);
}
.incoming-summary span {
    font-size: 13.5px;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 0.2px;
}
.incoming-summary strong {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0b1f33;
    min-width: 20px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
}

/* Unified Summary Chips - Spaced & No Border */
.sum-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
}
.sum-chips span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    border: none !important;
    background: #e2e8f0;
    color: #1e293b;
    box-shadow: none !important;
    transition: all 0.15s ease;
}
.sum-chips span:hover {
    background: #334155 !important;
    border: none !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}
.sum-chips strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    background: #cbd5e1;
    color: #0f172a;
    transition: all 0.15s ease;
}
.sum-chips span:hover strong {
    background: #475569 !important;
    color: #ffffff !important;
}

/* Active / Alert Summary Chips (Theme Blue Accent, No Border) */
.sum-chips span.chip-unscheduled,
.sum-chips span.chip-pending {
    background: #eaf6ff;
    border: none !important;
    color: #0069ae;
}
.sum-chips span.chip-unscheduled strong,
.sum-chips span.chip-pending strong {
    background: #0a84d8;
    color: #ffffff;
}
.sum-chips span.chip-unscheduled:hover,
.sum-chips span.chip-pending:hover {
    background: #0a84d8 !important;
    border: none !important;
    color: #ffffff !important;
}
.sum-chips span.chip-unscheduled:hover strong,
.sum-chips span.chip-pending:hover strong {
    background: #0b1f33 !important;
    color: #ffffff !important;
}

/* Secondary Summary Chips (Dark Grey / Slate, No Border) */
.sum-chips span.chip-late,
.sum-chips span.chip-stale {
    background: #e2e8f0;
    border: none !important;
    color: #1e293b;
}
.sum-chips span.chip-late strong,
.sum-chips span.chip-stale strong {
    background: #cbd5e1;
    color: #0f172a;
}
.sum-chips span.chip-late:hover,
.sum-chips span.chip-stale:hover {
    background: #334155 !important;
    border: none !important;
    color: #ffffff !important;
}
.sum-chips span.chip-late:hover strong,
.sum-chips span.chip-stale:hover strong {
    background: #475569 !important;
    color: #ffffff !important;
}






