:root{--blue:#3159e7;--blue-dark:#2445bb;--ink:#1b2540;--muted:#7b8599;--line:#e8ebf2;--bg:#f8f9fd;--white:#fff;--nav:#101a36;--radius:15px;--shadow:0 4px 24px rgba(22,34,66,.035);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);font-size:14px}*{box-sizing:border-box}body{margin:0}a{text-decoration:none;color:inherit}button,input,textarea,select{font:inherit}button{cursor:pointer}input,textarea,select{outline:none}input:focus,textarea:focus,select:focus{border-color:#6d82f4!important;box-shadow:0 0 0 3px rgba(49,89,231,.12)}h1,h2,h3,p{margin-top:0}h1{font-size:30px;line-height:1.2;letter-spacing:-1.1px;margin-bottom:9px}h2{font-size:17px;letter-spacing:-.3px;margin-bottom:6px}h3{font-size:14px}small{font-size:11px}p{line-height:1.6}input,select,textarea{border:1px solid #e0e5ef;border-radius:9px;background:#fff;color:var(--ink);padding:12px 14px;width:100%}input::placeholder,textarea::placeholder{color:#a3adbf}textarea{resize:vertical;line-height:1.5}hr{border:0;border-top:1px solid var(--line);margin:18px 0}.app-body{background:var(--bg)}.app-shell{display:flex;min-height:100vh}.sidebar{width:250px;background:var(--nav);color:#bec9e0;padding:29px 18px 20px;display:flex;flex-direction:column;flex-shrink:0;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:11px;color:#fff;padding:0 10px 28px;font-size:14px;white-space:nowrap}.brand strong{display:block;font-size:14px;letter-spacing:-.3px}.brand small{display:block;font-size:9px;letter-spacing:1.9px;color:#98a7c4;margin-top:5px}.brand-icon{display:inline-flex;align-items:center;justify-content:center;min-width:39px;height:39px;background:#5271f0;border-radius:11px;color:white;font-size:13px;font-weight:800;letter-spacing:-.5px;box-shadow:0 5px 15px rgba(64,98,230,.26)}.nav-label{font-size:10px;letter-spacing:1.5px;font-weight:700;color:#7586a9;margin:12px 11px 10px}.settings-label{margin-top:34px}.nav-item{display:flex;align-items:center;gap:14px;padding:12px 14px;color:#b5c2db;border-radius:9px;font-weight:500;margin:4px 0}.nav-item:hover{background:#1a294d;color:white}.nav-item.selected{background:#2b437b;color:#fff}.nav-icon{font-size:21px;line-height:1;width:20px;text-align:center;font-weight:400}.sidebar-bottom{border-top:1px solid #273557;margin-top:auto;padding:22px 10px 0;font-size:11px;display:flex;align-items:center;gap:9px;color:#a8b9d6}.online-dot{width:7px;height:7px;border-radius:50%;background:#5cc99b;box-shadow:0 0 0 3px rgba(92,201,155,.09)}.main-wrap{flex:1;min-width:0}.topbar{height:73px;background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 42px;border-bottom:1px solid #eef0f6}.breadcrumb{font-weight:600;color:#4b5875;font-size:13px}.breadcrumb span{color:#b2bfd0;margin:0 8px}.topbar-right{display:flex;align-items:center;gap:13px}.role-tag{font-size:10px;color:#526a9a;background:#eff3fb;border:1px solid #e4eaf4;padding:6px 10px;border-radius:20px;font-weight:700;text-transform:uppercase;letter-spacing:.6px}.avatar{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:#dae3ff;border-radius:50%;font-size:13px;color:#3755b6;font-weight:800}.topbar-name{font-size:12px;font-weight:600}.menu-toggle{display:none}.page-content{max-width:1500px;margin:0 auto;padding:39px 44px 30px}.page-heading{margin-bottom:27px}.page-heading p{color:var(--muted);margin-bottom:0;font-size:13px}.page-heading h1{margin-top:7px}.split-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.eyebrow{font-weight:800;letter-spacing:1.8px;color:var(--blue);font-size:10px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:41px;border-radius:9px;font-weight:700;font-size:12px;padding:10px 16px;border:1px solid transparent;white-space:nowrap}.btn-primary{background:var(--blue);color:white;box-shadow:0 5px 12px rgba(49,89,231,.13)}.btn-primary:hover{background:var(--blue-dark)}.btn-light{background:#fff;border-color:#dfe5ef;color:#4c5a72}.btn-light:hover{background:#f5f7fc}.btn-outline-danger{background:#fff;color:#a53d4b;border-color:#f0ced1}.btn-outline-danger:hover{background:#fff4f4}.full{width:100%}.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px;margin-bottom:24px}.stat-card,.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}.stat-card{padding:25px 25px 22px;position:relative;overflow:hidden;min-height:155px}.stat-label{display:block;font-size:12px;font-weight:650;color:#59657d}.stat-label small{font-size:10px;font-weight:400}.stat-card strong{display:block;font-size:34px;letter-spacing:-1px;margin:18px 0 7px}.stat-hint{color:#9ba5b5;font-size:11px}.stat-deco{position:absolute;right:23px;top:26px;width:39px;height:39px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:21px;font-weight:bold}.deco-blue{background:#edf2ff;color:#4866df}.deco-green{background:#e7faf1;color:#22a671}.deco-purple{background:#f2efff;color:#8266e8}.two-column{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(245px,1fr);gap:22px}.panel-header,.directory-bar{display:flex;align-items:center;justify-content:space-between;padding:25px 25px 20px}.panel-header p,.directory-bar p,.quick-panel>p,.settings-card>p{font-size:12px;color:var(--muted);margin:0}.text-link,.row-link{font-weight:700;color:var(--blue);font-size:12px}.table-wrap{overflow-x:auto}.data-table{border-collapse:collapse;width:100%;min-width:650px;text-align:left}.data-table thead{background:#f8faff;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.data-table th{font-weight:700;color:#8690a4;font-size:10px;text-transform:uppercase;letter-spacing:.65px;padding:14px 24px;white-space:nowrap}.data-table td{padding:15px 24px;border-bottom:1px solid #eff1f5;color:#59667b;font-size:12px;vertical-align:middle}.data-table tr:last-child td{border-bottom:0}.data-table tbody tr:hover{background:#fafbff}.person{display:flex;align-items:center;gap:11px;white-space:nowrap}.person-avatar{min-width:35px;height:35px;background:#edf1ff;color:#5271dc;border-radius:9px;display:flex;align-items:center;justify-content:center;font-weight:750}.person strong{display:block;color:#273452;font-size:12px}.person small{display:block;color:#a0a9b9;margin-top:4px}.truncate-cell{max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.quick-panel{padding:25px}.quick-panel>p{margin-bottom:23px}.quick-link{display:flex;align-items:center;gap:11px;padding:13px 0;border-bottom:1px solid var(--line)}.quick-link strong{font-size:12px;display:block}.quick-link small{color:#99a3b5;display:block;margin-top:4px}.quick-square{border-radius:10px;width:39px;height:39px;display:flex;align-items:center;justify-content:center;font-size:23px}.quick-square.purple{background:#f2efff;color:#7760e1}.quick-square.blue{background:#ecf2ff;color:#3f65e0}.quick-arrow{margin-left:auto;color:#99a8bf}.quick-note{background:#f3f6ff;border:1px solid #ecf0fd;padding:16px;border-radius:11px;margin-top:24px}.quick-note strong{font-size:12px}.quick-note p{margin:6px 0 0;color:#7f89a2;font-size:11px;line-height:1.65}.footer{color:#a0a9ba;text-align:center;font-size:10px;padding:28px 8px 0}.directory-panel{overflow:hidden}.filterbar{display:flex;gap:11px;padding:0 25px 24px;align-items:center}.search-field{position:relative;flex:1}.search-field span{position:absolute;top:9px;left:13px;color:#8b98ad;font-size:22px;line-height:24px}.search-field input{padding-left:42px;height:42px}.filterbar select{width:150px;height:42px;padding:9px 11px}.status-badge{display:inline-block;font-size:10px;font-weight:700;border-radius:20px;padding:5px 10px}.status-active{background:#e6f8f0;color:#218c62}.status-archived{background:#f1f2f5;color:#7e8696}.pagination{display:flex;justify-content:space-between;align-items:center;padding:18px 24px;border-top:1px solid var(--line);color:#7b8699;font-size:11px}.pagination>div{display:flex;gap:8px}.empty-state{text-align:center;padding:70px 18px;color:#8794a9}.empty-state h3{color:#243351;font-size:17px;margin:6px 0}.empty-state p{margin:0 0 16px}.empty-icon{font-size:36px;color:#8b9bcd}.back-link{display:inline-block;color:#8995aa;font-size:12px;font-weight:650;margin-bottom:20px}.back-link:hover{color:var(--blue)}.form-layout{display:grid;grid-template-columns:minmax(0,2.2fr) minmax(220px,1fr);align-items:start;gap:21px}.record-form{padding:0 27px}.form-section{padding:27px 0;border-bottom:1px solid var(--line)}.form-section h2{margin-bottom:5px}.form-section>p{font-size:12px;color:#8c97a9;margin-bottom:21px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.input-group{display:flex;flex-direction:column;gap:8px}.input-group label,.stack-form label{color:#495771;font-weight:700;font-size:11px}.input-group input,.input-group textarea{font-size:12px}.full-grid{grid-column:1/-1}.required{color:#e27b7b}.error-text{color:#be3c4e;font-size:11px}.last-section{border-bottom:0}.form-actions{display:flex;justify-content:flex-end;gap:12px;align-items:center;padding:20px 0 25px;border-top:1px solid var(--line)}.help-panel{padding:25px;border:1px solid #e9ebf3;border-radius:14px;background:#fff}.help-panel h3{margin-bottom:8px}.help-panel p{font-size:11px;color:#8792a6;line-height:1.75;margin:0}.help-symbol{background:#eaf0ff;color:var(--blue);width:42px;height:42px;display:flex;align-items:center;justify-content:center;border-radius:10px;margin-bottom:17px;font-size:27px}.duplicate-box{border:1px solid #f2d08f;background:#fffaf1;border-radius:10px;padding:14px;color:#7c5a20}.duplicate-box p{font-size:12px;margin:7px 0}.duplicate-box a{color:#3159e7;font-weight:600}.duplicate-box label{display:flex;gap:9px;align-items:center;margin-top:10px;font-size:12px}.duplicate-box input{width:auto}.profile-header{display:flex;align-items:center;gap:18px;padding:22px 27px;margin-bottom:22px}.profile-initials{width:57px;height:57px;border-radius:13px;background:#eaf0ff;color:#4666dd;font-size:20px;display:flex;align-items:center;justify-content:center;font-weight:800}.profile-header h2{margin-bottom:6px}.profile-id{margin-left:auto;font-size:12px;color:#8290a5}.profile-layout{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(230px,1fr);gap:22px}.profile-details{overflow:hidden}.profile-details .panel-header{border-bottom:1px solid var(--line)}.details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 30px;padding:30px}.details-grid>div{min-width:0}.details-grid span,.meta-item span{display:block;color:#8995a7;font-size:11px;margin-bottom:8px}.details-grid strong,.meta-item strong{display:block;color:#24314b;font-size:12px;font-weight:650;overflow-wrap:anywhere}.preserve-lines{white-space:pre-wrap}.profile-meta{padding:25px}.meta-item{border-bottom:1px solid var(--line);padding:15px 0}.meta-item:last-of-type{border:0}.profile-meta h3{margin-top:20px}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.settings-card{padding:26px}.settings-card .btn{margin-top:15px}.fine-print{font-size:11px!important;margin-top:17px!important;color:#8d96a8}.alert{margin-bottom:21px;padding:13px 16px;border-radius:9px;font-size:12px}.alert-success{background:#e7f9ef;border:1px solid #bbecd0;color:#24744f}.alert-error{background:#fff0f1;border:1px solid #f3c7c9;color:#a63c46}.login-body{background:#fff}.login-page{min-height:100vh;display:grid;grid-template-columns:49% 51%}.login-intro{background:#142348;color:#fff;position:relative;padding:38px 55px;display:flex;flex-direction:column;overflow:hidden}.login-intro:after{content:"";position:absolute;right:-210px;bottom:-280px;width:720px;height:720px;border:110px solid rgba(89,114,209,.09);border-radius:50%;pointer-events:none}.login-brand{display:flex;align-items:center;gap:13px;font-weight:700;font-size:15px}.intro-inner{margin:auto 0;max-width:500px;position:relative;z-index:1}.eyebrow.light{color:#91a5ff}.intro-inner h1{font-size:52px;letter-spacing:-2px;line-height:1.15;margin:23px 0}.intro-inner p{font-size:15px;line-height:1.85;color:#b4c2de;max-width:410px}.intro-bottom{margin-top:60px;color:#8fadd3;font-size:11px}.login-panel{display:flex;align-items:center;justify-content:center;padding:40px}.login-box{width:100%;max-width:350px}.mobile-login-brand{display:none}.pill-soft{display:inline-block;background:#edf3ff;color:#4869c8;font-size:10px;font-weight:800;letter-spacing:1px;padding:9px 11px;border-radius:6px;margin-bottom:24px}.login-box h2{font-size:31px;letter-spacing:-1px}.muted{color:#8b96a9;font-size:13px}.stack-form{display:flex;flex-direction:column;margin-top:36px}.stack-form label{margin:0 0 9px}.stack-form input{height:47px;margin-bottom:23px}.stack-form button{height:46px;margin-top:10px;justify-content:space-between;padding:0 18px;font-size:13px}.login-footnote{font-size:11px;color:#a1aabc;margin-top:23px;text-align:center}.login-alert{position:fixed;right:26px;top:20px;z-index:2;max-width:390px}.mobile-shade{display:none}
@media(max-width:1100px){.sidebar{width:220px}.page-content{padding:31px 27px}.topbar{padding:0 27px}.two-column,.form-layout,.profile-layout{grid-template-columns:1fr}.quick-panel{display:none}.help-panel{display:none}}
@media(max-width:760px){.sidebar{position:fixed;z-index:40;left:0;top:0;transform:translateX(-100%);transition:transform .2s;width:265px}.sidebar-open .sidebar{transform:translateX(0)}.sidebar-open .mobile-shade{display:block;position:fixed;inset:0;background:rgba(13,20,42,.5);z-index:35}.menu-toggle{display:inline-flex;border:0;background:transparent;font-size:21px;margin-right:13px;padding:6px;color:#55627d}.topbar{justify-content:flex-start;height:64px;padding:0 18px}.topbar-right{margin-left:auto}.topbar-name,.role-tag{display:none}.page-content{padding:28px 18px}.split-head{align-items:flex-start}.page-heading h1{font-size:25px}.stat-grid{grid-template-columns:1fr;gap:11px}.stat-card{min-height:auto;padding:20px}.stat-card strong{font-size:28px;margin:12px 0 2px}.filterbar{flex-wrap:wrap;padding:0 17px 18px}.search-field{flex-basis:100%}.filterbar select{flex:1}.directory-bar{padding:21px 17px 19px}.form-grid,.details-grid,.settings-grid{grid-template-columns:1fr}.record-form{padding:0 20px}.profile-header{padding:20px}.profile-id{display:none}.details-grid{padding:22px}.login-page{display:block}.login-intro{display:none}.login-panel{min-height:100vh;padding:35px}.mobile-login-brand{display:flex;align-items:center;gap:12px;font-weight:700;margin-bottom:52px}.login-box h2{font-size:28px}}
@media(max-width:440px){.page-heading.split-head{display:block}.page-heading.split-head>.btn{margin-top:20px}.breadcrumb{font-size:11px}.filterbar .btn{flex:1}.form-actions .btn{flex:1}.profile-header{align-items:center}.topbar-right{gap:6px}}

/* Delivery Management System V1 additions */
.card-link { color: inherit; text-decoration: none; }
.card-link:hover { transform: translateY(-2px); transition: transform .15s ease; }
.status-pill { display: inline-flex; padding: 6px 11px; border-radius: 100px; font-size: .77rem; font-weight: 750; background:#fef3c7; color:#92400e; white-space: nowrap; }
.status-pill.pending { background:#fff3d0; color:#92400e; }
.status-pill.assigned { background:#dbeafe; color:#1d4ed8; }
.status-pill.delivered { background:#dcfce7; color:#166534; }
.filter-tabs { display:flex; gap:10px; overflow-x:auto; margin:0 0 18px; padding-bottom:4px; }
.filter-pill { padding:9px 16px; border:1px solid #dce3ee; background:#fff; color:#64748b; font-size:14px; font-weight:650; border-radius:28px; text-decoration:none; white-space:nowrap; }
.filter-pill.active { color:#fff; background:#254ac5; border-color:#254ac5; }
.input-group select, .stack-form select { display:block; width:100%; padding:12px 14px; border:1px solid #dce3ee; border-radius:10px; background:#fff; color:#1e293b; font:inherit; }
.location-actions { display:flex; flex-wrap:wrap; gap:10px; margin:15px 0; }
.location-picker { height:290px; width:100%; border-radius:12px; border:1px solid #dce3ee; overflow:hidden; background:#edf2f7; }
.large-map { height:min(65vh,670px); min-height:380px; border-radius:12px; overflow:hidden; background:#edf2f7; }
.map-panel { padding:16px !important; }
.map-footnote { font-size:12px; color:#64748b; margin:12px 6px 4px; }
.rider-header { margin:6px 0 22px; }
.rider-header h1 { font-size:2rem; letter-spacing:-.04em; margin:8px 0; color:#12203d; }
.rider-header p { color:#64748b; }
.rider-action-bar { margin:20px 0 0; }
.rider-counts { display:grid; grid-template-columns:1fr 1fr; gap:13px; margin:0 0 20px; }
.rider-counts>div { background:#fff; border:1px solid #e2e8f0; border-radius:16px; padding:20px; display:flex; flex-direction:column; gap:5px; }
.rider-counts strong { font-size:30px; color:#162f68; line-height:1; }
.rider-counts span { font-size:13px; color:#64748b; }
.delivery-list { display:grid; gap:15px; max-width:880px; }
.delivery-card { border:1px solid #e0e7f0; border-radius:17px; background:#fff; box-shadow:0 6px 22px rgba(21,46,96,.045); padding:20px; }
.delivery-card-top { display:flex; justify-content:space-between; align-items:center; gap:12px; color:#64748b; font-size:13px; }
.delivery-card h2 { font-size:20px; margin:13px 0; color:#14213d; }
.delivery-detail { font-size:14px; line-height:1.55; color:#334155; margin:7px 0; white-space:pre-wrap; }
.delivery-detail b { color:#64748b; font-weight:650; }
.delivery-buttons { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; border-top:1px solid #eef2f7; padding-top:16px; align-items:center; }
.delivery-buttons form { margin:0; }
.delivery-buttons .btn { min-height:44px; }
@media(max-width:640px) {
  .page-heading.split-head { align-items:flex-start; }
  .rider-header h1 { font-size:28px; }
  .rider-counts>div { padding:16px; }
  .delivery-card { padding:16px; }
  .delivery-buttons .btn { width:100%; justify-content:center; }
  .delivery-buttons form { width:100%; }
  .large-map { min-height:320px; }
}
/* V1.1 catalog, order lines and rider discounts */
.product-panel{padding:18px 25px}
.catalog-heading{font-size:15px;margin:25px 0 12px;color:#243454;border-bottom:1px solid #e7ecf4;padding-bottom:10px}
.product-price-row,.order-entry-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,170px) auto;align-items:center;gap:15px;padding:13px 0;border-bottom:1px solid #edf0f7}
.product-price-row strong,.order-entry-row strong{display:block;font-size:13px;color:#273651}
.product-price-row small,.order-entry-row small,.available-order-row small{display:block;color:#7c8aa1;font-size:11px;margin-top:5px}
.product-price-row label,.quantity-label{display:block;font-size:11px;font-weight:700;color:#56647d;margin-bottom:5px}
.product-price-row input,.order-entry-row input,.rider-discount-form input{border:1px solid #dce3ee;border-radius:9px;padding:9px 11px;min-width:0;width:100%;font:inherit}
.order-entry-row{grid-template-columns:minmax(0,1fr) 115px}
.order-entry-row input:disabled{background:#f1f3f6;color:#8a96a8}
.order-totals{background:#f4f7fc;border:1px solid #e4eaf4;border-radius:12px;padding:16px;margin:18px 0}
.order-totals>div{display:flex;justify-content:space-between;gap:14px;padding:7px 0;color:#57647b;font-size:13px}
.order-totals strong{color:#1f3051}
.order-totals .grand-total{margin-top:8px;padding-top:13px;border-top:1px solid #dce4f0;font-weight:800;font-size:16px;color:#182d54}
.order-detail-lines{padding:10px 27px 25px;border-top:1px solid #edf0f5}
.order-detail-lines h2{padding:20px 0}
.order-detail-lines .data-table{width:100%;margin:0}
.rider-item-list{background:#fafcff;border:1px solid #e8edf5;border-radius:10px;padding:14px;margin:16px 0}
.rider-item-list>strong{display:block;font-size:12px;margin-bottom:10px}
.rider-line{display:flex;justify-content:space-between;gap:12px;font-size:12px;padding:7px 0;border-top:1px solid #edf1f7}
.rider-line span:last-child{white-space:nowrap;font-weight:700}
.rider-discount-form{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:15px 0}
.rider-discount-form label{font-size:12px;font-weight:700}
.rider-discount-form input{width:110px}
.available-orders{padding:24px;margin-top:24px}
.available-orders p{color:#637089;font-size:12px}
.available-order-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 0;border-top:1px solid #edf0f5}
.available-order-row form{margin:0}
@media(max-width:760px){.product-panel{padding:14px}.product-price-row{grid-template-columns:minmax(0,1fr) minmax(110px,130px)}.product-price-row button{grid-column:1/-1;width:100%}.order-detail-lines{padding:10px 15px 20px}.rider-discount-form .btn{width:100%}.rider-discount-form input{flex:1}.order-entry-row{grid-template-columns:minmax(0,1fr) 88px}}

/* Delivery Desk workspace */
:root {
  --blue: #076657;
  --blue-dark: #055345;
  --nav: #132b3a;
  --ink: #132b3a;
  --muted: #536b78;
  --line: #dbe5e8;
  --bg: #f1f5f6;
  --shadow: 0 8px 30px rgba(19,43,58,.045);
}
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #137b69; outline-offset: 3px; }
input:focus, textarea:focus, select:focus {
  border-color: #137b69 !important;
  box-shadow: 0 0 0 3px #16857124;
}
.sidebar { overflow-y: auto; }
.sidebar .nav-item { color: #d0dce2; }
.sidebar .nav-item:hover { background: #1e3c4b; }
.sidebar .nav-item.selected { background: #255061; color: #fff; }
.sidebar .nav-label { color: #a1b8c4; }
.sidebar-signout { margin-top: auto; padding-top: 23px; }
.sidebar-signout button { background: transparent; border: 1px solid #557482; width: 100%; }
.menu-close, .rider-bottom-nav { display: none; }
.page-heading h1, .rider-header h1 { color: var(--ink); font-size: clamp(27px, 3vw, 39px); letter-spacing: -.045em; }
.page-heading { margin-bottom: 24px; }
.btn { font-size: 13px; min-height: 44px; }
.btn-primary { box-shadow: 0 4px 12px #07665722; }
.btn-light { color: var(--ink); border-color: var(--line); }
.stat-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.stat-card { min-height: 143px; padding: 18px; transition: box-shadow .15s ease, transform .15s ease; }
.stat-card:hover { box-shadow: 0 10px 27px #132b3a18; }
.stat-label { padding-right: 34px; font-size: 13px; }
.stat-deco { right: 15px; top: 15px; width: 31px; height: 31px; }
.stat-hint, .data-table th, .role-tag, .muted, .back-link { color: var(--muted); }
.deco-blue, .quick-square.blue, .avatar { background: #dff0ed; color: #056657; }
.deco-purple, .quick-square.purple { background: #fff0d6; color: #835300; }
.data-table thead { background: #f5f8f9; }
.data-table td { font-size: 13px; }
.dashboard-customers { margin-top: 20px; }
.directory-preview { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--line); }
.directory-preview:hover { background: #f5faf8; }
.directory-preview span { color: var(--muted); }
.customer-entry { max-width: 890px; padding-top: 10px; }
.customer-entry .form-section h2 { margin-bottom: 15px; }
.customer-entry .form-section > p { color: var(--muted); }
.customer-entry .duplicate-box { margin-top: 16px; }
.customer-entry .alert { margin-top: 16px; }
.input-group label, .stack-form label, .quantity-label { font-size: 13px; }
.input-group input, .input-group textarea { font-size: 14px; }
.record-form .form-section:nth-last-of-type(1) { border-bottom: 0; }
.profile-details > h2 { padding: 22px 27px 0; }
.profile-meta form .btn { margin-top: 12px; }
.order-detail-lines .data-table { min-width: 360px; }
.order-detail-lines .data-table :is(td,th) { padding-inline: 10px; }
.login-intro { background: radial-gradient(ellipse at 85% 89%, #226354 0%, transparent 65%), var(--nav); }
.login-intro:after { border-color: #8ce1c31c; }
.intro-inner h1 { max-width: 480px; font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; }
.intro-inner p { color: #cfdfdf; }
.login-box { max-width: 390px; }
.login-box .stack-form { margin-top: 25px; }
.offline-screen { display: grid; min-height: 100dvh; place-items: center; padding: 20px; background: var(--bg); }
.offline-card { width: min(100%,400px); padding: 32px; }
.offline-card h1 { margin-top: 16px; }
.rider-body .page-content { max-width: 980px; }
.rider-action-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.rider-counts { grid-template-columns: repeat(3,minmax(0,1fr)); }
.rider-counts a { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 17px 14px; display: grid; align-content: start; gap: 6px; }
.rider-counts a:hover { border-color: var(--blue); }
.rider-counts strong { color: var(--blue); }
.rider-counts [data-section="available"] strong { color: #8a5a08; }
.rider-section { margin-top: 28px; scroll-margin-top: 12px; }
.rider-section > h2 { margin-bottom: 12px; font-size: 20px; }
.rider-empty { padding: 20px; color: var(--muted); }
.delivery-card h3 { font-size: 19px; margin: 12px 0; overflow-wrap: anywhere; }
.delivery-items { margin: 15px 0; }
.delivery-items summary { font-weight: 700; cursor: pointer; padding: 8px 0; }
.delivery-items .rider-item-list { list-style: none; margin: 4px 0 12px; }
.rider-line small { display: block; margin-top: 4px; color: var(--muted); }
.rider-line strong { white-space: nowrap; }
.delivery-detail { overflow-wrap: anywhere; }
@media (max-width: 1190px) {
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .sidebar { visibility: hidden; height: 100dvh; }
  .sidebar-open .sidebar { visibility: visible; }
  .menu-close { display: flex; margin-bottom: 18px; }
  .topbar { padding-top: env(safe-area-inset-top); }
  .stat-card { min-height: 110px; padding: 12px; }
  .stat-deco { right: 10px; top: 12px; width: 25px; height: 25px; font-size: 15px; }
  .stat-label { font-size: 12px; min-height: 33px; padding-right: 25px; }
  .stat-card strong { margin-top: 2px; }
  .stat-hint { display: none; }
  input, select, textarea, .input-group input, .input-group textarea { font-size: 16px; }
  .rider-body .page-content { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .rider-header { display: block; }
  .rider-header p { margin-bottom: 10px; }
  .rider-action-bar { display: none; }
  .rider-counts { gap: 7px; }
  .rider-counts strong { font-size: 24px; }
  .rider-counts span { font-size: 11px; }
  .rider-counts a { padding: 13px 10px; }
  .rider-bottom-nav {
    position: fixed; inset: auto 0 0; z-index: 30; display: grid; grid-template-columns: repeat(3,1fr);
    background: #fff; border-top: 1px solid var(--line); padding: 4px 5px env(safe-area-inset-bottom);
  }
  .rider-bottom-nav a { display: grid; place-items: center; padding: 7px 4px; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; border-radius: 8px; }
  .rider-bottom-nav a span { font-size: 19px; }
  .rider-bottom-nav a[aria-current] { color: var(--blue); background: #e8f5f0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
.data-table.rider-directory { min-width: 455px; }
.data-table.rider-directory :is(td,th) { padding-inline: 14px; }
.settings-card .stack-form { margin-top: 20px; }
.live-updates-notice { margin: 0 0 15px; }
.online-address { display: grid; justify-items: start; gap: 7px; margin: 0 0 18px; }
.online-address p { margin: 0; }
.online-address :is(p, ul):empty { display: none; }
#online-address-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#online-address-results .btn { white-space: normal; text-align: left; }

/* Catalog, quantities, and customer directory */
.product-price-row { grid-template-columns: minmax(0, 1fr) clamp(110px, 24vw, 190px); }
.catalog-add { border: 1px solid var(--line); border-radius: 12px; background: #f5f9f8; padding: 14px 16px; }
.catalog-add summary { cursor: pointer; font-weight: 750; color: var(--blue); padding: 6px 0; }
.new-product-row { min-width: 0; border: 0; padding: 14px 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.new-product-row label { font-weight: 650; font-size: 13px; }
.new-product-row + .new-product-row { border-top: 1px solid var(--line); }
.new-product-row [data-remove-product] { justify-self: start; }
.catalog-hint { color: var(--muted); font-size: 13px; margin: 16px 0 0; }
.catalog-save { position: sticky; bottom: 0; background: #fff; margin-top: 16px; }
.rider-account-actions { display: flex; gap: 8px; }
.order-entry-row { grid-template-columns: minmax(0, 1fr) 148px; }
.quantity-stepper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 4px; }
.order-entry-row .quantity-stepper input { padding: 6px 2px; text-align: center; appearance: textfield; }
.quantity-stepper input::-webkit-inner-spin-button, .quantity-stepper input::-webkit-outer-spin-button { appearance: none; }
.quantity-stepper .btn { padding: 0; font-size: 20px; font-weight: 600; }
.quantity-stepper .btn:disabled { opacity: .5; cursor: default; }
.delivery-address-fields { margin-bottom: 16px; }
.customer-directory .search-field input { padding-inline: 14px; }
.customer-list-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) max-content max-content;
  align-items: center; column-gap: 22px; padding: 16px 24px; border-top: 1px solid var(--line);
}
.customer-list-row:hover, .customer-list-row:focus-visible { background: #f4faf7; }
.customer-list-row:focus-visible { outline-offset: -3px; }
.customer-list-person { display: flex; align-items: center; gap: 12px; }
.customer-list-person .person-avatar { background: #dff0ed; color: #055345; min-width: 40px; height: 40px; text-transform: uppercase; }
.customer-list-row strong, .customer-list-row small { display: block; overflow-wrap: anywhere; }
.customer-list-row small { color: var(--muted); font-size: 12px; margin-top: 4px; }
.customer-list-contact { color: var(--muted); font-size: 13px; }
.customer-list-link { font-weight: 700; font-size: 13px; color: var(--blue); }
@media (max-width: 640px) {
  .new-product-row { grid-template-columns: 1fr; }
  .order-entry-row { grid-template-columns: minmax(0, 1fr) 128px; }
  .quantity-stepper { grid-template-columns: 40px minmax(0, 1fr) 40px; }
  .customer-list-row { padding: 15px 17px; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; }
  .customer-list-contact { grid-column: 1; grid-row: 2; padding-left: 52px; }
  .customer-list-row .status-badge { grid-column: 2; grid-row: 1; justify-self: end; }
  .customer-list-link { grid-column: 2; grid-row: 2; justify-self: end; }
}