:root{font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#202c27;background:#f7f8f5;font-synthesis:none;--ink:#202c27;--muted:#69766e;--line:#e3e8e0;--green:#246c4b;--pale:#eaf2e9;--orange:#a36124;--radius:20px}
*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible{outline:3px solid #95bda6;outline-offset:3px}button{border:0}a{color:var(--green);text-decoration:none}a:hover{text-decoration:underline}[hidden]{display:none!important}input,textarea{width:100%;border:1px solid #ccd6cd;background:white;color:var(--ink);border-radius:12px;padding:13px 15px;outline:none;transition:border-color .15s,box-shadow .15s}input:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px #246c4b14}textarea{resize:vertical;min-height:48px;max-height:180px;line-height:1.65}input::placeholder,textarea::placeholder{color:#8a958e}label{display:block;font-size:15px;font-weight:600;margin-bottom:9px}.field{margin-bottom:22px}.primary,.secondary,.text-button,.danger{min-height:44px;padding:11px 18px;border-radius:11px;font-weight:600;font-size:15px;display:inline-flex;align-items:center;justify-content:center;gap:8px}.primary{color:white;background:var(--green)}.primary:hover{background:#19583d}.secondary{background:white;border:1px solid #d5dfd4;color:#354a3d}.secondary:hover{background:#f1f5ee}.text-button{color:#53665b;background:transparent}.text-button:hover{background:#eaf0e6}.danger{background:#fff0ea;color:#a7472b}.full{width:100%}.icon{width:20px;height:20px;flex:0 0 auto;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.brand{display:flex;align-items:center;gap:12px;font-weight:750;font-size:20px;letter-spacing:.02em}.brand-mark{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:13px;background:var(--green);color:white}.brand-mark .icon{width:24px;height:24px}.muted{color:var(--muted)}.initial-loading{display:grid;place-items:center;min-height:80vh;color:var(--muted)}.auth-shell{min-height:100svh;display:grid;place-items:center;padding:30px 20px}.auth-card{width:100%;max-width:420px;padding:38px;border-radius:24px;border:1px solid var(--line);background:white;box-shadow:0 16px 60px #2b453009}.auth-card h1{font-size:28px;margin:32px 0 9px;letter-spacing:-.03em}.auth-card .intro{margin:0 0 32px;color:var(--muted);font-size:16px;line-height:1.7}.form-error{color:#a3412d;font-size:14px;line-height:1.6;margin:0 0 15px;overflow-wrap:anywhere}.auth-footer{margin-top:24px;text-align:center;font-size:14px}.shell{max-width:1120px;margin:0 auto;padding:0 34px 70px}.topbar{height:102px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line)}.top-actions{display:flex;align-items:center;gap:8px}.connection{font-size:14px;display:inline-flex;align-items:center;gap:7px;color:var(--muted);white-space:nowrap}.connection:before{content:"";width:7px;height:7px;background:#6f9a78;border-radius:50%}.connection.offline:before{background:#c8853b}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin:38px 0 28px}.page-heading h1{font-size:30px;font-weight:730;margin:0;letter-spacing:-.03em}.page-heading p{font-size:15px;margin:9px 0 0;color:var(--muted)}.tabs{display:flex;gap:6px;background:#eaf0e6;width:max-content;max-width:100%;padding:5px;border-radius:13px;margin-bottom:24px}.tab{min-height:40px;padding:9px 16px;border-radius:9px;font-size:15px;background:none;color:#677568;white-space:nowrap}.tab.selected{background:white;color:#234d36;font-weight:650;box-shadow:0 2px 6px #203d1910}.count{display:inline-block;margin-left:7px;font-size:13px;opacity:.7}.leads{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.lead-card{border:1px solid var(--line);background:white;border-radius:var(--radius);padding:24px;text-align:left;color:var(--ink);width:100%;transition:border-color .15s,transform .15s,box-shadow .15s}.lead-card:hover{border-color:#a6bfa8;box-shadow:0 7px 24px #1d3d1910;transform:translateY(-2px)}.card-top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.customer{display:flex;align-items:center;gap:12px;min-width:0}.avatar{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:14px;background:#f0f4ed;font-weight:650;font-size:17px;color:#45664e;flex:0 0 auto}.customer-name{font-size:17px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:230px}.arrival{color:#7c877e;font-size:13px;margin-top:4px}.badge{display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:600;padding:6px 9px;border-radius:7px;white-space:nowrap;background:#f0f3ed;color:#6f7c70}.badge.needs_quote{background:#fff2de;color:#a06525}.badge.quoted{background:#edf2fc;color:#4a6e9c}.badge.agreed{background:#e9f4e7;color:#277342}.badge.needs_review{background:#fff0e8;color:#a65d32}.requirement{font-size:16px;line-height:1.65;margin:0 0 25px;min-height:53px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-bottom{display:flex;align-items:end;justify-content:space-between;gap:12px}.quote-label{font-size:13px;color:var(--muted);margin-bottom:5px}.quote-value{font-size:25px;font-weight:700;letter-spacing:-.03em}.quote-value.empty{font-size:18px;color:#8b958a;font-weight:500}.card-arrow{width:28px;height:28px;display:grid;place-items:center;color:#8b9d8a}.unread-dot{width:7px;height:7px;border-radius:50%;background:var(--green);display:inline-block;margin-left:6px;vertical-align:middle}.empty-state{text-align:center;border:1px dashed #cfdaca;border-radius:20px;padding:65px 20px;grid-column:1/-1}.empty-state .empty-icon{width:58px;height:58px;display:grid;place-items:center;margin:0 auto 18px;background:#eaf0e5;border-radius:18px;color:#72896e}.empty-state h2{font-size:19px;margin:0 0 10px}.empty-state p{font-size:15px;color:var(--muted);line-height:1.8;margin:0}.notice-stack{display:grid;gap:10px;margin-bottom:20px}.notice{display:flex;align-items:center;gap:13px;padding:16px 18px;border:1px solid #c3dabe;background:#eef6e9;border-radius:13px}.notice-main{min-width:0;flex:1}.notice-title{font-size:15px;font-weight:650}.notice-description{font-size:14px;margin-top:4px;color:#5f7659;line-height:1.5}.notice-open{color:#2c693e;background:none;font-weight:650;padding:10px;white-space:nowrap}.notice-close{background:none;color:#6b8265;padding:8px;border-radius:8px}.offline-banner{border:1px solid #ebd4b4;background:#fff8ed;border-radius:12px;padding:14px 17px;font-size:14px;line-height:1.6;color:#8d672e;margin:24px 0 0}.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);z-index:1000;background:#243b2d;color:white;box-shadow:0 8px 30px #0002;padding:13px 20px;border-radius:12px;font-size:15px;max-width:calc(100% - 32px);line-height:1.5;text-align:center}.toast.error{background:#8c442f}dialog{border:0;border-radius:24px;padding:0;width:min(760px,calc(100% - 36px));max-height:calc(100svh - 48px);background:white;box-shadow:0 30px 100px #16241630;color:var(--ink)}dialog::backdrop{background:#26312866;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:center;gap:12px;padding:24px 28px;border-bottom:1px solid var(--line);position:sticky;top:0;background:white;z-index:2}.dialog-head h2{font-size:21px;margin:0;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.close-button{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#f1f4ee;color:#5a6f5c;flex-shrink:0}.dialog-body{padding:25px 28px}.detail-summary{display:flex;gap:12px;justify-content:space-between;align-items:flex-start;margin-bottom:24px}.detail-summary .requirement{margin:0;min-height:0;display:block;overflow:visible}.summary-caption{font-size:13px;color:var(--muted);margin-bottom:7px}.quote-box{background:#f5f8f1;border:1px solid #e1e9db;border-radius:16px;padding:20px;margin-bottom:24px}.quote-box-title{font-size:16px;font-weight:650;margin:0 0 16px}.range-row{display:grid;grid-template-columns:1fr auto 1fr;gap:12px;align-items:end;margin-bottom:15px}.range-row .field{margin:0}.range-row label{font-size:13px;color:#697765}.range-separator{padding-bottom:13px;color:#9ba795}.quote-foot{display:flex;align-items:center;justify-content:space-between;gap:14px}.quote-foot p{font-size:13px;color:#70816a;margin:0;line-height:1.6}.agreement-box{padding:18px;border-radius:14px;background:#edf6e9;border:1px solid #cfe1c6;margin-bottom:24px}.agreement-box strong{display:block;font-size:17px;margin-bottom:7px}.agreement-box p{font-size:14px;color:#5e7957;line-height:1.7;margin:0 0 13px}.detail-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;color:var(--muted);font-size:13px;margin-bottom:22px}.section-label{font-size:15px;margin:0 0 18px;font-weight:650}.conversation{display:flex;flex-direction:column;gap:18px;max-height:360px;overflow:auto;padding:1px 3px 10px;overscroll-behavior:contain}.message{display:flex;flex-direction:column;max-width:85%;align-self:flex-start;gap:5px}.message.assistant,.message.owner{align-self:flex-end;align-items:flex-end}.message.system{max-width:100%;align-self:center;text-align:center}.bubble{background:#f0f3ed;border-radius:3px 15px 15px 15px;padding:12px 15px;font-size:15px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere}.assistant .bubble,.owner .bubble{background:#e9f2e6;border-radius:15px 3px 15px 15px}.system .bubble{background:none;padding:5px;font-size:13px;color:#8b9787}.message-meta{font-size:12px;color:#8b9687;margin:0 3px}.message-empty{font-size:14px;color:#8b9687;text-align:center;padding:24px 0}.composer{display:flex;align-items:end;gap:10px;margin-top:20px}.composer textarea{resize:none;flex:1;min-height:48px;max-height:145px;font-size:15px}.composer .primary{min-width:64px;height:48px;padding:12px}.detail-actions{border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:22px;padding-top:15px}.detail-actions p{font-size:13px;color:var(--muted);margin:0}.chat-shell{max-width:760px;height:100svh;margin:0 auto;display:flex;flex-direction:column;background:white;border-left:1px solid var(--line);border-right:1px solid var(--line)}.chat-header{padding:21px 24px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px}.chat-heading{display:flex;align-items:center;gap:12px}.chat-title{font-size:18px;font-weight:650;margin:0}.chat-subtitle{font-size:13px;color:var(--muted);margin:4px 0 0}.chat-body{padding:28px 24px;flex:1;overflow-y:auto;overscroll-behavior:contain}.chat-body .conversation{max-height:none;overflow:visible;gap:24px}.chat-welcome{padding:28px 4px 42px}.chat-welcome h1{font-size:27px;letter-spacing:-.02em;margin:0 0 14px}.chat-welcome p{font-size:16px;color:var(--muted);line-height:1.8;margin:0;max-width:410px}.chat-footer{padding:16px 24px calc(18px + env(safe-area-inset-bottom));background:white;border-top:1px solid var(--line)}.chat-footer .composer{margin:0}.chat-footer .chat-note{font-size:12px;color:#8b9587;margin:11px 0 0;text-align:center}.chat-shell .offline-banner{margin:0;border-radius:0;border-width:0 0 1px}.chat-status{padding:10px 15px;font-size:14px;color:#64765e;background:#f1f7ec;margin:0 0 20px;border-radius:10px;line-height:1.6}
@media(max-width:700px){.shell{padding:0 18px 42px}.topbar{height:80px;gap:10px}.brand{font-size:18px;gap:9px}.brand-mark{width:35px;height:35px;border-radius:11px}.top-actions{gap:0}.top-actions .secondary{font-size:14px;padding:9px 11px}.top-actions .text-button{padding:10px}.topbar .connection{display:none}.page-heading{margin:28px 0 23px;align-items:center}.page-heading h1{font-size:26px}.page-heading p{font-size:14px}.page-heading .text-button{font-size:14px;padding:9px}.leads{grid-template-columns:1fr;gap:13px}.lead-card{padding:22px}.requirement{min-height:0;margin-bottom:23px}.card-top{margin-bottom:17px}.tabs{width:100%;justify-content:space-between;gap:2px}.tab{padding:9px 10px;font-size:14px;flex:1}.count{font-size:12px;margin-left:4px}.customer-name{max-width:185px}.notice{padding:13px 12px;gap:8px}.notice>.icon{display:none}.notice-open{padding:8px 5px;font-size:14px}.notice-title{font-size:14px}.notice-description{font-size:13px}dialog{width:100%;max-width:100%;max-height:100svh;height:100svh;border-radius:0;margin:0}.dialog-head{padding:19px 20px}.dialog-body{padding:22px 20px calc(30px + env(safe-area-inset-bottom))}.dialog-head h2{font-size:20px}.detail-summary{display:block}.detail-summary .badge{margin-top:13px}.quote-box{padding:17px}.quote-foot{align-items:flex-start;flex-direction:column}.quote-foot .primary{width:100%}.conversation{max-height:45svh}.detail-actions{align-items:flex-start}.detail-actions p{max-width:165px;line-height:1.6}.auth-card{padding:32px 26px}.chat-shell{border:0}.chat-header{padding:18px 20px}.chat-body{padding:24px 20px}.chat-footer{padding:13px 16px calc(15px + env(safe-area-inset-bottom))}.chat-header .connection{font-size:12px}.message{max-width:90%}.message-meta{font-size:12px}.bubble{font-size:15px}}
.pending-message{border:1px dashed #decaa8;background:#fffaf1;border-radius:11px;padding:13px 15px;margin-top:15px;color:#876a3a}.pending-message strong{font-size:13px;font-weight:600}.pending-message p{font-size:14px;line-height:1.65;margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-shell .message.customer{align-self:flex-end;align-items:flex-end}.chat-shell .message.customer .bubble{background:#e9f2e6;border-radius:15px 3px 15px 15px}.chat-shell .message.assistant,.chat-shell .message.owner{align-self:flex-start;align-items:flex-start}.chat-shell .message.assistant .bubble,.chat-shell .message.owner .bubble{background:#f0f3ed;border-radius:3px 15px 15px 15px}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
