#realtime-orders{--rt-green:#167c70;--rt-blue:#3e69bd;--rt-orange:#c86d22;--rt-red:#b94e46}
#realtime-orders .realtime-card{overflow:hidden}
.realtime-head-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.realtime-sync-chip{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:999px;background:#edf8f6;color:#367068;font-size:12px}
.realtime-sync-chip::before{content:'';width:7px;height:7px;border-radius:50%;background:#42a995}
.realtime-sync-chip.error{background:#fff0ee;color:#a64239}.realtime-sync-chip.error::before{background:#c95045}
.realtime-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:17px}
.realtime-kpi{width:100%;padding:14px 16px;border:1px solid #e1e8eb;border-radius:12px;background:#f8fafb;color:inherit;text-align:left;font:inherit;cursor:pointer;transition:transform .15s,border-color .15s,box-shadow .15s}
.realtime-kpi small{display:block;color:#758591;font-size:12px}.realtime-kpi b{display:block;margin-top:5px;font-size:25px;line-height:1.1}
.realtime-kpi em{display:block;margin-top:7px;color:#71828e;font-size:10px;font-style:normal}.realtime-kpi:hover{transform:translateY(-1px);border-color:#92beb8}.realtime-kpi:focus-visible{outline:3px solid #61b2a65c;outline-offset:2px}.realtime-kpi.active{border-color:#167c70;box-shadow:0 0 0 2px #167c7026}.realtime-kpi.active em{color:#167c70;font-weight:800}
.realtime-kpi.primary{border-color:#c9e4df;background:#eff9f7;color:#256e65}.realtime-kpi.using{border-color:#cddbf5;background:#f1f5fd;color:#365f9e}.realtime-kpi.cancelled{border-color:#f0d3cf;background:#fff5f3;color:#9e4941}
.realtime-kpi.using.has-overdue{border-color:#e6a49e;background:#fff7f5}.realtime-kpi.using.has-overdue em{color:#b33e35;font-weight:800}
.realtime-tools{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(150px,.7fr) minmax(150px,.7fr) auto;gap:9px;align-items:end;margin-top:15px;padding:12px;border-radius:11px;background:#f4f7f8}
.realtime-tools label{display:grid;gap:4px;color:#6d7e8a;font-size:11px}.realtime-tools input,.realtime-tools select{width:100%;height:38px;padding:7px 9px;border:1px solid #d6e0e4;border-radius:8px;background:#fff;color:#172536;font:inherit}
.realtime-note{margin-top:10px;padding:10px 12px;border-left:3px solid #4a998e;border-radius:7px;background:#f2f8f7;color:#536f72;font-size:12px;line-height:1.6}
.realtime-table-wrap{overflow-x:hidden;margin-top:12px;border:1px solid #e0e7ea;border-radius:11px}
.realtime-table{width:100%;min-width:0;margin:0;table-layout:fixed}.realtime-table .rt-col-status{width:7%}.realtime-table .rt-col-store{width:9%}.realtime-table .rt-col-customer{width:7%}.realtime-table .rt-col-vehicle{width:16%}.realtime-table .rt-col-time{width:13%}.realtime-table .rt-col-money{width:10%}.realtime-table .rt-col-ordered{width:10%}.realtime-table .rt-col-remarks{width:22%}.realtime-table .rt-col-detail{width:6%}.realtime-table th{position:sticky;top:0;z-index:1;background:#f6f8f9}.realtime-table th,.realtime-table td{padding-left:8px;padding-right:8px;overflow-wrap:anywhere}.realtime-table td{vertical-align:middle}
.realtime-date-separator td{padding:8px 12px!important;border-top:2px solid #86bdb6;border-bottom:1px solid #d8e7e4;background:#eef7f5!important;color:#235f58}.realtime-date-separator span{font-size:14px;font-weight:900}.realtime-date-separator strong{display:inline-block;margin-left:8px;padding:2px 7px;border-radius:999px;background:#297b70;color:#fff;font-size:10px;vertical-align:1px}.realtime-date-separator em{margin-left:8px;color:#718780;font-size:10px;font-style:normal;font-weight:500}
.realtime-order-row{cursor:pointer;transition:background .15s}.realtime-order-row:hover,.realtime-order-row:focus{outline:0;background:#f1f8f7}.realtime-detail-link{max-width:100%;padding:6px 5px;border:1px solid #98c5bf;border-radius:7px;background:#fff;color:#167c70;font-size:11px;white-space:nowrap}
.realtime-order-row.overdue td{background:#fff8f7}.realtime-order-row.overdue td:first-child{box-shadow:inset 4px 0 #cf5146}.realtime-order-row.overdue:hover td,.realtime-order-row.overdue:focus td{background:#fff1ef}
.realtime-order-no b{display:block;font-size:13px}.realtime-order-no small,.realtime-vehicle small,.realtime-customer small{display:block;margin-top:2px;color:#7a8a94;font-size:11px}
.realtime-store{font-weight:700}.realtime-vehicle-model{line-height:1.4}.realtime-accessories{margin-top:5px!important;padding-top:5px;border-top:1px dashed #dce5e7;color:#536b75!important;line-height:1.45}.realtime-accessories b{display:inline-block;margin-right:5px;color:#b45f20;font-size:10px}
.realtime-time{line-height:1.55}.realtime-time b{font-size:12px}.realtime-time small{display:block;color:#71828e;font-size:11px}
.realtime-money{font-weight:800;color:#215f59}.realtime-money small{display:block;color:#89969e;font-size:10px;font-weight:400}
.realtime-remarks{white-space:normal;line-height:1.5;color:#263f4b;font-size:14px;font-weight:750}
.realtime-badge{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;background:#edf3ff;color:#3e65a5;font-size:11px;font-weight:800}
.realtime-badge.s2{background:#fff1df;color:#a85e16}.realtime-badge.s3{background:#eaf7f3;color:#247467}.realtime-badge.s4{background:#fff0ee;color:#a3433b}.realtime-badge.s-other{background:#f1f2f4;color:#66747d}
.realtime-badge.overdue{border:1px solid #efb3ad;background:#ffe9e6;color:#b5362d}
.realtime-empty{padding:54px 20px;text-align:center;color:#748590}.realtime-empty b{display:block;margin-bottom:6px;color:#334b59;font-size:16px}
.realtime-mobile-list{display:none}
.realtime-mobile-date{display:flex;align-items:center;justify-content:space-between;margin:14px 2px 7px;padding:8px 10px;border-left:4px solid #46958a;border-radius:7px;background:#e8f4f2;color:#245e57}.realtime-mobile-date:first-child{margin-top:2px}.realtime-mobile-date b{font-size:14px}.realtime-mobile-date span{color:#66827e;font-size:10px}
.realtime-mobile-card{padding:12px;border:1px solid #e0e7ea;border-radius:12px;background:#fff;cursor:pointer}.realtime-mobile-card:active{background:#f1f8f7}.realtime-mobile-card+.realtime-mobile-card{margin-top:8px}
.realtime-mobile-card.overdue{border-color:#e8aaa4;border-left:4px solid #cf5146;background:#fff8f7}
.realtime-mobile-top,.realtime-mobile-line{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.realtime-mobile-top strong{font-size:15px}.realtime-mobile-sub{margin:4px 0 6px;color:#778792;font-size:11px}.realtime-mobile-vehicle{margin:5px 0 9px;color:#506774;font-size:12px}.realtime-mobile-vehicle small{display:block;margin-top:5px;padding-top:5px;border-top:1px dashed #e0e7e9}.realtime-mobile-vehicle small b{margin-right:6px;color:#b45f20}.realtime-mobile-line{padding-top:8px;border-top:1px dashed #e2e8eb;line-height:1.5}.realtime-mobile-line small{color:#748590}.realtime-mobile-amount{text-align:right;color:#215f59}.realtime-mobile-amount b{display:block;font-size:16px}.realtime-mobile-amount em{display:block;margin-top:3px;color:#167c70;font-size:10px;font-style:normal}
.realtime-mobile-remarks{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;margin-top:9px;padding:9px 10px;border-radius:8px;background:#eef4f4;color:#263f4b;font-size:14px;font-weight:700;line-height:1.5}.realtime-mobile-remarks b{color:#1e6159;white-space:nowrap}.realtime-mobile-remarks span{overflow-wrap:anywhere}
.realtime-detail-modal{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:24px;background:#0f1c2780;backdrop-filter:blur(2px)}.realtime-detail-modal[hidden]{display:none!important}
.realtime-detail-dialog{width:min(760px,100%);max-height:min(86vh,820px);overflow:auto;border-radius:18px;background:#fff;box-shadow:0 24px 70px #0710194d}.realtime-detail-head{position:sticky;top:0;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:20px 22px 15px;border-bottom:1px solid #e3eaed;background:#fff}.realtime-detail-head h3{margin:0;color:#172536;font-size:22px}.realtime-detail-head p{margin:5px 0 0;color:#788892;font-size:12px}.realtime-detail-close{min-width:36px;height:36px;padding:0;border:1px solid #d7e0e4;border-radius:10px;background:#fff;color:#60717c;font-size:24px;line-height:1}.realtime-detail-body{padding:18px 22px}.realtime-detail-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.realtime-detail-field{min-width:0;padding:12px;border:1px solid #e2e9ec;border-radius:11px;background:#f8fafb}.realtime-detail-field small{display:block;margin-bottom:5px;color:#748590;font-size:11px}.realtime-detail-field b{display:block;overflow-wrap:anywhere;color:#1d3441;font-size:14px}.realtime-detail-products{margin-top:18px}.realtime-detail-products h4{margin:0 0 9px;color:#233b48}.realtime-detail-product{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:11px;padding:11px 0;border-top:1px solid #e5ebee}.realtime-detail-product>span{display:grid;width:26px;height:26px;place-items:center;border-radius:50%;background:#eaf5f3;color:#27776d;font-size:11px;font-weight:800}.realtime-detail-product b,.realtime-detail-product small{display:block}.realtime-detail-product small{margin-top:2px;color:#7a8992;font-size:11px}.realtime-detail-product>div:last-child{text-align:right;color:#215f59}.realtime-detail-foot{position:sticky;bottom:0;padding:12px 22px 18px;background:#fff;text-align:right}.realtime-detail-foot .realtime-detail-close{min-width:110px;font-size:14px}
.realtime-detail-record{margin-top:12px;padding:14px;border:1px solid #dce6e9;border-radius:13px;background:#fff}.realtime-detail-record-title{display:flex;align-items:center;gap:10px;margin-bottom:12px}.realtime-detail-record-title>span{display:grid;width:28px;height:28px;flex:0 0 auto;place-items:center;border-radius:50%;background:#eaf5f3;color:#27776d;font-size:11px;font-weight:800}.realtime-detail-record-title b,.realtime-detail-record-title small{display:block}.realtime-detail-record-title small{margin-top:2px;color:#7a8992;font-size:11px}.realtime-detail-record-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.realtime-detail-record-grid .realtime-detail-field{background:#f9fbfb}
.realtime-detail-wide{grid-column:1/-1}.realtime-detail-wide b{white-space:pre-wrap;line-height:1.55}
.realtime-detail-products{margin-top:0}
@media(max-width:900px){.realtime-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.realtime-tools{grid-template-columns:1fr 1fr}.realtime-tools label:first-child{grid-column:1/-1}}
@media(max-width:768px){
  .mobile-dock{display:grid!important;grid-template-columns:none!important;grid-auto-flow:column;grid-auto-columns:minmax(56px,1fr);overflow-x:auto;overflow-y:hidden;scrollbar-width:none}.mobile-dock::-webkit-scrollbar{display:none}
  #realtime-orders>.card{margin:4px -8px 76px;padding:7px 8px;border:0;border-radius:0;background:#f4f7f8}
  #realtime-orders .section-head{display:block;margin:0}#realtime-orders .section-head>div:first-child{display:none}
  .realtime-head-actions{display:grid;width:100%;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px}.realtime-sync-chip{overflow:hidden;padding:4px 7px;font-size:10px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.realtime-sync-chip::before{width:6px;height:6px}.realtime-head-actions button{min-height:30px;padding:4px 10px;font-size:11px}
  .realtime-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-top:5px}.realtime-kpi{min-height:60px;padding:6px 7px;border-radius:8px}.realtime-kpi small{overflow:hidden;font-size:9px;line-height:1.15;white-space:nowrap}.realtime-kpi b{margin-top:2px;font-size:18px;line-height:1}.realtime-kpi em{margin-top:4px;font-size:8px;line-height:1.15}
  .realtime-tools{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:4px;margin-top:6px;padding:6px;border-radius:8px}.realtime-tools label{gap:2px;font-size:9px}.realtime-tools label:first-child{grid-column:1/-1}.realtime-tools input,.realtime-tools select{height:31px;padding:4px 7px;border-radius:6px;font-size:11px}.realtime-tools button{grid-column:auto;min-height:31px;padding:4px 8px;font-size:10px;white-space:nowrap}
  .realtime-note{display:none}.realtime-table-wrap{display:none}.realtime-mobile-list{display:block;margin-top:6px}
  .realtime-mobile-date{display:grid;grid-template-columns:auto auto 1fr;justify-content:start;gap:6px;margin:8px 0 4px;padding:5px 8px;border-left-width:3px;border-radius:5px}.realtime-mobile-date:first-child{margin-top:0}.realtime-mobile-date b{font-size:12px}.realtime-mobile-date strong{padding:2px 6px;border-radius:999px;background:#297b70;color:#fff;font-size:9px;line-height:1.1}.realtime-mobile-date span{justify-self:end;color:#66827e;font-size:9px}
  .realtime-mobile-date.day-tone-a{border-left-color:#46958a;background:#e8f4f2}.realtime-mobile-date.day-tone-b{border-left-color:#c97870;background:#faecea;color:#874b46}.realtime-mobile-date.day-tone-b strong{background:#b8655e}.realtime-mobile-date.day-tone-b span{color:#92706d}
  .realtime-mobile-card.compact{padding:7px 8px;border-radius:8px}.realtime-mobile-card.compact+.realtime-mobile-card.compact{margin-top:4px}
  .realtime-mobile-card.compact.day-tone-a{border-color:#cfe3de;background:#f3faf8}.realtime-mobile-card.compact.day-tone-b{border-color:#ecd1cd;background:#fff5f3}
  .realtime-mobile-card.compact.overdue{border-left-width:3px}
  .realtime-mobile-card.compact.overdue{border-color:#e8aaa4;background:#fff8f7}
  .realtime-mobile-compact-head{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px}.realtime-mobile-compact-head>strong{display:flex;align-items:baseline;gap:8px;min-width:0;overflow:hidden;white-space:nowrap;color:#172b3a;font-size:14px;line-height:1.15}.realtime-mobile-compact-head>strong>span{overflow:hidden;flex:0 1 auto;text-overflow:ellipsis}.realtime-mobile-compact-head>strong .realtime-mobile-compact-model{font:inherit;font-weight:inherit;color:inherit}.realtime-mobile-compact-head .realtime-badge{padding:3px 6px;font-size:9px;line-height:1}.realtime-mobile-compact-amount{color:#205f58;font-size:14px;line-height:1.15;white-space:nowrap}
  .realtime-mobile-compact-info{display:flex;align-items:center;gap:7px;margin-top:4px;min-width:0;color:#607681;font-size:10px;line-height:1.25}.realtime-mobile-compact-info>b{flex:0 0 auto;color:#263f4b;font-size:11px}.realtime-mobile-compact-info .realtime-mobile-compact-store{overflow:hidden;flex:0 1 auto;color:#315e5a;font-size:12px;font-weight:800;text-overflow:ellipsis;white-space:nowrap}.realtime-mobile-compact-info .realtime-mobile-compact-count{overflow:hidden;flex:1;color:#687c86;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.realtime-mobile-compact-info>small{flex:0 0 auto;color:#7c8d96;font-size:9px}
  .realtime-mobile-compact-accessories{display:flex;gap:5px;margin-top:4px;padding-top:4px;border-top:1px dashed #e1e7e9;color:#627680;font-size:10px;line-height:1.2}.realtime-mobile-compact-accessories>b{flex:0 0 auto;color:#b45f20}.realtime-mobile-compact-accessories>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .realtime-mobile-compact-time{margin-top:4px;color:#667c87;font-size:10px;line-height:1.2;white-space:nowrap}
  .realtime-mobile-reservation-time{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:baseline;gap:2px 8px;white-space:normal}.realtime-mobile-reservation-time>span{color:#315865;font-size:11px}.realtime-mobile-reservation-time>span b{color:#153746;font-size:14px;font-weight:850}.realtime-mobile-reservation-time>strong{justify-self:end;color:#b25b1f;font-size:11px;white-space:nowrap}.realtime-mobile-reservation-time>small{grid-column:1/-1;color:#788b94;font-size:9px}
  .realtime-mobile-remarks.compact{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:5px;margin-top:5px;padding:4px 0;border-radius:0;background:transparent;font-size:11px;line-height:1.2}.realtime-mobile-remarks.compact b{font-size:10px}.realtime-mobile-remarks.compact span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.realtime-mobile-remarks.compact em,.realtime-mobile-detail-only{color:#167c70;font-size:9px;font-style:normal;white-space:nowrap}.realtime-mobile-detail-only{margin-top:3px;text-align:right}
  .realtime-detail-modal{align-items:end;padding:0}.realtime-detail-dialog{width:100%;max-height:91vh;border-radius:18px 18px 0 0}.realtime-detail-head{padding:17px 16px 13px}.realtime-detail-head h3{font-size:19px}.realtime-detail-body{padding:14px 16px}.realtime-detail-summary{grid-template-columns:1fr 1fr;gap:8px}.realtime-detail-field{padding:10px}.realtime-detail-time{grid-column:1/-1}.realtime-detail-foot{padding:10px 16px 14px}.realtime-detail-foot .realtime-detail-close{width:100%}
  .realtime-detail-record{padding:11px}.realtime-detail-record-grid{grid-template-columns:1fr 1fr}
  .mobile-dock [data-mobile-tab="realtime-orders"]::before{content:'◷'}
}

/* Quick filters: the chosen card is red; all labels stay large and readable. */
.realtime-kpi small{color:#405463;font-size:14px;font-weight:700}
.realtime-kpi b{color:#172b3a;font-size:30px;font-weight:850}
.realtime-kpi em{color:#536873;font-size:12px;font-weight:650}
.realtime-kpi.using.has-overdue:not(.active){border-color:#cddbf5;background:#f1f5fd;color:#365f9e}
.realtime-kpi.using.has-overdue:not(.active) em{color:#b33e35;font-weight:800}
.realtime-kpi.active,
.realtime-kpi.primary.active,
.realtime-kpi.using.active,
.realtime-kpi.using.has-overdue.active{
  border-color:#c84f46!important;
  background:#fff0ed!important;
  color:#7d2822!important;
  box-shadow:0 0 0 3px #c84f4630!important;
}
.realtime-kpi.active small,.realtime-kpi.active b,.realtime-kpi.active em{color:#7d2822!important}
@media(max-width:768px){
  .realtime-kpi small{font-size:11px;line-height:1.15}
  .realtime-kpi b{font-size:22px;line-height:1.05}
  .realtime-kpi em{font-size:9px;line-height:1.15}
}
/* Return countdown is displayed on desktop and mobile; finished rows never tick. */
#realtime-orders .realtime-return-countdown{display:block;color:#a45b20;font-weight:650;margin-top:5px;font-size:13px}
#realtime-orders .overdue .realtime-return-countdown{color:#b42328}
#realtime-orders .realtime-return-done{display:block;color:#39795f;font-weight:650;margin-top:5px;font-size:13px}
