:root{--navy:#12358f;--blue:#1f57c8;--ink:#111827;--muted:#70798d;--line:#e7eaf1;--bg:#f8f9fc;--white:#fff;--danger:#c93636;--green:#14804a;--amber:#a96500}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--ink)}button,input,select,textarea{font:inherit}.boot{min-height:100vh;display:grid;place-content:center;text-align:center;gap:18px;background:#fff}.boot-brand{display:flex;align-items:center;gap:18px}.boot-brand img{width:170px}.boot-brand b{font-size:24px;color:#6f7787}.spin{width:34px;height:34px;border:4px solid #e7ecf7;border-top-color:var(--navy);border-radius:50%;animation:s 1s linear infinite;margin:auto}@keyframes s{to{transform:rotate(360deg)}}.shell{max-width:760px;margin:auto;min-height:100vh;background:#fff}.top{display:flex;align-items:center;padding:22px 20px 18px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:6}.brand{display:flex;align-items:center;gap:18px;min-width:0}.brand img{width:145px;display:block}.brand strong{font-size:20px;color:#70798d;white-space:nowrap}.welcome{padding:20px 20px 8px}.welcome span{display:block;color:var(--muted);font-size:14px;margin-bottom:4px}.welcome h1{margin:0;font-size:23px;line-height:1.25;letter-spacing:-.3px}.tabs{display:grid;grid-template-columns:1fr 1.25fr 1.25fr;border-bottom:1px solid var(--line);padding:0 12px}.tabs button{border:0;background:#fff;padding:16px 4px 14px;color:#818793;font-weight:500;font-size:14px;border-bottom:3px solid transparent}.tabs button.active{color:var(--navy);font-weight:700;border-bottom-color:var(--navy)}main{padding:18px 18px 110px}.history{display:grid;gap:12px}.case-card{width:100%;text-align:left;border:1px solid #dfe4ee;background:#fff;border-radius:18px;padding:16px 16px 15px;box-shadow:0 5px 18px rgba(16,40,100,.035);position:relative}.case-card:before{content:"";position:absolute;left:12px;top:20px;bottom:20px;width:5px;border-radius:9px;background:#aeb8cc}.case-body{padding-left:19px}.case-top{display:flex;align-items:center;gap:10px}.case-top strong{color:#1683d8;font-size:16px}.case-top .chev{margin-left:auto;font-size:25px;color:#1683d8}.case-card p{margin:5px 0;color:#60697b;font-size:14px}.case-meta{font-size:12px;color:#7a8292}.pills{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}.pill{background:#f1f3f7;border-radius:999px;padding:6px 10px;font-size:11px;color:#657084}.status{font-weight:700}.status-new{color:#1683d8}.status-progress{color:var(--amber)}.status-resolved,.status-closed,.status-completed{color:var(--green)}.empty{text-align:center;padding:54px 24px;color:var(--muted)}.empty svg{width:52px;height:52px;stroke:#9aa6bd;fill:none;stroke-width:1.6}.empty h3{color:var(--ink);margin:16px 0 7px}.empty p{line-height:1.55;margin:0 auto;max-width:360px}.fab{position:fixed;right:max(22px,calc((100vw - 760px)/2 + 22px));bottom:28px;width:68px;height:68px;border-radius:50%;border:0;background:var(--navy);color:#fff;box-shadow:0 12px 30px rgba(18,53,143,.3);z-index:8;display:grid;place-items:center}.fab svg{width:31px;height:31px;stroke:currentColor;fill:none;stroke-width:1.8}.primary,.outline{width:100%;border-radius:14px;padding:14px 18px;font-weight:700}.primary{border:0;background:var(--navy);color:#fff}.outline{border:1px solid #cfd7e6;background:#fff;color:var(--navy)}.create-wrap{margin-top:20px}.guide-card{display:flex;align-items:center;gap:14px;width:100%;padding:17px;border:1px solid var(--line);border-radius:17px;background:#fff;text-align:left;margin-bottom:12px}.guide-card svg{width:28px;height:28px;stroke:var(--navy);fill:none;stroke-width:1.7}.guide-card small{display:block;color:var(--muted);margin-top:3px}.guide-card .chev{margin-left:auto}.modalbg{position:fixed;inset:0;background:rgba(13,22,43,.48);display:flex;align-items:center;justify-content:center;padding:20px;z-index:30}.modalcard{width:min(520px,100%);background:#fff;border-radius:26px;padding:26px 22px;max-height:92vh;overflow:auto;box-shadow:0 24px 70px rgba(0,0,0,.25)}.greeting{text-align:center;padding:30px 24px}.greeting-logo{width:100px;height:100px;margin:0 auto 18px;border-radius:50%;display:grid;place-items:center;background:#f1f4ff;overflow:hidden}.greeting-logo img{max-width:80%;max-height:80%;object-fit:contain}.greeting h2{font-size:20px;margin:0 0 12px}.greeting h3{font-size:19px;color:var(--navy);margin:0 0 15px}.greeting p{color:var(--muted);line-height:1.6;margin:0 0 22px}.modalcard h2{margin:0 0 8px}.modalcard>p{color:var(--muted);line-height:1.5}label{display:block;margin:14px 0;font-weight:600;font-size:14px}input,select,textarea{width:100%;margin-top:7px;border:1px solid #cfd6e4;border-radius:13px;padding:13px;background:#fff}textarea{resize:vertical;min-height:105px}.modal-actions{display:grid;gap:10px;margin-top:18px}.chat{display:flex;flex-direction:column;height:100vh}.chathead{padding:13px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px;background:#fff}.iconbtn{border:0;background:#f4f6fa;width:42px;height:42px;border-radius:50%;font-size:25px;color:var(--navy)}.chathead small{display:block;color:var(--muted);margin-top:3px}.chatbody{flex:1;overflow:auto;padding:18px;background:#f7f9fd}.msg{max-width:82%;padding:12px 14px;border-radius:16px;margin:8px 0;background:#fff;box-shadow:0 4px 12px rgba(0,0,0,.04)}.msg.me{margin-left:auto;background:#eaf1ff}.msg small{display:block;color:var(--muted);font-size:10px;margin-top:6px}.msg audio{max-width:240px}.msg a{color:var(--blue)}.composer{border-top:1px solid var(--line);padding:10px 12px calc(10px + env(safe-area-inset-bottom));display:flex;gap:8px;background:#fff;align-items:flex-end}.composer textarea{margin:0;min-height:46px;max-height:110px}.round{width:48px;height:48px;border:0;border-radius:50%;background:var(--navy);color:#fff;font-size:20px;flex:none}.attach{width:46px;height:46px;border:1px solid var(--line);border-radius:50%;background:#fff;flex:none}.repair-step{border:1px solid var(--line);border-radius:17px;padding:16px;margin-bottom:14px}.repair-step h3{margin:0 0 5px;font-size:16px}.repair-step p{margin:0 0 12px;color:var(--muted);font-size:13px}.choice{display:block;border:1px solid var(--line);border-radius:14px;padding:14px;margin:10px 0}.choice input{width:auto;margin:0 8px 0 0}.uploadbox{border:1.5px dashed #aeb8ca;border-radius:14px;padding:18px;text-align:center;color:var(--muted);display:block}.uploadbox input{display:none}.thumbs{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.thumbs img{width:74px;height:74px;object-fit:cover;border-radius:10px}.progress{height:6px;background:#e9edf5;border-radius:9px;overflow:hidden;margin-top:10px}.progress i{display:block;height:100%;background:var(--navy);width:0}.error{padding:40px 24px;text-align:center;background:#fff;min-height:100vh}.error img{width:170px}.toast{position:fixed;left:50%;bottom:100px;transform:translateX(-50%);background:#172033;color:#fff;padding:11px 16px;border-radius:12px;z-index:50}.hidden{display:none!important}@media(min-width:700px){body{padding:24px}.shell{border-radius:24px;overflow:hidden;box-shadow:0 20px 50px rgba(10,42,122,.08)}.fab{bottom:46px}.modalcard{max-width:560px}}
/* V1.2.0 production fixes */
.case-card h4{margin:8px 0 4px;font-size:16px;color:var(--ink)}
.case-card .status{color:#1683d8}
.repair-empty{padding-top:95px}.repair-empty .create-wrap{max-width:520px;margin:24px auto 0}.repair-empty svg{width:62px;height:62px}
.chat-open,.form-open{background:#f5f7fb}.chat-page,.repair-page{min-height:100dvh;max-width:760px;margin:auto;background:#f5f7fb;display:flex;flex-direction:column}
.chat-header,.form-header{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:14px;padding:14px 18px;background:#fff;border-bottom:1px solid var(--line)}
.chat-header>div,.form-header>div{min-width:0}.chat-header strong,.form-header strong{display:block;font-size:20px}.chat-header small,.form-header small{display:block;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-header>span{margin-left:auto;background:#f1f3f7;color:#657084;border-radius:999px;padding:8px 12px;font-size:13px}.chat-back,.form-header button{border:0;background:#f2f5fb;color:var(--navy);width:44px;height:44px;border-radius:50%;font-size:24px;flex:none}
.chat-scroll{flex:1;overflow:auto;padding:22px 18px 130px;min-height:0}.ticket-summary{background:#fff;border-radius:20px;padding:18px 20px;margin-bottom:20px;box-shadow:0 4px 14px rgba(10,42,122,.035)}.ticket-summary b,.ticket-summary span{display:block}.ticket-summary span{font-size:18px;font-weight:700;margin-top:8px}.thread{display:flex;flex-direction:column;gap:12px}.bubble{max-width:82%;background:#fff;border-radius:18px;padding:13px 15px;box-shadow:0 5px 16px rgba(10,42,122,.04)}.bubble.customer{align-self:flex-end;background:#fff}.bubble.team{align-self:flex-start}.bubble strong{display:block;color:var(--navy);font-size:13px;margin-bottom:5px}.bubble p{font-size:17px;line-height:1.42;margin:0}.bubble small{display:block;color:var(--muted);font-size:11px;margin-top:8px}.bubble audio{max-width:100%;margin-top:8px}.chat-image img{width:min(240px,100%);border-radius:12px;margin-top:8px}.chat-file{display:block;margin-top:8px;color:var(--blue)}.no-messages,.chat-loading{text-align:center;color:var(--muted);padding:50px 18px}
.hq-composer{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:min(760px,100%);display:flex;align-items:flex-end;gap:9px;padding:10px 14px calc(12px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);z-index:20}.composer-plus,.composer-mic,.composer-send{border:0;width:48px;height:48px;border-radius:50%;flex:none}.composer-plus,.composer-mic{background:#f1f4f9;color:var(--navy);font-size:28px}.composer-mic svg{width:25px;height:25px;stroke:currentColor;fill:none;stroke-width:1.8}.composer-mic.recording{background:#feecec;color:#c93636}.composer-send{background:#9eadd2;color:#fff;font-size:25px;font-weight:700}.composer-send:not(:disabled){background:var(--navy)}.composer-input{flex:1;background:#f1f3f7;border-radius:25px;padding:2px 14px;min-width:0}.composer-input textarea{border:0;background:transparent;margin:0;min-height:44px;max-height:105px;padding:12px 0;outline:0}.composer-input small{display:block;color:var(--muted);padding:0 0 7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.repair-form{padding:22px 18px 60px}.stepper{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin-bottom:20px}.stepper div{text-align:center;color:#8a93a5;font-size:11px}.stepper i{display:grid;place-items:center;width:30px;height:30px;margin:0 auto 6px;border-radius:50%;background:#e9edf5;font-style:normal;font-weight:700}.stepper .active,.stepper .done{color:var(--navy);font-weight:700}.stepper .active i,.stepper .done i{background:var(--navy);color:#fff}.form-section{background:#fff;border:1px solid var(--line);border-radius:22px;padding:20px}.form-section h2{margin:0 0 8px;font-size:21px}.form-section>p{color:var(--muted);line-height:1.5;margin:0 0 16px}.choice{display:flex;align-items:center;gap:12px}.choice input{width:24px;height:24px;margin:0}.choice span{display:block}.choice small{display:block;color:var(--muted);font-weight:400;margin-top:4px}.photo-row{display:grid;grid-template-columns:1fr 112px;gap:14px;align-items:center;padding:16px 0;border-bottom:1px solid var(--line)}.photo-row:last-child{border-bottom:0}.photo-row>div>strong,.photo-row>div>small{display:block}.photo-row>div>small{color:var(--muted);margin:4px 0 10px}.photo-row>img{width:112px;height:112px;object-fit:cover;border-radius:14px}.uploadbox{margin:0}.uploadbox svg{width:30px;height:30px;stroke:var(--navy);fill:none}.uploadbox span{display:block;margin-top:6px}.form-actions{display:flex;gap:10px;margin-top:18px}.review>div{display:flex;justify-content:space-between;gap:15px;padding:13px 0;border-bottom:1px solid var(--line)}.review>div span{color:var(--muted)}.review>div strong{text-align:right}.review>p{margin-top:18px}.progress{margin:14px 0 0}
.customer-portal-link{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7a8292;margin-top:8px}
@media(max-width:430px){.brand img{width:128px}.brand strong{font-size:18px}.tabs{padding:0 4px}.tabs button{font-size:13px}.welcome{padding-top:18px}.photo-row{grid-template-columns:1fr 90px}.photo-row>img{width:90px;height:90px}.hq-composer{gap:6px;padding-left:10px;padding-right:10px}.composer-plus,.composer-mic,.composer-send{width:44px;height:44px}.chat-scroll{padding-left:14px;padding-right:14px}.bubble{max-width:88%}}

/* V1.3.0 Support Portal production bridge */
.boot-brand{flex-direction:column;gap:8px}.boot-brand img{width:190px}.boot-brand b{font-size:20px;font-weight:700;color:#687286}.boot{transform:translateY(-3vh)}
.fab svg{stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.selected-preview{display:block;width:100%;height:120px;object-fit:cover;border-radius:12px;margin-top:10px}.uploadbox:has(.selected-preview){padding:10px}.uploadbox:has(.selected-preview)>svg{display:none}.uploadbox:has(.selected-preview)>span{color:#14804a;font-weight:700}
