:root{font-family:system-ui,-apple-system,"Noto Sans TC","Microsoft JhengHei",sans-serif;color:#173342;background:#f4f7fa;font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,textarea,select{font:inherit}button{cursor:pointer}a{color:#107087;text-decoration:none}a:hover{text-decoration:underline}input,textarea,select{outline:none}
.boot{padding:30vh 16px;text-align:center;color:#436276}.shell{min-height:100vh}.topbar{background:#124c60;color:white;padding:18px max(20px,calc((100vw - 1210px)/2));display:flex;justify-content:space-between;align-items:center;gap:14px;box-shadow:0 3px 16px #062d3a14}.topbrand{display:flex;align-items:center;gap:12px}.logo{width:42px;height:42px;border-radius:13px;background:#ffffff1e;display:grid;place-items:center;font-size:22px}.brandname{font-weight:750;letter-spacing:.025em;font-size:19px}.brandsub{font-size:12px;color:#cde0e6}.headright{display:flex;gap:9px;align-items:center}.headright .email{font-size:13px;color:#dae9ed;max-width:210px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mainlayout{max-width:1220px;margin:0 auto;display:grid;grid-template-columns:240px minmax(0,1fr);gap:24px;padding:24px 20px 45px}.sidebar{background:#fff;border:1px solid #e2e9ed;border-radius:18px;padding:15px;align-self:start;position:sticky;top:20px}.navtitle{font-size:11px;text-transform:uppercase;letter-spacing:.09em;color:#8a9ca8;font-weight:750;margin:12px 10px 6px}.navlink{display:flex;gap:10px;align-items:center;border:0;background:none;width:100%;padding:11px 13px;text-align:left;color:#425d6d;border-radius:11px;font-weight:600;margin:1px 0}.navlink:hover{background:#f2f7f9}.navlink.active{background:#e4f3f5;color:#09677a}.navicon{font-size:17px;width:24px;text-align:center}.count{margin-left:auto;background:#d8e9ec;border-radius:12px;padding:0px 8px;font-size:12px}.content{min-width:0}.pagehead{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:20px}.pagehead h1{font-size:25px;line-height:1.35;margin:0;color:#173e50}.subheading{font-size:14px;color:#738996;margin:3px 0 0}.panel{background:#fff;border:1px solid #e0e8ed;border-radius:18px;padding:23px;box-shadow:0 5px 22px #17334409;margin-bottom:18px}.hero{background:linear-gradient(118deg,#125269,#227f8b);color:#fff;padding:27px;border-radius:18px;margin-bottom:18px}.hero h2{margin:0 0 7px;font-size:23px}.hero p{color:#e5f5f4;margin:0 0 17px;max-width:650px}.disclaimer{border:1px solid #f2d9a6;background:#fff8e9;color:#7c5719;padding:11px 15px;border-radius:11px;font-size:13px;line-height:1.7;margin-bottom:16px}.disclaimer strong{color:#734810}.notice{background:#e9f5f6;padding:13px 16px;border-radius:11px;color:#236374;font-size:14px}.notice.warn{background:#fff4dd;color:#815e1e}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-bottom:18px}.stat{background:#fff;border:1px solid #e0e8ed;border-radius:14px;padding:16px 18px}.statval{font-size:25px;font-weight:750;color:#155970}.statlabel{color:#708796;font-size:13px}.case-list{display:grid;gap:12px}.case-item{display:flex;justify-content:space-between;gap:16px;text-align:left;border:1px solid #e1e8ed;border-radius:13px;padding:17px 18px;width:100%;background:#fff}.case-item:hover{border-color:#85b9c3;background:#fcffff}.case-title{font-size:16px;font-weight:720;color:#204252}.case-meta{margin-top:5px;color:#778c98;font-size:13px}.case-identity{color:#315d6b;overflow-wrap:anywhere}.case-identity strong{color:#164a5e;font-weight:730}.pill{display:inline-block;padding:4px 10px;border-radius:20px;background:#e6f4f2;color:#23755c;font-size:12px;font-weight:700;white-space:nowrap}.pill.closed{background:#edf0f4;color:#647385}.muted{color:#738a98;font-size:14px}.divider{border:0;border-top:1px solid #e6edf1;margin:20px 0}
.btn{border:1px solid transparent;border-radius:11px;padding:11px 17px;font-weight:700;background:#11647a;color:white;display:inline-flex;justify-content:center;align-items:center;gap:7px;text-decoration:none;transition:filter .15s;min-height:44px}.btn:hover{filter:brightness(.95);text-decoration:none}.btn:disabled{opacity:.55;cursor:not-allowed}.btn.secondary{background:#edf5f7;color:#12576b;border-color:#dae9ed}.btn.outline{background:white;border-color:#cbdce2;color:#285f70}.btn.danger{background:#fff4f2;color:#a44739;border-color:#f0d0c9}.btn.small{font-size:13px;min-height:35px;padding:6px 11px}.btn.full{width:100%}.btn.white{background:#fff;color:#13586a}.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.form{display:grid;gap:17px}.field{display:grid;gap:6px}.field label{font-size:14px;font-weight:720;color:#344f5e}.field input,.field select,.field textarea{background:#fff;border:1px solid #cbdbe2;border-radius:11px;padding:12px 13px;width:100%;color:#203946}.field textarea{min-height:135px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{border-color:#258da2;box-shadow:0 0 0 3px #258da226}.hint{color:#7a8f9d;font-size:12px}.auth-wrap{max-width:510px;margin:clamp(25px,7vw,80px) auto;padding:0 20px}.authcard{padding:32px}.authcard h1{font-size:27px;margin:2px 0 10px}.otp-dev{background:#eff8e9;color:#315c35;border-radius:10px;padding:12px;font-size:15px;margin:10px 0}.error{background:#fff0ee;color:#8c342c;padding:11px 14px;border-radius:11px;font-size:14px;margin:10px 0}.success{background:#ebf8ef;color:#2b6745;padding:11px 14px;border-radius:11px;font-size:14px;margin:10px 0}
.thread{display:grid;gap:16px;margin:19px 0 24px}.message{max-width:90%;background:#f2f6f9;border:1px solid #e3ebef;padding:14px 17px;border-radius:16px 16px 16px 4px}.message.mine{justify-self:end;background:#e8f5f4;border-color:#d0e8e5;border-radius:16px 16px 4px 16px}.msg-author{font-weight:750;font-size:12px;color:#407080}.msg-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;margin:5px 0}.msg-date{font-size:11px;color:#8497a1}.attachment{display:flex;justify-content:space-between;gap:10px;padding:12px;border:1px solid #e0e8ed;border-radius:11px;margin:7px 0}.attachment a{overflow-wrap:anywhere}.setting-row{display:flex;align-items:flex-start;justify-content:space-between;gap:13px;border-bottom:1px solid #eaf0f3;padding:14px 0}.setting-row:last-child{border-bottom:0}.setting-row .setting-detail{flex:1;min-width:0}.setting-row .setting-detail strong{display:block;font-size:14px;overflow-wrap:anywhere}.checkgroup{display:flex;flex-wrap:wrap;gap:11px;align-items:center}.checkgroup label{white-space:nowrap;font-size:13px;color:#526c79}.checkgroup input{accent-color:#18768a;vertical-align:middle}.tablewrap{width:100%;overflow:auto}.table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}.table th{color:#78919b;font-size:12px;font-weight:700;background:#f7fafb}.table td,.table th{padding:11px 10px;border-bottom:1px solid #e8eef2;vertical-align:top}.table td{overflow-wrap:anywhere}.empty{text-align:center;padding:42px 16px;color:#8399a4}.empty .emoji{font-size:38px;margin-bottom:10px}.footer{max-width:1220px;margin:auto;padding:0 22px 25px;font-size:12px;color:#8da0ab}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:50;background:#183c4d;color:white;border-radius:12px;padding:13px 19px;box-shadow:0 12px 40px #0004;max-width:min(90vw,560px)}.toast.error{background:#a83d38;color:white}.notification-dot{width:9px;height:9px;background:#c44d32;border-radius:50%;display:inline-block;margin-left:5px}.learn-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.learn-item{padding:16px;background:#f7fafb;border-radius:12px;border:1px solid #ebf0f2}.learn-item h3{font-size:15px;margin:0 0 6px}.learn-item p{color:#6b808d;font-size:13px;margin:0}
@media(max-width:770px){.topbar{padding:13px 16px}.topbrand{gap:8px}.logo{width:38px;height:38px}.brandname{font-size:16px}.headright .email{display:none}.mainlayout{grid-template-columns:1fr;padding:14px 12px 55px;gap:14px}.sidebar{position:static;display:flex;overflow-x:auto;gap:4px;border-radius:12px;padding:7px}.navtitle{display:none}.navlink{white-space:nowrap;padding:9px 10px;width:auto;margin:0;font-size:13px}.navicon{width:auto}.count{padding:0 5px}.panel{padding:17px;border-radius:14px}.pagehead h1{font-size:21px}.hero{padding:21px}.hero h2{font-size:20px}.stats{gap:8px}.stat{padding:12px}.statval{font-size:22px}.setting-row{flex-direction:column}.message{max-width:96%}.learn-grid{grid-template-columns:1fr}.authcard{padding:22px}.headright .btn.small{padding:6px 10px}.actions{align-items:stretch}.actions>.btn{flex:1}}

/* LINE Login: primary action first, fallback visible, detailed help on demand. */
.line-entry{display:grid;gap:10px;margin:20px 0 0}
.line-entry .hint{margin:0}
.line-help{border:1px solid #dbe7eb;border-radius:11px;padding:4px 12px;color:#395b69}
.line-help summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:14px}
.line-help summary:focus-visible{outline:3px solid #258da2;outline-offset:2px}
.line-help ol{font-size:14px;padding-left:1.45em;line-height:1.7;margin:4px 0 14px}
.line-help li{margin:8px 0}

/* Voice pilot panel remains mounted independently of case refreshes. */
#voice-panel{position:fixed;right:18px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:40;width:min(420px,calc(100vw - 36px));margin:0;padding:14px 16px;box-shadow:0 5px 25px #17334426}
#voice-panel[hidden],#voice-panel [hidden]{display:none!important}
#voice-panel [data-voice="status"]{font-weight:650;color:#12576b}
#voice-panel [data-voice="error"]:empty{display:none}
#voice-panel [data-voice="elapsed"]{font-variant-numeric:tabular-nums;font-weight:700}
#voice-panel .actions{gap:8px}
#voice-panel [data-voice="hangup"],#voice-panel [data-voice="reject"]{background:#a44739;color:#fff;border-color:#a44739}
#voice-panel[data-state="idle"],#voice-panel[data-state="ended"]{position:relative;right:auto;bottom:auto;max-width:1220px;width:calc(100% - 40px);margin:0 auto 20px;box-shadow:none}

/* Voice feature only: no indicator in disabled/logged-out application. */
.voice-status{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;font-size:12px;color:#d3dfe2}
.voice-status[data-kind="online"]{color:#c1f3d5}
.voice-status[data-kind="ringing"]{color:#ffe3a3;font-weight:750}
.voice-status[data-kind="active"]{color:#c1f3d5;font-weight:750}
.voice-status[data-kind="offline"]{color:#e2c4c1}
.phone-icon{display:inline-block;vertical-align:middle;flex:none}
#voice-panel[data-state="ringing"]{border:2px solid #267f82}
#voice-panel [data-voice="incoming"]{margin:8px 0;color:#12576b;font-weight:600}
@media(max-width:420px){.topbar{gap:7px}.headright{gap:6px}.voice-status{font-size:11px;gap:3px}.voice-status .phone-icon{width:15px;height:15px}.brandname{font-size:15px}.topbrand .logo{width:32px;height:32px}}
