:root { --ink:#17211e; --muted:#64716b; --line:#dce5de; --soft:#f4f7f4; --green:#167a57; --rail:#15201b; }
* { box-sizing:border-box; }
html,body { height:100%; }
body { margin:0; overflow:hidden; background:#eef2ed; color:var(--ink); font-family:"Segoe UI","Microsoft YaHei",sans-serif; }
button,textarea { font:inherit; }
.app-shell { display:grid; grid-template-rows:58px minmax(0,1fr); height:100dvh; min-height:0; overflow:hidden; }
.topbar { position:relative; z-index:20; height:58px; display:flex; justify-content:space-between; align-items:center; padding:0 24px; background:var(--rail); color:#fff; }
.brand { color:#fff; font-weight:800; text-decoration:none; }
.identity { color:rgba(255,255,255,.75); font-size:14px; }
.account-control { position:relative; }
.account-trigger { display:flex; align-items:center; gap:9px; min-height:40px; border:1px solid rgba(255,255,255,.16); border-radius:8px; background:rgba(255,255,255,.06); color:#fff; padding:5px 10px 5px 6px; cursor:pointer; }
.account-trigger:hover,.account-trigger[aria-expanded="true"] { background:rgba(255,255,255,.13); }
.account-avatar,.profile-avatar { display:grid; place-items:center; flex:0 0 auto; width:29px; height:29px; border-radius:50%; background:#d6ff3f; color:#17211e; font-size:13px; font-weight:900; }
.account-menu { position:absolute; top:46px; right:0; width:190px; overflow:hidden; border:1px solid #cad6cd; border-radius:8px; background:#fff; box-shadow:0 18px 45px rgba(9,27,18,.22); padding:6px; }
.account-menu[hidden] { display:none; }
.account-menu button,.account-menu a { display:block; width:100%; border:0; border-radius:5px; background:transparent; color:var(--ink); padding:9px 10px; text-align:left; text-decoration:none; cursor:pointer; }
.account-menu button:hover,.account-menu a:hover { background:#edf5ef; }
.account-menu .danger { color:#a43c35; }
.workspace { display:grid; grid-template-columns:260px minmax(0,1fr) 290px; min-height:0; overflow:hidden; }
.cases-panel,.context-panel { background:#fff; padding:18px; }
.cases-panel { display:grid; grid-template-rows:auto minmax(0,1fr) auto; min-height:0; overflow:hidden; border-right:1px solid var(--line); }
.context-panel { min-height:0; overflow-y:auto; border-left:1px solid var(--line); }
.panel-heading,.conversation-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.panel-heading span,.conversation-head span,.context-panel>span { color:var(--muted); font-size:12px; font-weight:700; }
h1,h2 { margin:4px 0 0; letter-spacing:0; }
h1 { font-size:28px; } h2 { font-size:22px; }
.panel-heading button { width:34px; height:34px; border:0; border-radius:6px; background:var(--green); color:#fff; font-size:24px; }
.case-list { min-height:0; overflow-y:auto; display:grid; align-content:start; gap:7px; margin-top:20px; color:var(--muted); font-size:14px; }
.case-list button { display:grid; gap:5px; border:1px solid transparent; border-radius:6px; background:transparent; padding:11px; text-align:left; color:var(--ink); }
.case-list button:hover,.case-list button.active { border-color:#b9dacb; background:#ecf8f1; }
.case-list span { color:var(--muted); font-size:12px; }
.sidebar-settings { display:flex; align-items:center; gap:9px; width:100%; margin-top:12px; border:1px solid var(--line); border-radius:7px; background:#f7f9f6; color:var(--ink); padding:10px 12px; cursor:pointer; }
.sidebar-settings:hover { border-color:#a9c8b6; background:#eef6f0; }
.conversation { display:grid; grid-template-rows:auto auto minmax(0,1fr) auto; min-height:0; height:100%; overflow:hidden; }
.conversation-head { padding:22px 26px; border-bottom:1px solid var(--line); background:#fff; }
.conversation-head a { color:var(--green); font-weight:700; text-decoration:none; }
.product-shelf { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:12px 26px; border-bottom:1px solid var(--line); background:#f8faf7; }
.product-card { position:relative; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:2px 12px; overflow:hidden; border:1px solid #cbd8ce; border-radius:8px; background:#fff; color:var(--ink); padding:12px 15px; text-align:left; cursor:pointer; }
.product-card::before { content:""; grid-row:1/4; width:4px; height:100%; border-radius:4px; background:#8aa499; }
.product-card.route-energy::before { background:#e58b2e; }
.product-card.provider-search::before { background:#2c6fa3; }
.product-card span { color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.product-card strong { font-size:16px; }
.product-card small { color:var(--muted); }
.product-card:hover { border-color:#75ad90; box-shadow:0 7px 18px rgba(29,72,52,.08); transform:translateY(-1px); }
.messages { min-height:0; display:grid; align-content:start; gap:14px; overflow-y:auto; overscroll-behavior:contain; padding:28px; }
.message { max-width:min(720px,86%); border:1px solid var(--line); border-radius:8px; background:#fff; padding:13px 15px; line-height:1.55; }
.message p { margin:6px 0 0; white-space:pre-wrap; }
.message.user { justify-self:end; border-color:#b8dbc9; background:#eff9f3; }
.transcript-result-card { display:grid; gap:4px; margin-top:12px; border:1px solid #bfd2c5; border-left:4px solid #e58b2e; border-radius:7px; background:#f8fbf8; color:var(--ink); padding:11px 13px; text-decoration:none; }
.transcript-result-card span { color:var(--muted); font-size:11px; font-weight:700; }
.transcript-result-card strong { font-size:14px; }
.transcript-result-card small { color:var(--green); font-weight:700; }
.transcript-result-card:hover { border-color:#75ad90; background:#f1f8f3; }
.transcript-result-card:not(a) { border-left-color:#c18b25; cursor:default; }
.transcript-confirmation-actions { display:flex; gap:8px; margin-top:7px; }
.transcript-confirmation-actions button { border:1px solid #9eb6a6; border-radius:5px; background:#fff; color:var(--ink); padding:6px 10px; cursor:pointer; }
.transcript-confirmation-actions button:first-child { border-color:var(--green); background:var(--green); color:#fff; }
.transcript-confirmation-actions button:disabled { cursor:wait; opacity:.55; }
.message.product-message { width:min(820px,96%); max-width:96%; border-color:#c7d4ca; padding:0; overflow:hidden; }
.message.product-message>b { display:block; border-bottom:1px solid var(--line); background:#17211e; color:#fff; padding:11px 15px; font-size:13px; }
.product-message-body { display:grid; gap:14px; padding:16px; }
.product-intro { border-left:4px solid var(--green); padding:3px 0 3px 12px; }
.product-intro.carrier-detail { border-left-color:#e58b2e; }
.product-intro span { color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.1em; }
.product-intro h3 { margin:3px 0 4px; font-size:19px; }
.product-intro p { margin:0; color:var(--muted); line-height:1.5; }
.route-energy-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; border:1px solid var(--line); border-radius:7px; background:#f7f9f6; padding:13px; }
.route-energy-form label { display:grid; gap:5px; color:var(--muted); font-size:12px; font-weight:700; }
.route-energy-form label.wide { grid-column:1/-1; }
.route-energy-form input,.route-energy-form select,.route-energy-form textarea { width:100%; min-height:38px; border:1px solid #b9c8bc; border-radius:5px; background:#fff; color:var(--ink); padding:7px 9px; }
.location-fieldset { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 10px; margin:0; border:1px solid #c9d5cb; border-radius:6px; background:#fff; padding:10px; }
.location-fieldset legend { color:var(--ink); font-weight:900; padding:0 5px; }
.location-fieldset>span { grid-column:1/-1; color:var(--muted); font-size:11px; }
.location-fieldset details { grid-column:1/-1; border-top:1px dashed var(--line); padding-top:7px; }
.location-fieldset summary { color:var(--green); cursor:pointer; font-size:12px; font-weight:800; }
.coordinate-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
.map-pick-button { align-self:end; min-height:38px!important; border:1px solid #d28a3a!important; background:#fff7ec!important; color:#94500b!important; }
.route-energy-form button,.product-link,.route-energy-result>a { align-self:end; min-height:39px; border:0; border-radius:5px; background:var(--green); color:#fff; padding:9px 14px; font-weight:800; text-align:center; text-decoration:none; }
.route-control-link { display:inline-flex; align-items:center; justify-content:center; min-height:42px; margin-top:7px; padding:9px 14px; color:#10211d !important; background:#d6ff3f !important; border:1px solid #a9c92d !important; font-weight:900; text-decoration:none; }
.route-control-link::after { content:"↗"; margin-left:9px; }
.route-energy-form button:disabled { opacity:.55; }
.provider-search-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; border:1px solid #c8d8e5; border-radius:7px; background:#f3f8fb; padding:13px; }
.provider-search-form label { display:grid; gap:5px; color:var(--muted); font-size:12px; font-weight:700; }
.provider-search-form label.wide { grid-column:1/-1; }
.provider-search-form input,.provider-search-form select { width:100%; min-height:38px; border:1px solid #aec4d4; border-radius:5px; background:#fff; color:var(--ink); padding:7px 9px; }
.provider-search-form button,.provider-selection-form button { min-height:39px; border:0; border-radius:5px; background:#245f96; color:#fff; padding:9px 14px; font-weight:800; }
.provider-search-intro { border-left:4px solid #245f96; }
.provider-search-results,.provider-selection-form { display:grid; gap:9px; }
.provider-search-policy { display:flex; justify-content:space-between; gap:12px; border:1px solid #c8d8e5; border-radius:6px; background:#edf5fa; padding:10px 12px; }
.provider-search-policy span { color:var(--muted); font-size:12px; }
.provider-result { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:start; border:1px solid #d2dde5; border-radius:7px; background:#fff; padding:11px; cursor:pointer; }
.provider-result input { margin-top:4px; }
.provider-result span { display:grid; gap:3px; }
.provider-result small,.provider-result em { color:var(--muted); font-size:12px; font-style:normal; }
.provider-result:has(input:checked) { border-color:#245f96; box-shadow:0 0 0 2px rgba(36,95,150,.1); }
.route-energy-result { display:grid; gap:10px; border:1px solid #d3ddd5; border-radius:7px; background:#fff; padding:13px; }
.route-energy-result.shipper-summary { background:#f6faf7; }
.route-energy-result.carrier-detail { border-color:#e2c39e; background:#fffaf3; }
.inquiry-summary { display:grid; gap:4px; border-bottom:1px solid var(--line); padding:8px 0 11px; }
.inquiry-summary:last-child { border-bottom:0; }
.inquiry-summary>span { justify-self:start; border-radius:3px; background:#e6efe9; color:#35634d; padding:2px 6px; font-size:10px; font-weight:800; text-transform:uppercase; }
.inquiry-summary small,.inquiry-summary p { margin:0; color:var(--muted); }
.inquiry-summary div { display:flex; flex-wrap:wrap; gap:10px; margin-top:5px; }
.inquiry-summary em { color:#83511a; font-style:normal; font-weight:700; }
.result-verdict { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #ead7bf; padding-bottom:9px; }
.result-verdict strong { font-size:20px; }
.result-verdict.feasible strong { color:#167a57; }
.result-verdict.conditional strong { color:#a65b11; }
.result-verdict.infeasible strong { color:#a43c35; }
.route-energy-result dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; }
.route-energy-result dl div { border:1px solid #e8ddce; border-radius:5px; background:#fff; padding:8px; }
.route-energy-result dt { color:var(--muted); font-size:11px; }
.route-energy-result dd { margin:3px 0 0; font-weight:800; }
.route-energy-result ol { display:grid; gap:6px; margin:0; padding-left:22px; }
.route-energy-result li span { display:block; color:var(--muted); font-size:12px; }
.product-empty,.product-loading { color:var(--muted); }
.product-error { color:#a43c35; }
.map-picker-dialog { width:min(880px,94vw); max-width:none; border:0; border-radius:10px; padding:0; box-shadow:0 24px 80px rgba(12,28,21,.35); }
.settings-dialog { width:min(520px,92vw); max-width:none; border:0; border-radius:10px; padding:0; box-shadow:0 24px 80px rgba(12,28,21,.35); }
.settings-dialog::backdrop { background:rgba(12,22,18,.56); }
.settings-shell { display:grid; gap:0; }
.settings-shell>header,.settings-shell>footer { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 18px; }
.settings-shell>header { background:#17211e; color:#fff; }
.settings-shell>header span { color:#a9beb4; font-size:10px; font-weight:800; letter-spacing:.12em; }
.settings-shell h3 { margin:2px 0 0; }
.settings-shell>header button { border:0; background:transparent; color:#fff; font-size:25px; }
.profile-summary { display:flex; align-items:center; gap:13px; border-bottom:1px solid var(--line); padding:18px; }
.profile-summary .profile-avatar { width:44px; height:44px; font-size:18px; }
.profile-summary div { display:grid; gap:3px; }
.profile-summary span:not(.profile-avatar) { color:var(--muted); font-size:13px; }
.profile-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:0; padding:16px 18px; }
.profile-fields div { border:1px solid var(--line); border-radius:6px; background:var(--soft); padding:10px; }
.profile-fields dt { color:var(--muted); font-size:11px; }
.profile-fields dd { overflow:hidden; margin:4px 0 0; font-weight:800; text-overflow:ellipsis; white-space:nowrap; }
.setting-option { display:flex; align-items:flex-start; gap:10px; margin:0 18px; border-top:1px solid var(--line); padding:16px 0; cursor:pointer; }
.setting-option input { margin-top:3px; }
.setting-option span { display:grid; gap:3px; }
.setting-option small { color:var(--muted); }
.settings-shell>footer { justify-content:flex-end; border-top:1px solid var(--line); }
.settings-shell>footer button { border:0; border-radius:6px; background:var(--green); color:#fff; padding:9px 18px; font-weight:800; }
.map-picker-dialog::backdrop { background:rgba(12,22,18,.68); }
.map-picker-shell { display:grid; grid-template-rows:auto minmax(360px,65vh) auto auto; }
.map-picker-shell header,.map-picker-shell footer { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 16px; }
.map-picker-shell header { background:#17211e; color:#fff; }
.map-picker-shell header span { color:#a9beb4; font-size:10px; font-weight:800; letter-spacing:.12em; }
.map-picker-shell h3 { margin:2px 0 0; }
.map-picker-shell header button { border:0; background:transparent; color:#fff; font-size:25px; }
.map-picker-canvas { min-height:360px; background:#dfe7df; }
.map-picker-shell>p { margin:0; border-top:1px solid var(--line); padding:10px 16px; color:var(--muted); }
.map-picker-shell footer { justify-content:flex-end; }
.map-picker-shell footer button { min-height:38px; border:1px solid #b7c6bb; border-radius:5px; background:#fff; padding:7px 14px; font-weight:800; }
.map-picker-shell footer button:last-child { border-color:var(--green); background:var(--green); color:#fff; }
.map-picker-shell footer button:disabled { opacity:.5; }
.composer { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; border-top:1px solid var(--line); background:#fff; padding:16px 24px; }
.composer textarea { resize:vertical; min-height:58px; border:1px solid #b7c6bb; border-radius:6px; padding:10px; }
.composer button { align-self:end; min-height:42px; border:0; border-radius:6px; background:var(--green); color:#fff; padding:0 18px; font-weight:700; }
.context-summary { margin-top:12px; border:1px solid var(--line); border-radius:6px; background:var(--soft); padding:12px; color:var(--muted); white-space:pre-wrap; line-height:1.5; }
.provenance-list { display:grid; gap:7px; margin-top:12px; }
.provenance-list article { display:grid; gap:3px; border-left:3px solid #7db899; background:#f7faf7; padding:9px; }
.provenance-list b { font-size:13px; }
.provenance-list span { color:var(--muted); font-size:12px; }
.task-list { display:grid; gap:8px; margin-top:16px; }
.task-list article { display:grid; gap:4px; border-left:3px solid var(--green); background:var(--soft); padding:10px; }
.task-list span { color:var(--muted); font-size:13px; line-height:1.4; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
@media (max-width:900px) { .workspace { grid-template-columns:220px minmax(0,1fr); } .context-panel { display:none; } }
@media (max-width:620px) { .topbar { padding:0 14px; } .workspace { grid-template-columns:minmax(0,1fr); } .cases-panel { display:none; } .conversation-head { padding:16px; } .product-shelf,.route-energy-form,.provider-search-form { grid-template-columns:1fr; } .product-shelf { max-height:130px; overflow-y:auto; padding:8px 16px; } .messages { padding:18px 16px; } .composer { padding:12px 14px; } .route-energy-form label.wide,.provider-search-form label.wide { grid-column:auto; } .route-energy-result dl { grid-template-columns:1fr 1fr; } .provider-search-policy { flex-direction:column; } }
