*{box-sizing:border-box}body{margin:0;background:#f4f7f4;color:#162d26;font:16px/1.55 "Microsoft JhengHei","Noto Sans TC",sans-serif}header{background:#123e34;color:white}.shell{width:min(1160px,calc(100% - 36px));margin:auto}.mast{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;align-items:center;gap:12px;color:white;text-decoration:none;font-weight:800;font-size:20px;line-height:1.2}.brand small{display:block;font-size:12px;font-weight:500;color:#c7e3d9;margin-top:4px}.mark{background:#d7f2e4;color:#123e34;border-radius:11px;display:grid;place-items:center;width:40px;height:40px}.demo,.pill{display:inline-block;border-radius:30px;padding:4px 12px;font-weight:700;font-size:13px;white-space:nowrap}.demo{background:#d7f2e4;color:#143f34}.pill{background:#e7f2ec;color:#205844}.pill[data-tone="pending"]{background:#fbecd2;color:#76450a}.pill[data-tone="active"]{background:#e4eefb;color:#204d7c}.pill[data-tone="canceled"]{background:#f1e8e7;color:#793735}.pill[data-tone="new"]{background:#123e34;color:#fff}main{padding:28px 0 56px}.bar,.row,.tabs,.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.bar{justify-content:space-between;margin-bottom:16px}.tabs{margin:10px 0 20px}.actions{margin-top:12px}.hero{padding:clamp(24px,6vw,64px);background:#e0eee5;border-radius:24px;margin:15px 0 24px}.hero h1{font-size:clamp(34px,6vw,64px);letter-spacing:-.05em;line-height:1.13;margin:0 0 14px}.hero p{color:#35584a;margin:0}.grid,.fields{display:grid;gap:14px;grid-template-columns:repeat(2,minmax(0,1fr))}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px}.metric,.panel,.trip,.entry{background:white;border:1px solid #d9e5dd;border-radius:15px;padding:18px}.metric strong{font-size:28px;display:block}.entry{display:block;color:inherit;text-decoration:none}.entry:hover{background:#eaf6ed}.entry strong{display:block;font-size:21px;margin-bottom:5px}.panel{margin:12px 0}.trip{margin-top:10px;background:#f8faf8}.form-wrap{max-width:760px}h1,h2,h3,p{overflow-wrap:anywhere}h1{margin:0;font-size:clamp(25px,4vw,36px)}h2{margin:0 0 10px;font-size:21px}h3{margin:0 0 6px;font-size:17px}p{margin:5px 0}.muted,small{color:#4c655c}.full{grid-column:1/-1}label{display:grid;gap:5px;font-weight:650;min-width:0}input,select,textarea,button,.button{font:inherit}input:not([type=checkbox]),select,textarea{width:100%;min-width:0;min-height:44px;padding:8px 10px;border:1px solid #849d92;border-radius:8px;background:white;color:#162d26}textarea{min-height:80px;resize:vertical}.check{display:flex;align-items:center;min-height:44px;gap:10px}.check input{width:19px;height:19px;accent-color:#195640}button,.button{cursor:pointer;border:1px solid #849d92;background:white;color:#143c30;border-radius:9px;min-height:44px;padding:8px 13px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;text-align:center;font-weight:700}.primary,.selected{background:#195640;color:white;border-color:#195640}.danger{color:#87392f}.button:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #2a7966;outline-offset:2px}button:disabled{opacity:.55;cursor:wait}.notice{padding:10px 14px;margin-bottom:14px;border-radius:9px;background:#e6f4e9;color:#184735}.notice.error{background:#f9e7e3;color:#792b23}.notice:empty{display:none}.filters{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:12px}.order summary{cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;min-height:44px}.order summary::after{content:"查看詳情";font-size:13px;color:#205844}.order[open] summary::after{content:"收合詳情"}.order .meta{margin-top:12px}.assign{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr));gap:10px;align-items:end;margin-top:11px}.empty{padding:25px;text-align:center;color:#4c655c}.record dl{display:grid;grid-template-columns:minmax(85px,150px) minmax(0,1fr);gap:5px 12px;margin:0}.record dt{color:#4c655c}.record dd{margin:0;overflow-wrap:anywhere}[hidden]{display:none!important}a{color:#195640}ol{padding-left:24px}li{margin:8px 0}@media(max-width:690px){.grid,.fields{grid-template-columns:1fr}.metrics,.filters{grid-template-columns:repeat(2,minmax(0,1fr))}.panel,.trip{padding:13px}.mast{min-height:68px}}@media(max-width:365px){.shell{width:calc(100% - 24px)}.filters{grid-template-columns:1fr}.demo{padding:3px 7px}}
.driver-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.driver-card,.driver-empty{margin:0;min-width:0}.driver-card summary{cursor:pointer;min-height:60px}.driver-card ul{padding-left:20px}.driver-card li{padding:8px 0;border-top:1px solid #d9e5dd;overflow-wrap:anywhere}.driver-empty{color:#74877e;border-style:dashed;display:grid;place-items:center;min-height:90px}@media(max-width:690px){.driver-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:360px){.driver-grid{grid-template-columns:1fr}}

.filter-panel summary{cursor:pointer;font-weight:700;min-height:36px}.filter-panel .filters{margin:12px 0 0}
.board-heading{display:flex;justify-content:space-between;align-items:end;gap:16px;margin:20px 0}
.board-heading h2,.schedule-panel h2,.waiting-panel h2{margin:0}
.board-heading label{width:175px;flex:none}
.dispatch-layout{display:grid;grid-template-columns:1fr;gap:16px;align-items:start}
.waiting-panel,.schedule-panel{background:#fff;border:1px solid #d9e5dd;border-radius:16px;padding:18px;min-width:0}
.waiting-panel h2 span{background:#f9ebd0;color:#76450a;border-radius:20px;padding:2px 10px;font-size:15px}
.waiting-card{padding:14px 0;border-top:1px solid #e0eae3}
.waiting-card[data-conflict="1"]{background:#fdf3f1;border-left:4px solid #c2452f;padding-left:10px;border-radius:0 8px 8px 0}
.pill[data-tone="conflict"]{background:#f7dfda;color:#8a2f24}
.waiting-head{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap}
.waiting-head strong{margin-right:auto}
.return-form{border:2px solid #195640;background:#f3fbf6;border-radius:12px;margin:10px 0;padding:14px}
.return-form h3{color:#124437}
.guide-panel{border:2px solid #195640;background:#f7fcf9}
.guide-panel h2{margin-bottom:6px}
.guide-panel ol{margin:8px 0 0}
.waiting-card p{overflow-wrap:anywhere}
.waiting-card summary{list-style:none;cursor:pointer;width:100%;margin-top:8px}
.board-assign{display:grid;gap:9px;margin-top:12px}
.board-assign button{width:100%}
.duration summary{border:0;padding:5px 0;margin:0;min-height:auto;color:#315e4c}
.duration input{max-width:140px}
.timeline-scroller{overflow-x:auto;margin-top:16px}
.timeline{min-width:1160px}
.timeline-header,.timeline-row{display:grid;grid-template-columns:105px minmax(0,1fr);align-items:stretch}
.timeline-name{position:sticky;left:0;z-index:2;padding:11px 8px;background:#fff;border-bottom:1px solid #e2ebe5;font-weight:700}
.timeline-header .timeline-name{background:#eff5f1}
.timeline-hours{display:grid;grid-template-columns:repeat(24,minmax(0,1fr));font-size:10px;background:#eff5f1;color:#476459}
.timeline-hours span{padding:8px 1px;white-space:nowrap}
.timeline-track{position:relative;min-height:48px;border-bottom:1px solid #e2ebe5;background:repeating-linear-gradient(to right,transparent 0,transparent calc(4.166666% - 1px),#e5eee8 calc(4.166666% - 1px),#e5eee8 4.166666%)}
.timeline-trip{position:absolute;top:7px;height:34px;min-height:0;min-width:0;border-radius:6px;background:#cee8dc;color:#174b38;border:1px solid #84b69d;overflow:hidden;white-space:nowrap;font-size:12px;font-weight:700;padding:6px 3px;text-align:left}
.timeline-trip[data-tone="active"]{background:#dceafb;color:#214e7b;border-color:#99b6d8}
.empty-row .timeline-name{color:#83958a;font-weight:400}
.mobile-trips{display:none}
@media(max-width:760px){
  .board-heading{align-items:stretch;flex-direction:column}
  .board-heading label{width:100%}
  .dispatch-layout{grid-template-columns:1fr}
  .waiting-panel,.schedule-panel{padding:14px}
  .timeline-scroller{overflow:visible}
  .timeline{min-width:0}
  .timeline-header,.timeline-track{display:none}
  .timeline-row{grid-template-columns:100px minmax(0,1fr);border-bottom:1px solid #e2ebe5;align-items:center}
  .timeline-name{position:static;border:0}
  .mobile-trips{display:grid;gap:4px;padding:9px 0;font-size:14px}
.mobile-trip{overflow-wrap:anywhere;text-align:left;justify-content:flex-start}
}
.selected-trip{margin-top:20px;padding:16px;border:1px solid #c7dbcf;border-radius:12px;background:#f6faf7}
.more-nav{position:relative}
.more-nav summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;padding:8px 14px;border:1px solid #849d92;border-radius:9px;background:white;color:#143c30;font-weight:700}
.more-menu{position:absolute;z-index:5;top:calc(100% + 6px);left:0;min-width:160px;padding:6px;background:white;border:1px solid #d9e5dd;border-radius:10px;box-shadow:0 8px 22px #122c2326;display:grid;gap:4px}
.more-menu button{border:0;justify-content:flex-start}
.audit-list{padding-left:20px}
.audit-list li{margin:8px 0;overflow-wrap:anywhere}

/* ==== 視覺強化（粉紅主題） ==== */
:root{--brand:#8a2348;--brand-2:#b3305f;--line:#f2d9e2;--muted:#7d5a66;--shadow:0 12px 28px -20px #8a234880}
body{background:radial-gradient(1200px 620px at 50% -12%,#ffe9f1 0%,#fdf1f5 46%,#fbe8ef 100%);color:#2a1a21;background-attachment:fixed}
header{background:linear-gradient(180deg,#8a2348,#6d1a38)}
.mark{background:#ffd9e6;color:#8a2348}
.demo{background:#ffd9e6;color:#7d1f42;border:1px solid #f3b6cb}
.mast{min-height:86px}
.brand{font-size:21px}
main{padding:32px 0 72px}
.panel,.trip,.metric,.entry{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
.panel{padding:20px}
h2{font-size:20px}
.muted,small{color:var(--muted)}
.tabs{gap:8px;margin:14px 0 22px}
.tabs button{border-radius:999px;border:1px solid #f0c9d8;background:#fff;padding:9px 16px;font-size:15px}
.tabs button.selected{background:var(--brand-2);border-color:var(--brand-2);color:#fff}
.primary{background:linear-gradient(180deg,var(--brand-2),var(--brand));border-color:var(--brand)}
button,.button{transition:box-shadow .15s ease}
button:hover,.button:hover{box-shadow:0 8px 18px -12px #8a234880}
.metric strong{font-size:32px;color:var(--brand-2)}
.dispatch-layout{gap:18px}
.timeline{min-width:1200px}
.timeline-row{min-height:64px}
.timeline-track{min-height:64px;background:repeating-linear-gradient(to right,transparent 0,transparent calc(4.166666% - 1px),#f6e4ec calc(4.166666% - 1px),#f6e4ec 4.166666%)}
.timeline-name{background:#fffafc;font-size:14px}
.timeline-header .timeline-name,.timeline-hours{background:#fdeff5;color:#7d5a66}
.timeline-trip{top:12px;height:40px;border-radius:10px;background:#ffe0ea;border-color:#eda8bf;color:#7d1f42;box-shadow:0 6px 14px -10px #8a234866;font-size:12.5px;padding:10px 8px}
.timeline-trip[data-tone="active"]{background:#efe0ff;color:#5b2d86;border-color:#c3a7e6}
.waiting-card{padding:16px 0}
.waiting-head strong{font-size:16px}
.guide-panel,.return-form,.selected-trip{box-shadow:var(--shadow)}
.guide-panel{border-color:var(--brand-2);background:#fff9fb}
.return-form{border-color:var(--brand-2);background:#fff9fb}
.notice{background:#ffeef4;color:#7d1f42}
.notice.error{background:#fde8e6;color:#8a2348}
.pill{background:#ffeef4;color:#7d1f42}
.pill[data-tone="pending"]{background:#ffe0ea;color:#8a2348}
.pill[data-tone="conflict"]{background:#c2452f;color:#fff}
.pill[data-tone="active"]{background:#efe0ff;color:#5b2d86}
.selected-trip{background:#fff7fa;border-color:#f0c9d8}
.metric{background:#fff}
@media(max-width:760px){
  .panel{padding:16px}
  .tabs button{font-size:14px;padding:8px 13px}
  .metric strong{font-size:26px}
  body{font-size:17.5px;line-height:1.65}
  h1{font-size:26px}
  h2{font-size:20px}
  h3{font-size:17px}
  .muted,small{font-size:15px}
  label{font-size:16.5px}
  input:not([type=checkbox]),select,textarea{min-height:50px;font-size:17px}
  .check{font-size:17px}
  .check input{width:22px;height:22px}
  button,.button{min-height:48px;font-size:16.5px}
  .tabs button{font-size:15.5px;padding:10px 15px}
  .pill{font-size:14px;padding:5px 12px}
  .waiting-card p.muted{font-size:16px}
  .waiting-head strong{font-size:17.5px}
  .timeline-name{font-size:15px}
  .mobile-trips{font-size:15.5px}
  .mobile-trip{min-height:44px;padding:8px 10px}
  .order summary strong{font-size:17px}
  .order summary small{font-size:14.5px}
  .board-heading label{font-size:15.5px}
}

/* ==== 機構端：大字版（方便長輩閱讀） ==== */
body[data-view="member"]{font-size:19px}
body[data-view="member"] h1{font-size:31px}
body[data-view="member"] h2{font-size:23px}
body[data-view="member"] h3{font-size:20px}
body[data-view="member"] p{line-height:1.7}
body[data-view="member"] .muted,body[data-view="member"] small{font-size:16.5px}
body[data-view="member"] label{font-size:18px}
body[data-view="member"] input:not([type=checkbox]),body[data-view="member"] select,body[data-view="member"] textarea{min-height:54px;font-size:19px}
body[data-view="member"] button,body[data-view="member"] .button{min-height:54px;font-size:19px;padding:12px 18px}
body[data-view="member"] .tabs button{font-size:17.5px;padding:11px 18px}
body[data-view="member"] .pill{font-size:15.5px;padding:5px 13px}
body[data-view="member"] .order summary strong{font-size:20px}
body[data-view="member"] .order summary small{font-size:16px}
body[data-view="member"] .waiting-card p.muted{font-size:17px}
body[data-view="member"] .check{font-size:19px}
body[data-view="member"] .check input{width:24px;height:24px}
@media(max-width:760px){
  body[data-view="member"]{font-size:20px}
  body[data-view="member"] h1{font-size:28px}
  body[data-view="member"] h2{font-size:22px}
  body[data-view="member"] .muted,body[data-view="member"] small{font-size:17px}
  body[data-view="member"] label{font-size:19px}
  body[data-view="member"] input:not([type=checkbox]),body[data-view="member"] select,body[data-view="member"] textarea{min-height:56px;font-size:20px}
  body[data-view="member"] button,body[data-view="member"] .button{min-height:56px;font-size:19.5px}
  body[data-view="member"] .tabs button{font-size:18px}
}
/* ==== 公司後台／司機端：綠色（派單要清楚） ==== */
body[data-view="office"],body[data-view="driver"]{
  --brand:#123e34;--brand-2:#1d5c49;--line:#e2ece6;--muted:#5f776c;--shadow:0 12px 28px -20px #12352b80;
  background:radial-gradient(1200px 620px at 50% -12%,#e9f4ee 0%,#f2f7f4 46%,#edf4ef 100%);color:#12211c
}
body[data-view="office"] header,body[data-view="driver"] header{background:linear-gradient(180deg,#123e34,#0d3128)}
body[data-view="office"] .mark,body[data-view="driver"] .mark{background:#d7f2e4;color:#123e34}
body[data-view="office"] .demo,body[data-view="driver"] .demo{background:#d9f2e6;color:#0f4034;border-color:#b9e3cf}
body[data-view="office"] .tabs button,body[data-view="driver"] .tabs button{border-color:#cfe0d7}
body[data-view="office"] .tabs button.selected,body[data-view="driver"] .tabs button.selected{background:var(--brand);border-color:var(--brand)}
body[data-view="office"] .timeline-track,body[data-view="driver"] .timeline-track{background:repeating-linear-gradient(to right,transparent 0,transparent calc(4.166666% - 1px),#e8f0ea calc(4.166666% - 1px),#e8f0ea 4.166666%)}
body[data-view="office"] .timeline-name,body[data-view="driver"] .timeline-name{background:#fbfdfc}
body[data-view="office"] .timeline-header .timeline-name,body[data-view="office"] .timeline-hours,body[data-view="driver"] .timeline-header .timeline-name,body[data-view="driver"] .timeline-hours{background:#f1f7f3;color:#3f5b4f}
body[data-view="office"] .timeline-trip,body[data-view="driver"] .timeline-trip{background:#cfeadd;border-color:#84b69d;color:#174b38;box-shadow:0 6px 14px -10px #0d3328aa}
body[data-view="office"] .timeline-trip[data-tone="active"],body[data-view="driver"] .timeline-trip[data-tone="active"]{background:#dceafb;color:#214e7b;border-color:#99b6d8}
body[data-view="office"] .notice,body[data-view="driver"] .notice{background:#e6f4e9;color:#184735}
body[data-view="office"] .pill,body[data-view="driver"] .pill{background:#e7f2ec;color:#205844}
body[data-view="office"] .pill[data-tone="pending"],body[data-view="driver"] .pill[data-tone="pending"]{background:#fbeacb;color:#76450a}
body[data-view="office"] .metric strong,body[data-view="driver"] .metric strong{color:#123e34}
body[data-view="office"] .guide-panel,body[data-view="office"] .return-form{background:#fff;border-color:#84b69d}

/* ==== 排車看板質感 ==== */
.board-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px 18px;margin-bottom:14px;box-shadow:var(--shadow)}
.board-heading h2{margin:0;font-size:19px}
.board-heading label{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;margin:0;white-space:nowrap;flex:0 0 auto}
.board-heading input[type=date]{min-height:40px;width:160px}
.timeline-row:nth-child(even) .timeline-track{background-image:linear-gradient(rgba(18,62,52,.022),rgba(18,62,52,.022)),repeating-linear-gradient(to right,transparent 0,transparent calc(4.166666% - 1px),#e8f0ea calc(4.166666% - 1px),#e8f0ea 4.166666%)}
.timeline-row:nth-child(even) .timeline-name{background:#f6faf7}
.waiting-card p{margin:3px 0;font-size:14px;line-height:1.5}
.waiting-card summary.button{min-height:40px;padding:7px 12px;font-size:14px;border-radius:10px}
.waiting-panel h2{font-size:18px}
.schedule-panel h2{font-size:18px}

/* ==== 版面收斂 ==== */
.bar{gap:12px}
.bar h1{font-size:clamp(22px,3vw,30px);letter-spacing:-.01em}
.bar .row{justify-content:flex-end}
.muted,small{line-height:1.5}
.tabs{margin:12px 0 18px}
.hours,.timeline-hours{font-size:11px}
.timeline-hours span{padding:9px 0;text-align:center}
.timeline-name{padding:10px 10px;font-size:13.5px;letter-spacing:.01em}
.timeline-header .timeline-name{font-size:12px;color:#47635a}
.waiting-panel h2,.schedule-panel h2{display:flex;align-items:center;gap:8px;margin-bottom:2px}
.waiting-panel>p.muted,.schedule-panel>p.muted{font-size:13.5px;margin:2px 0 10px}
.waiting-card:first-of-type{border-top:1px solid #e6efe9}
.waiting-card{padding:14px 0}
.waiting-head{gap:6px;margin-bottom:2px}
.waiting-head strong{font-size:15.5px}
.waiting-card p.muted{font-size:15px}
.waiting-card .button{width:100%}
.timeline-trip{font-size:13.5px}
.waiting-head strong{font-size:16.5px}
.metrics{margin-bottom:18px}
.metric{padding:16px}
.metric strong{line-height:1.1}



/* LINE 客戶服務首頁：四種服務分色，手機優先 */
body[data-view="member"] .service-landing,body[data-view="customer"] .service-landing{max-width:760px;margin:0 0 24px}
.service-hero{background:linear-gradient(125deg,#174f79,#286b9d);color:#fff;border-radius:20px;padding:26px 22px;margin-bottom:20px;box-shadow:0 14px 32px -22px #174f79}
.service-hero h2{font-size:clamp(24px,5vw,32px);color:#fff}
.service-hero p{color:#eef7ff}
.service-kicker{font-size:15px;font-weight:700}
.service-title{margin:12px 0}
.service-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.service-tile{border:1px solid transparent;border-radius:16px;padding:18px 12px;min-height:104px;display:flex;flex-direction:column;gap:8px;align-items:flex-start;text-align:left;justify-content:center}
.service-tile strong{font-size:18px}.service-tile span{font-size:14px;line-height:1.5}
.service-blue{background:#e7f2fd;border-color:#bfdbf7;color:#17538a}
.service-green{background:#e5f5ed;border-color:#bde2cf;color:#1d6546}
.service-amber{background:#fff1de;border-color:#f7dbab;color:#86530f}
.service-purple{background:#f1eafd;border-color:#d9c6f4;color:#65439b}
button.service-tile{cursor:pointer;width:100%}
/* 聯絡公司：獨立入口，不佔四張主卡，客戶不必登入或填表就能找到電話與官方 LINE。 */
.service-contact{display:flex;flex-direction:column;gap:4px;width:100%;margin:12px 0 0;padding:16px 18px;border:2px solid #84b69d;border-radius:16px;background:#eef7f1;color:#123e34;text-align:left;min-height:64px}
button.service-contact{cursor:pointer}
.service-contact:hover{background:#e2f2e8}
.service-contact strong{font-size:18px}
.service-contact span{font-size:14px;color:#315e4c;line-height:1.5}
.contact-actions{display:flex;flex-direction:column;gap:10px;margin:16px 0}
.contact-actions .button{display:flex;width:100%;align-items:center;justify-content:center;text-align:center}
body[data-view="customer"] .service-contact{min-height:88px;padding:20px}
body[data-view="customer"] .service-contact strong{font-size:clamp(24px,5.5vw,30px)}
body[data-view="customer"] .service-contact span{font-size:18px}
.service-disclaimer{font-size:13px;color:#63717b;margin:12px 0}
.service-callout{background:#f3f6fa;border:1px solid #dce4ef;border-radius:18px;padding:20px;margin:16px 0}
.service-callout p{font-size:16px}
.service-cta{display:flex;width:100%;margin-top:14px;min-height:56px!important;background:#e46f21!important;color:#fff!important;border-color:#c75b12!important;font-size:19px!important;border-radius:12px!important}
.service-cta:hover{background:#bf570f!important}
.quick-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0 0 12px}
.quick-actions button{min-height:50px}
.source-phone{background:#efe6fb;color:#603a91;border-radius:14px;padding:2px 8px;font-size:13px}
.source-line{background:#e2f3ea;color:#175b3c;border-radius:14px;padding:2px 8px;font-size:13px}
.customer-greeting{font-size:16px}
.role-switch{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0}
.role-switch select{max-width:280px}
.staff-preview{border:2px dashed #b8ced1;padding:16px;border-radius:14px;background:#f6f9fb}
.staff-preview-note{font-size:14px;color:#475a62}
@media(max-width:420px){.service-tiles{gap:9px}.service-tile{padding:14px 10px;min-height:106px}.service-tile strong{font-size:17px}.service-tile span{font-size:13px}.service-hero{padding:24px 16px}}

.service-brand-image{display:block;width:100%;height:auto;aspect-ratio:1200/390;object-fit:cover;border-radius:18px;margin:0 0 12px;border:1px solid #d3e6ed}

/* 電話叫車卡：只增加入口，沿用舊版深綠／淺綠配色與電話建單流程。 */
.phone-booking-card{display:flex;width:100%;align-items:center;gap:15px;margin:16px 0 12px;padding:17px 20px;border:1px solid #84b69d;border-radius:16px;background:#e0eee5;color:#123e34;text-align:left;box-shadow:0 4px 12px #123e3414;min-height:84px}
.phone-booking-card:hover{background:#d7f2e4;border-color:#2a7966}
.phone-booking-card:focus-visible{outline:3px solid #2a7966;outline-offset:2px}
.phone-booking-card-icon{display:grid;place-items:center;flex:0 0 50px;height:50px;background:#195640;color:#fff;border-radius:13px;font-size:29px;font-weight:700}
.phone-booking-card-copy{min-width:0;display:flex;flex:1;flex-direction:column;gap:4px}
.phone-booking-card-copy strong{font-size:19px;line-height:1.35}
.phone-booking-card-copy small{font-size:13px;color:#35584a;line-height:1.55}
.phone-booking-card-arrow{font-size:25px;color:#195640;margin-left:auto}
@media(max-width:690px){.phone-booking-card{gap:11px;padding:14px;min-height:76px}.phone-booking-card-icon{flex-basis:44px;height:44px;font-size:25px}.phone-booking-card-copy strong{font-size:17px}.phone-booking-card-copy small{font-size:12px}}

/* 最終驗收 Demo：沿用原版綠色，手機及長者優先。 */
body[data-view="customer"] .service-hero{background:linear-gradient(130deg,#123e34,#205844);color:#fff}
body[data-view="customer"] .service-hero h2{font-size:clamp(28px,6vw,37px)}
body[data-view="customer"] .service-hero p{font-size:18px;color:#e7f2ec}
body[data-view="customer"] .service-tile{min-height:158px;padding:26px 18px;gap:12px}
body[data-view="customer"] .service-tile strong{font-size:clamp(26px,6.6vw,33px);line-height:1.3}
body[data-view="customer"] .service-tile span{font-size:18px;line-height:1.6}
body[data-view="customer"] .service-title{font-size:24px}
body[data-view="customer"] .service-callout{background:#e0eee5;border-color:#84b69d}
body[data-view="customer"] .service-cta{background:#195640!important;border-color:#195640!important}
body[data-view="customer"] .service-cta:hover{background:#123e34!important}
body[data-view="customer"] .customer-order-detail>summary{min-height:64px;font-size:18px;gap:8px}
body[data-view="customer"] .customer-order-detail>summary span{font-size:15px;color:#195640;font-weight:700}
body[data-view="customer"] .customer-order-detail p{font-size:16px;line-height:1.7}
body[data-view="customer"] .customer-leg{padding:12px 14px;border:1px solid #d9e5dd;border-radius:12px;background:#f7fcf9;margin:10px 0}
body[data-view="customer"] .customer-leg strong{font-size:18px;color:#123e34}
body[data-view="customer"] .customer-events{padding:12px 14px;background:#f4f7f4;border-radius:12px;margin:12px 0}
body[data-view="customer"] .customer-events h4{margin:0 0 6px;font-size:17px}
body[data-view="customer"] .customer-events li{font-size:15px;line-height:1.65}
@media(max-width:420px){body[data-view="customer"] .service-tiles{gap:10px}body[data-view="customer"] .service-tile{padding:20px 12px;min-height:150px}body[data-view="customer"] .service-tile strong{font-size:26px}body[data-view="customer"] .service-tile span{font-size:17px}}


/* 看護車後台：出車前 60 分鐘尚未派車的醒目提示（原提醒容器沿用）。 */
.dispatch-reminder{margin:16px 0 20px;padding:18px 20px;border:4px solid #b42318;border-radius:14px;background:#fff1f0;color:#7a1912;box-shadow:0 3px 12px rgba(127,29,29,.12);font-size:17px;line-height:1.55}
.dispatch-reminder[hidden]{display:none}
.dispatch-reminder>strong{display:block;font-size:21px;line-height:1.4;margin-bottom:10px}
.dispatch-reminder ul{margin:8px 0 14px;padding-left:24px}
.dispatch-reminder li{margin:7px 0;overflow-wrap:anywhere}
.dispatch-reminder li strong{color:#9f1c13}
.dispatch-reminder .primary{min-height:44px;font-size:17px}
@media(max-width:690px){.dispatch-reminder{padding:14px;border-width:4px;font-size:16px}.dispatch-reminder>strong{font-size:19px}.dispatch-reminder li{margin:9px 0}}

/* 電話叫車：先查客戶再帶入 */
.phone-lookup{margin-bottom:22px;padding:18px 20px;border:2px solid #b9d9c6;border-radius:14px;background:#f6fbf8}
.phone-lookup h2{margin:0 0 6px;font-size:20px}
.phone-lookup .fields{grid-template-columns:minmax(200px,320px)}
.lookup-card{margin-top:12px}
.lookup-list{list-style:none;margin:10px 0 8px;padding:0;display:flex;flex-direction:column;gap:8px}
.lookup-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #d8e8de;border-radius:10px;background:#fff}
.lookup-main{min-width:0}
.lookup-main .muted{margin-top:4px}
.lookup-empty{margin:10px 0 0;padding:10px 12px;border-radius:10px;background:#fff7e6;border:1px solid #f0d9a8;color:#7a5b14}
@media(max-width:690px){.lookup-row{flex-direction:column;align-items:stretch}.lookup-row .button{min-height:44px}}
/* 電話叫車：浮動卡片 */
.phone-modal{width:min(760px,94vw);max-height:88vh;padding:0;border:0;border-radius:18px;box-shadow:0 24px 60px rgba(12,40,32,.35);overflow:hidden}
.phone-modal::backdrop{background:rgba(12,32,26,.55);backdrop-filter:blur(2px)}
.phone-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;background:linear-gradient(180deg,#124438,#0f3a30);color:#fff;position:sticky;top:0;z-index:2}
.phone-modal-head h2{margin:0;font-size:20px;color:#fff}
.modal-close{width:44px;height:44px;border-radius:12px;border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.12);color:#fff;font-size:20px;line-height:1;cursor:pointer}
.modal-close:hover{background:rgba(255,255,255,.22)}
.phone-booking-body{padding:18px 20px 22px;overflow:auto;max-height:calc(88vh - 76px)}
.phone-modal .phone-lookup{margin-bottom:16px}
@media(max-width:690px){.phone-modal{width:100vw;max-height:92vh;border-radius:16px}.phone-booking-body{max-height:calc(92vh - 72px)}}
.lookup-actions{display:flex;gap:8px;flex:0 0 auto;align-items:center}
.lookup-actions .button{white-space:nowrap;min-height:44px}
@media(max-width:690px){.lookup-row{flex-direction:column;align-items:stretch}.lookup-actions{width:100%}.lookup-actions .button{flex:1}}
/* 長者＋手機優先：客戶端字級、按鍵與間距整體放大 */
body[data-view="customer"]{--brand:#195640;--brand-2:#123e34;--line:#d5e8dd;--muted:#4b6b5d;font-size:20px;line-height:1.75}
body[data-view="customer"] .service-kicker{font-size:19px}
body[data-view="customer"] .service-hero p{font-size:19px}
body[data-view="customer"] .service-title{font-size:26px;margin:22px 0 14px}
body[data-view="customer"] .service-disclaimer{font-size:17px;line-height:1.8}
body[data-view="customer"] .service-callout h2{font-size:24px}
body[data-view="customer"] .service-callout p{font-size:19px}
body[data-view="customer"] .service-cta{min-height:66px;font-size:21px;border-radius:16px;font-weight:700}
body[data-view="customer"] button,body[data-view="customer"] .button{min-height:58px;font-size:19px;border-radius:14px}
body[data-view="customer"] input,body[data-view="customer"] select,body[data-view="customer"] textarea{font-size:19px;min-height:58px;padding:12px 14px;border-radius:12px}
body[data-view="customer"] label{font-size:17px;font-weight:600;line-height:1.6}
body[data-view="customer"] .fields{gap:16px}
body[data-view="customer"] .customer-order-detail>summary{min-height:72px;font-size:20px}
body[data-view="customer"] .customer-order-detail p{font-size:17px}
body[data-view="customer"] .customer-leg strong{font-size:20px}
body[data-view="customer"] .customer-leg p{font-size:17px}
body[data-view="customer"] .customer-events li{font-size:16px}
body[data-view="customer"] .notice{font-size:18px;padding:14px 16px}
@media(max-width:420px){
  body[data-view="customer"] .service-tiles{gap:12px}
  body[data-view="customer"] .service-tile{min-height:166px;padding:22px 12px}
  body[data-view="customer"] .service-tile strong{font-size:27px}
  body[data-view="customer"] .service-tile span{font-size:18px}
  body[data-view="customer"] .service-hero h2{font-size:29px}
  body[data-view="customer"] button,body[data-view="customer"] .button{min-height:60px;font-size:20px}
  body[data-view="customer"] input,body[data-view="customer"] select,body[data-view="customer"] textarea{font-size:20px;min-height:60px}
}
/* 再放大一階：以長輩實際看得清楚為準（手機單欄、字更大、按鍵更高） */
body[data-view="customer"]{font-size:22px;line-height:1.8}
body[data-view="customer"] .service-kicker{font-size:21px}
body[data-view="customer"] .service-hero h2{font-size:clamp(32px,8vw,44px);line-height:1.25}
body[data-view="customer"] .service-hero p{font-size:21px;line-height:1.7}
body[data-view="customer"] .service-title{font-size:29px;margin:24px 0 16px}
body[data-view="customer"] .service-tile{min-height:148px;padding:24px 20px;gap:12px}
body[data-view="customer"] .service-tile strong{font-size:clamp(30px,7.6vw,38px);line-height:1.28}
body[data-view="customer"] .service-tile span{font-size:20px;line-height:1.6}
body[data-view="customer"] .service-disclaimer{font-size:19px;line-height:1.85}
body[data-view="customer"] .service-callout h2{font-size:27px}
body[data-view="customer"] .service-callout p{font-size:21px}
body[data-view="customer"] .service-cta{min-height:74px;font-size:24px;border-radius:18px}
body[data-view="customer"] button,body[data-view="customer"] .button{min-height:64px;font-size:22px;border-radius:16px}
body[data-view="customer"] input,body[data-view="customer"] select,body[data-view="customer"] textarea{font-size:22px;min-height:66px;padding:14px 16px;border-radius:14px}
body[data-view="customer"] label{font-size:20px;font-weight:700}
body[data-view="customer"] .customer-order-detail>summary{min-height:84px;font-size:23px}
body[data-view="customer"] .customer-order-detail p{font-size:20px}
body[data-view="customer"] .customer-leg strong{font-size:23px}
body[data-view="customer"] .customer-leg p{font-size:20px}
body[data-view="customer"] .customer-events li{font-size:19px}
body[data-view="customer"] .notice{font-size:21px;padding:16px 18px}
/* 手機一律單欄，一張卡一列，最好按也最好讀 */
@media(max-width:640px){
  body[data-view="customer"] .service-tiles{grid-template-columns:1fr;gap:14px}
  body[data-view="customer"] .service-tile{min-height:132px;padding:22px 20px;align-items:flex-start}
  body[data-view="customer"] .service-tile strong{font-size:33px}
  body[data-view="customer"] .service-tile span{font-size:20px}
  body[data-view="customer"] .service-hero h2{font-size:34px}
  body[data-view="customer"] button,body[data-view="customer"] .button{min-height:66px;font-size:23px}
  body[data-view="customer"] input,body[data-view="customer"] select,body[data-view="customer"] textarea{font-size:23px;min-height:68px}
}
body[data-view="customer"] .panel h2,body[data-view="customer"] .form-wrap h2{font-size:29px;line-height:1.35}
body[data-view="customer"] .panel h3{font-size:24px}
body[data-view="customer"] .pill{font-size:18px;padding:6px 12px}
body[data-view="customer"] .muted{font-size:19px}
/* 手機第一畫面就要看到四張卡：隱藏大圖、壓縮標題區、縮小卡片間距 */
@media(max-width:680px){
  body[data-view="customer"] .service-brand-image{display:none}
  body[data-view="customer"] .service-landing{padding-top:4px}
  body[data-view="customer"] .service-hero{padding:14px 16px;border-radius:14px}
  body[data-view="customer"] .service-kicker{font-size:17px;margin:0 0 2px}
  body[data-view="customer"] .service-hero h2{font-size:27px;line-height:1.25;margin:2px 0 4px}
  body[data-view="customer"] .service-hero p{font-size:17px;line-height:1.5;margin:0}
  body[data-view="customer"] .service-title{font-size:22px;margin:12px 0 10px}
  body[data-view="customer"] .service-tiles{gap:12px}
  body[data-view="customer"] .service-tile{min-height:112px;padding:16px 18px;gap:6px}
  body[data-view="customer"] .service-tile strong{font-size:29px;line-height:1.25}
  body[data-view="customer"] .service-tile span{font-size:17px;line-height:1.45}
  body[data-view="customer"] .bar{padding:8px 0}
  body[data-view="customer"] .bar h1{font-size:20px}
}
/* 其他日期的待派車提示 */
.other-dates{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0;padding:12px 14px;border:1px solid #d9b45f;border-radius:12px;background:#fff8e6;font-size:16px;color:#6b5320}
.other-dates .button{min-height:42px}
/* 客戶首頁：上半公司介紹、下半四張卡（第四張分兩半：聯絡公司／公司人員） */
body[data-view="customer"] .service-intro{display:flex;flex-direction:column;justify-content:center;gap:6px;min-height:34vh;padding:6px 0}
body[data-view="customer"] .service-intro-note{font-size:14px;color:#6b7f76;margin:0}
.service-split{display:flex!important;flex-direction:row!important;align-items:stretch!important;padding:0!important;gap:0!important;overflow:hidden}
.service-half{flex:1 1 50%;display:flex;flex-direction:column;justify-content:center;gap:4px;border:0;background:transparent;padding:16px 14px;text-align:left;cursor:pointer;font:inherit;color:inherit;min-width:0}
.service-half+.service-half{border-left:1px dashed rgba(0,0,0,.16)}
.service-half strong{font-size:inherit}
.service-half span{font-size:inherit}
.service-half-staff{cursor:default}
.split-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.split-actions .button{min-height:42px!important;font-size:15px!important;padding:8px 12px!important;white-space:nowrap}
.split-note{font-size:13px;opacity:.72}
@media(max-width:680px){
  body[data-view="customer"] .service-intro{min-height:36vh}
  body[data-view="customer"] .service-hero{padding:16px 16px;border-radius:16px}
  body[data-view="customer"] .service-hero h2{font-size:26px;line-height:1.3;margin:2px 0 6px}
  body[data-view="customer"] .service-hero p{font-size:16px;line-height:1.6;margin:0}
  body[data-view="customer"] .service-kicker{font-size:16px}
  body[data-view="customer"] .service-title{font-size:20px;margin:10px 0 8px}
  body[data-view="customer"] .service-tiles{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
  body[data-view="customer"] .service-tile{min-height:118px;padding:12px 12px;gap:4px}
  body[data-view="customer"] .service-tile strong{font-size:23px;line-height:1.3}
  body[data-view="customer"] .service-tile span{font-size:14px;line-height:1.4}
  body[data-view="customer"] .service-split{padding:0!important;min-height:118px}
  body[data-view="customer"] .service-half{padding:10px 10px;gap:2px}
  body[data-view="customer"] .service-half strong{font-size:19px}
  body[data-view="customer"] .service-half span{font-size:12px}
  body[data-view="customer"] .split-actions .button{min-height:38px!important;font-size:13px!important;padding:6px 8px!important}
  body[data-view="customer"] .split-note{font-size:11px}
}
/* 第四張卡整列展開，左半聯絡公司、右半公司人員，字才不會擠 */
body[data-view="customer"] .service-split{grid-column:1 / -1}
@media(max-width:680px){
  body[data-view="customer"] .service-split{min-height:104px}
  body[data-view="customer"] .service-half{padding:10px 12px}
  body[data-view="customer"] .service-half strong{font-size:20px;line-height:1.3}
  body[data-view="customer"] .service-half span{font-size:13px;line-height:1.35}
  body[data-view="customer"] .split-actions{gap:6px;margin-top:4px;flex-wrap:nowrap}
  body[data-view="customer"] .split-actions .button{flex:1 1 auto;min-height:40px!important;font-size:14px!important;padding:6px 6px!important}
}
body[data-view="customer"] .service-wide{grid-column:1 / -1}
@media(max-width:680px){body[data-view="customer"] .service-wide{min-height:104px}}
/* 權限管理 */
.account-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.account-row .row{align-items:center;gap:10px;flex-wrap:wrap}
.account-row select{min-width:140px}
@media(max-width:690px){.account-list{grid-template-columns:1fr}}
/* 權限管理：功能勾選 */
.module-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px 12px;margin:8px 0 4px;font-size:15px}
.module-grid .check{margin:0}
/* 司機端派單通知 */
.driver-alerts{margin:14px 0;padding:16px 18px;border:4px solid #b42318;border-radius:14px;background:#fff1f0;color:#7a1912;font-size:18px;line-height:1.6}
.driver-alerts[hidden]{display:none}
.driver-alerts>strong{display:block;font-size:21px;margin-bottom:8px}
.driver-notify-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:10px 0 16px}
.driver-notify-bar .button{min-height:46px}
.driver-report{margin:18px 0}
.driver-reports{margin:14px 0}
.driver-reports h2 span{color:#b42318}
.driver-report-row{display:flex;gap:12px;justify-content:space-between;align-items:flex-start;padding:12px 0;border-top:1px solid #e3ede7}
.driver-report-row.is-read{opacity:.6}
.driver-report-row p{margin:4px 0}
/* 客戶端預約更新通知 */
.customer-alerts{margin:12px 0;padding:16px 18px;border:4px solid #1f7a4d;border-radius:14px;background:#eafaf1;color:#14532d;font-size:19px;line-height:1.65}
.customer-alerts[hidden]{display:none}
.customer-alerts>strong{display:block;font-size:22px;margin-bottom:8px}
.customer-alerts p{margin:4px 0}
/* 司機端摘要與已完成紀錄 */
.driver-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:14px 0}
.driver-summary .metric{background:#fff;border:1px solid #d9e5dd;border-radius:14px;padding:14px;text-align:center}
.driver-summary .metric strong{display:block;font-size:30px;color:#123e34}
.driver-summary .metric span{font-size:15px;color:#4b6b5d}
.driver-trip h2{font-size:21px}
.driver-done-list{list-style:none;padding:0;margin:8px 0 0}
.driver-done-list li{padding:8px 0;border-top:1px solid #e3ede7}
.customer-summary{margin:12px 0;border-color:#84b69d;background:#f4fbf7}
.customer-summary h2{font-size:21px;margin:0 0 8px}
@media(max-width:690px){.driver-summary{grid-template-columns:repeat(3,1fr);gap:8px}.driver-summary .metric strong{font-size:26px}}
/* 手機：司機清單佔滿寬度，不要留一大片空白 */
@media(max-width:760px){
  .timeline{width:100%!important;min-width:0}
  .timeline-header{display:none}
  .timeline-row{display:grid!important;grid-template-columns:96px 1fr;align-items:start;gap:8px}
  .timeline-name{font-size:15px;padding-top:10px}
  .timeline-track{display:none}
  .mobile-trips{grid-column:2}
  .schedule-panel .timeline-scroller{overflow:visible}
}

/* 緊急單與一般預約分流：只有即時單、預約前 60 分鐘未派車才標紅。 */
.office-alert-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:12px 0}
.office-alert-controls #officeSoundState{font-size:15px;color:#315747;font-weight:600}
.office-event-notice{margin:12px 0;padding:12px 16px;border:2px solid #cda652;border-radius:12px;background:#fff9ea;color:#624516;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.office-event-notice[hidden]{display:none}
.waiting-card.waiting-urgent{border:4px solid #b42318;background:#fff4f2;box-shadow:0 4px 16px rgba(180,35,24,.15)}
.waiting-warning{font-size:18px;color:#9f1c13;background:#ffe1dc;border-radius:9px;padding:8px 12px;margin:10px 0;font-weight:800}
@media(max-width:690px){.office-alert-controls{align-items:stretch;flex-direction:column}.waiting-warning{font-size:17px}}

.delivery-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:12px 0;border-top:1px solid #d9e5dd}.delivery-row small{flex:1 1 180px}

/* 派單人員 LINE 提醒綁定列：沒開後台時的未派車提醒靠這個綁定。 */
.staff-line-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #d7e3dc;
  border-radius: 12px;
  background: #f4faf7;
  font-size: 15px;
}
.staff-line-bar button { margin-left: auto; }
.staff-line-bar small { flex-basis: 100%; color: #55705f; }

/* 司機出勤：司機端回報列與後台出勤看板。 */
.driver-duty, .phone-order-card { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.driver-duty { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #d7e3dc; border-radius: 12px; background: #f7fbf8; }
.driver-duty #dutyState { font-weight: 700; color: #0f3d33; margin-right: 4px; }
.driver-duty small { flex-basis: 100%; }
.duty-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.duty-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #f6f8f7; }
.duty-row span { padding: 2px 10px; border-radius: 999px; font-size: 14px; background: #e3ebe6; color: #234; }
.duty-row small { margin-left: auto; color: #55705f; }
.duty-row.duty-busy span { background: #ffe6d5; color: #8a3b00; }
.duty-row.duty-assigned span { background: #fff4cf; color: #7a5a00; }
.duty-row.duty-break span { background: #eceff1; color: #55606a; }
.duty-row.duty-ready span { background: #d9f2e2; color: #0d5a34; }

/* 出勤看板：每列一位司機，下面列出今天各趟的時間與狀態。 */
.duty-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.duty-head small { margin-left: auto; color: #55705f; }
.duty-times { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; }
.duty-time { padding: 2px 8px; border-radius: 8px; font-size: 13px; background: #eef2f0; color: #33443b; }
.duty-time b { margin-right: 4px; }
.duty-time-done { background: #e6f3ea; color: #2b6b45; }
.duty-time-active { background: #ffe6d5; color: #8a3b00; }
.duty-time-assigned { background: #fff4cf; color: #7a5a00; }
.duty-time-pending { background: #eef1f5; color: #4b5a6a; }

/* 出勤看板：今天有班一律標「出勤中」。 */
.duty-row.duty-onduty span { background: #d9f2e2; color: #0d5a34; font-weight: 700; }

/* 第四張卡：公司人員登入 */
body[data-view="customer"] .service-staff{grid-column:1 / -1;display:flex;flex-direction:column;gap:8px;align-items:stretch;padding:18px 16px}
body[data-view="customer"] .service-staff strong{font-size:22px}
body[data-view="customer"] .service-staff>span{font-size:15px;color:#3f5f52}
body[data-view="customer"] .service-staff form{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end;margin-top:4px}
body[data-view="customer"] .service-staff label{display:flex;flex-direction:column;gap:4px;font-size:14px;font-weight:700;color:#3f5f52}
body[data-view="customer"] .service-staff input{min-height:48px;font-size:16px;padding:10px 12px;border-radius:10px;border:1px solid #c9d8d1;background:#fff}
body[data-view="customer"] .service-staff button{min-height:48px;font-size:16px;padding:0 18px;border-radius:10px}
body[data-view="customer"] .staff-hint{margin:2px 0 0;font-size:13px;color:#5b7568}
@media(max-width:560px){
  body[data-view="customer"] .service-staff form{grid-template-columns:1fr;gap:8px}
  body[data-view="customer"] .service-staff button{width:100%}
}
/* 讓「查看預約」與「公司人員」各自佔滿一列，四張卡排列整齊 */
body[data-view="customer"] .service-tile[data-service="history"],body[data-view="customer"] .service-tile[href="/?service=staff"]{grid-column:1 / -1}
/* 司機端分區標題：新派單放最上面 */
.driver-section{font-size:20px;margin:18px 0 8px;color:#123e34;border-left:4px solid #195640;padding-left:10px}
/* 後台：今日已派車置頂 */
.dispatched-today{margin:12px 0;border-color:#b9d9c6;background:#f6fbf8}
.dispatched-today h2 span{color:#195640}
.dispatched-list{display:flex;flex-direction:column;gap:6px}
.dispatched-item{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 0;border-top:1px solid #e3ede7;font-size:15px}
.dispatched-item strong{min-width:120px}
.dispatched-item .muted{flex:1;min-width:200px}
/* 全域浮動提醒：按下任何按鈕後，綠色大字滑下來，3 秒後消失 */
.notice{position:fixed!important;top:16px;left:50%;transform:translate(-50%,-180%);z-index:99999;max-width:92vw;padding:14px 22px;border-radius:14px;font-size:18px;font-weight:700;box-shadow:0 10px 30px rgba(0,0,0,.28);transition:transform .25s ease;background:#1f7a4d!important;color:#fff!important;pointer-events:none;white-space:normal;text-align:center;line-height:1.5}
.notice.error{background:#c0392b!important;color:#fff!important}
.notice.show{transform:translate(-50%,0)}
/* 頁首右側：展示版徽章 + 公司後台登入固定按鈕（僅電腦版顯示，手機隱藏） */
.mast-right{display:flex;align-items:center;gap:10px}
.staff-quick{display:none;background:#d7f2e4;color:#123e34;border-radius:30px;padding:9px 18px;font-weight:800;font-size:15px;text-decoration:none;white-space:nowrap;box-shadow:0 2px 6px rgba(0,0,0,.15)}
.staff-quick:hover{background:#bce7d0}
@media(min-width:768px){.staff-quick{display:inline-block}}
/* 總資料庫：客戶資料 + 派單紀錄 */
.db-search-panel input{min-height:46px;font-size:17px;padding:10px 12px;border-radius:10px;border:1px solid #c9d8d1;width:100%;margin-top:6px}
.db-search-panel label{display:block;font-size:16px;font-weight:700}
.customer-db summary{cursor:pointer;min-height:44px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.customer-db summary strong{font-size:18px}
.db-orders{margin:8px 0 0;padding-left:20px}
.db-orders li{padding:6px 0;border-top:1px solid #e3ede7;font-size:15px}
.dispatch-record{border-left:4px solid #195640;background:#fbfdfb}
.db-dl{display:grid;grid-template-columns:72px 1fr;gap:4px 12px;margin:8px 0 0}
.db-dl dt{color:#6b7f74;font-weight:700}
.db-dl dd{margin:0;overflow-wrap:anywhere}
/* 客戶預約成功固定畫面 */
.customer-success{background:#eaf6ed;border:1px solid #b9d9c6;border-radius:16px;padding:20px 16px}
.customer-success h2{color:#123e34;margin:0 0 8px;font-size:24px}
.success-state{font-size:18px;color:#195640}
.success-state strong{color:#123e34}
.customer-success .db-dl{grid-template-columns:96px 1fr;font-size:16px}
.customer-success .db-dl dt{color:#4a6658}

/* 2026-11-19 主管後台：資料保留、選項收合，減少長頁面。 */
.driver-grid.single-driver { grid-template-columns: minmax(0,1fr); max-width: 780px; margin-top: 12px; }
.driver-picker { display: block; max-width: 420px; margin: 12px 0; font-weight: 700; }
.driver-picker select { display: block; width: 100%; min-height: 44px; margin-top: 6px; }
.duty-collapsible > summary,
.timeline-collapsible > summary,
.driver-choice > summary { cursor: pointer; font-weight: 700; padding: 8px 4px; line-height: 1.5; }
.duty-collapsible > summary:focus-visible,
.timeline-collapsible > summary:focus-visible,
.driver-choice > summary:focus-visible { outline: 3px solid #2b755d; outline-offset: 3px; border-radius: 5px; }
.timeline-collapsible > summary { font-size: 18px; }
.timeline-collapsible[open] > summary { margin-bottom: 10px; }
.driver-choice { margin: 10px 0; border: 1px solid #d9e5dd; border-radius: 10px; padding: 6px 12px; }
.driver-choice fieldset { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); gap: 7px; margin-top: 8px; }
.dispatch-more { justify-content: center; margin: 12px 0 0; }
.dispatch-more button { min-height: 44px; }
@media (max-width: 620px) {
  .driver-grid.single-driver, .driver-picker { max-width: 100%; }
  .driver-choice fieldset { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .timeline-collapsible > summary { font-size: 16px; }
}


/* 2026-11-19 一頁式後台：待派第一、司機回報第二；其他功能下移並收合。 */
body[data-view="office"] .office-priority {
  display:grid;
  grid-template-columns:minmax(0,1.85fr) minmax(295px,1fr);
  align-items:start;
  gap:14px;
  margin-bottom:14px;
}
body[data-view="office"] .office-priority .waiting-panel,
body[data-view="office"] .office-priority .driver-reports { margin:0; min-width:0; }
body[data-view="office"] .waiting-panel h2 { margin-bottom:10px; }
body[data-view="office"] .driver-reports h2 { margin-bottom:9px; }
body[data-view="office"] .driver-reports .driver-report-row { padding:10px 0; }
body[data-view="office"] .reports-more > summary,
body[data-view="office"] .office-lower > summary,
body[data-view="office"] .dispatched-today > summary {
  display:block; cursor:pointer; font-weight:750; min-height:46px;
  padding:10px 12px; line-height:1.45; border-radius:9px; background:#f5faf7;
  color:#193c31; list-style:revert;
}
body[data-view="office"] .office-lower { margin:11px 0; padding:10px 12px; }
body[data-view="office"] #officeDrivers > summary,
body[data-view="office"] #officeSecondary > summary {
  font-size:17px; border:1px solid #d8e6de;
}
body[data-view="office"] .office-secondary-body { padding:12px 0 2px; }
body[data-view="office"] .office-driver-list {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px; margin-top:12px;
}
body[data-view="office"] .office-driver-row {
  margin:0; padding:10px 12px; min-width:0; align-self:start;
  border:1px solid #d9e5dd; border-radius:11px; background:#fff;
}
body[data-view="office"] .office-driver-row > summary { padding:5px 3px; cursor:pointer; }
body[data-view="office"] .office-driver-row ul { margin:5px 0 0; padding-left:19px; }
body[data-view="office"] .office-driver-row li { margin:6px 0; }
body[data-view="office"] .office-extra-tabs { gap:7px; padding-top:12px; }
body[data-view="office"] .office-extra-tabs button { min-height:42px; }
body[data-view="office"] #officeSecondaryResults { margin-top:12px; }
body[data-view="office"] .timeline-collapsible { margin-top:12px; }
body[data-view="office"] .office-priority .waiting-card { padding:13px 0; }
body[data-view="office"] #officeSecondary .phone-booking-card { margin-top:7px; }
@media(max-width:880px){
  body[data-view="office"] .office-priority {grid-template-columns:minmax(0,1fr);}
  body[data-view="office"] .office-driver-list {grid-template-columns:minmax(0,1fr);}
}
@media(max-width:620px){
  body[data-view="office"] .office-lower {padding:9px 10px;}
  body[data-view="office"] #officeDrivers > summary,
  body[data-view="office"] #officeSecondary > summary {font-size:16px;}
}
/* 待接回與派車同一區：入口放在待派訂單正下方，不再藏進「其他操作」。 */
body[data-view="office"] .office-returns-entry {
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; flex-wrap:wrap; margin:12px 0;
}
body[data-view="office"] .office-returns-entry h2 { margin:0 0 4px; }
body[data-view="office"] .office-returns-entry p { margin:0; }
body[data-view="office"] .office-returns .bar { margin-bottom:10px; }
body[data-view="office"] .office-returns .bar h2 { margin:0; }
body[data-view="office"] .timeline-collapsible > summary {
  display:block; cursor:pointer; font-weight:750; min-height:46px;
  padding:10px 12px; line-height:1.45; border-radius:9px; background:#f5faf7;
  color:#193c31; list-style:revert;
}
body[data-view="office"] .office-driver-history {
  margin-top:16px; padding-top:12px; border-top:1px solid #d9e5dd;
}
body[data-view="office"] .office-driver-history h3 { margin:0 0 4px; }
body[data-view="office"] .office-driver-history > p { margin:0 0 10px; }
.driver-day-summary {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px; margin:8px 0 10px;
}
.driver-day-summary > div {
  background:#f5faf7; border:1px solid #d9e5dd; border-radius:10px;
  padding:8px 10px; text-align:center;
}
.driver-day-summary strong { display:block; font-size:20px; line-height:1.15; color:#123e34; }
.driver-day-summary span { font-size:12.5px; color:#4b6b5d; }
.timeline-legend {
  display:flex; gap:14px; flex-wrap:wrap; margin:0 0 8px;
  font-size:13px; color:#315747;
}
.timeline-legend i {
  display:inline-block; width:10px; height:10px; border-radius:3px;
  margin-right:5px; vertical-align:-1px; background:#cfeadd; border:1px solid #84b69d;
}
.timeline-legend i[data-tone="active"] { background:#dceafb; border-color:#99b6d8; }
.timeline-legend i[data-tone="done"] { background:#e7f2ec; border-color:#b9d9c6; }
.timeline-name small { display:block; font-size:11px; font-weight:500; color:#5d7368; line-height:1.3; margin-top:2px; }
.driver-state {
  display:inline-block; font-size:12px; font-weight:700; padding:2px 8px;
  border-radius:999px; background:#e7f2ec; color:#205844;
}
@media(max-width:620px){
  .driver-day-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:620px){
  body[data-view="office"] .office-returns-entry { align-items:stretch; flex-direction:column; }
  body[data-view="office"] .office-returns-entry button { width:100%; }
}

/* 2026-11-23 公司後台視覺優化：只調整層次、卡片與留白，不改功能或區塊順序。 */
body[data-view="office"] {
  --office-ink:#153a30;
  --office-muted:#557066;
  --office-line:#d5e4dc;
  --office-soft:#f2f8f5;
  --office-accent:#176149;
  --office-shadow:0 12px 30px -24px rgba(18,62,52,.62);
  background:
    radial-gradient(900px 420px at 50% -120px,rgba(172,219,198,.32),transparent 72%),
    #f2f7f4;
}

body[data-view="office"] #main > .bar:first-child,
body[data-view="office"] #main > .operator-bar {
  background:rgba(255,255,255,.94);
  border:1px solid var(--office-line);
  box-shadow:var(--office-shadow);
}

body[data-view="office"] #main > .bar:first-child {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  padding:14px 16px;
  margin:0 0 10px;
  border-radius:16px;
}

body[data-view="office"] #main > .bar:first-child h1 {
  color:var(--office-ink);
  font-size:26px;
}

body[data-view="office"] #main > .operator-bar {
  display:grid;
  grid-template-columns:minmax(150px,1fr) minmax(260px,340px) auto;
  gap:14px;
  padding:12px 16px;
  margin:0 0 18px;
  border-radius:14px;
}

body[data-view="office"] .operator-bar > span:first-child {
  color:var(--office-ink);
  font-weight:750;
}

body[data-view="office"] .operator-bar .role-switch {
  gap:4px;
  color:var(--office-muted);
  font-size:14px;
}

body[data-view="office"] .operator-bar .role-switch select {
  min-height:40px;
  border-color:#a8beb3;
  background:#fbfdfc;
}

body[data-view="office"] .office-priority {
  gap:16px;
  margin-bottom:16px;
}

body[data-view="office"] .office-priority .waiting-panel,
body[data-view="office"] .office-priority .driver-reports {
  border-color:var(--office-line);
  box-shadow:var(--office-shadow);
}

body[data-view="office"] .office-priority .waiting-panel {
  padding:16px;
  background:linear-gradient(180deg,#fff 0%,#fbfdfc 100%);
}

body[data-view="office"] .office-priority .waiting-panel > h2,
body[data-view="office"] .office-priority .driver-reports > h2 {
  color:var(--office-ink);
  letter-spacing:.01em;
}

body[data-view="office"] .office-priority .waiting-card {
  margin-top:12px;
  padding:14px !important;
  border:1px solid var(--office-line);
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 22px -20px rgba(18,62,52,.7);
}

body[data-view="office"] .office-priority .waiting-card:first-of-type {
  margin-top:10px;
}

body[data-view="office"] .waiting-card .waiting-head {
  min-height:30px;
  margin-bottom:3px;
}

body[data-view="office"] .waiting-card .waiting-head strong {
  color:var(--office-ink);
  font-size:17px;
  letter-spacing:.01em;
}

body[data-view="office"] .waiting-card p {
  margin:4px 0;
  color:#35574b;
  font-size:14.5px;
  line-height:1.55;
}

body[data-view="office"] .waiting-card p.muted {
  color:var(--office-muted);
}

body[data-view="office"] .waiting-card summary.button {
  margin-top:12px;
  border-color:var(--office-accent);
  background:linear-gradient(180deg,#1d6a51,#15543f);
  color:#fff;
  box-shadow:0 8px 18px -14px rgba(18,62,52,.85);
}

body[data-view="office"] .waiting-card summary.button:hover {
  background:linear-gradient(180deg,#24755b,#185b46);
}

body[data-view="office"] .office-priority .driver-reports {
  padding:17px 18px;
  background:linear-gradient(180deg,#fff 0%,#f8fcfa 100%);
  border-top:4px solid #96c9b1;
}

body[data-view="office"] .office-priority .driver-reports > p {
  color:var(--office-muted);
  line-height:1.55;
}

body[data-view="office"] .office-returns-entry,
body[data-view="office"] .dispatched-today,
body[data-view="office"] #officeDrivers,
body[data-view="office"] #officeSecondary {
  border-color:var(--office-line);
  box-shadow:var(--office-shadow);
}

body[data-view="office"] .office-returns-entry {
  padding:16px 18px;
  border-left:4px solid #4b9277;
  background:linear-gradient(100deg,#fff 0%,#f7fcf9 100%);
}

body[data-view="office"] .reports-more > summary,
body[data-view="office"] .office-lower > summary,
body[data-view="office"] .dispatched-today > summary,
body[data-view="office"] .timeline-collapsible > summary {
  border:1px solid #dbe8e1;
  background:linear-gradient(180deg,#f8fcfa,#f1f7f4);
  color:var(--office-ink);
}

body[data-view="office"] .office-lower[open] > summary,
body[data-view="office"] .dispatched-today[open] > summary,
body[data-view="office"] .timeline-collapsible[open] > summary {
  border-color:#a8cbbb;
  background:#eaf5ef;
}

@media(max-width:620px) {
  body[data-view="office"] main { padding-top:18px; }
  body[data-view="office"] #main > .bar:first-child {
    grid-template-columns:minmax(0,1fr) auto auto;
    gap:8px;
    padding:11px 12px;
  }
  body[data-view="office"] #main > .bar:first-child h1 { font-size:24px; }
  body[data-view="office"] #main > .bar:first-child button,
  body[data-view="office"] #main > .bar:first-child .button {
    min-height:40px;
    padding:7px 10px;
    font-size:15px;
  }
  body[data-view="office"] #main > .bar:first-child .demo {
    padding:4px 9px;
    font-size:12.5px;
  }
  body[data-view="office"] #main > .operator-bar {
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    padding:11px 12px;
    margin-bottom:14px;
  }
  body[data-view="office"] .operator-bar .role-switch { grid-column:1 / -1; }
  body[data-view="office"] .operator-bar .role-switch select { min-height:46px; }
  body[data-view="office"] .office-priority .waiting-panel { padding:12px; }
  body[data-view="office"] .office-priority .waiting-card {
    margin-top:10px;
    padding:12px !important;
  }
  body[data-view="office"] .waiting-card p,
  body[data-view="office"] .waiting-card p.muted {
    font-size:15.5px;
    line-height:1.55;
  }
  body[data-view="office"] .waiting-card .waiting-head strong { font-size:18px; }
  body[data-view="office"] .office-priority .driver-reports { padding:14px; }
  body[data-view="office"] .office-returns-entry { padding:14px; }
}
