:root{font-family:"Microsoft YaHei","Segoe UI",sans-serif;font-size:14px;color:#253b30;background:#f5f7f5;--green:#087d58;--line:#dce5df;--muted:#6c8073}
.share-history{flex:none;text-align:left;border-width:1px 0;border-radius:0;padding:14px 0;background:transparent;width:100%;font-size:14px}
dialog.history-picker{width:min(760px,94vw);height:min(720px,90dvh);padding:0;overflow:hidden}
.history-picker[open]{display:flex;flex-direction:column}.history-picker header{padding:20px 24px;border-bottom:1px solid var(--line);flex:none}.history-picker h2{margin:0}.history-picker header p{margin-bottom:0}
.history-hint{padding:0 24px;flex:none}#history-list{overflow:auto;min-height:0;flex:1}.history-picker .history-row{display:flex;align-items:flex-start;gap:14px;padding:16px 24px;border-bottom:1px solid var(--line);margin:0;cursor:pointer}
.history-row input{margin:8px 0 0;flex:none;width:18px;height:18px}.history-row>span{min-width:0}.history-row small{display:block;color:var(--muted);margin-bottom:8px}.history-body{display:block;white-space:pre-wrap;overflow-wrap:anywhere;background:#edf4ef;padding:12px;border-radius:6px}
.history-picker footer{flex:none;flex-wrap:wrap;padding:16px 24px;border-top:1px solid var(--line);margin:0}.history-picker #history-status{flex:none;margin:8px 24px}.history-picker button{min-height:40px}
#create-order-dialog{max-height:90dvh;overflow:auto}.picker-new-order-title{width:100%;padding:10px;font:inherit;border:1px solid var(--line);border-radius:5px;margin-bottom:20px}.picker-create-order-status{overflow-wrap:anywhere}#orders strong{overflow-wrap:anywhere}#orders small{overflow-wrap:anywhere}#create-order{flex:none}.chat-head h2{overflow-wrap:anywhere}.chat-head{min-height:85px;height:auto}
#auth-panel{padding:36px 20px;min-height:calc(100dvh - 108px)}#auth-form{max-width:400px;margin:0 auto;background:white;border:1px solid var(--line);border-radius:8px;padding:26px}#auth-form h1{font-size:23px;margin:0 0 12px}#auth-form p{line-height:1.8;color:var(--muted)}#auth-form label{display:block;margin:16px 0 7px}#auth-form input{width:100%;font:inherit;padding:11px;border:1px solid #bacfc1;border-radius:5px}#auth-form button{margin:8px 8px 8px 0}#auth-form small{display:block;font-size:11px;color:var(--muted);line-height:1.8;margin-top:14px}#auth-error{color:#9b361f!important;min-height:1.8em}#account-actions{display:flex;align-items:center;gap:12px;font-size:12px}
*{box-sizing:border-box}body{margin:0}button,select,textarea{font:inherit}button{cursor:pointer;border:1px solid #ccdcd1;border-radius:6px;padding:8px 12px;color:#315740;background:white}button:disabled{opacity:.45;cursor:not-allowed}button:hover:not(:disabled){background:#eef6f0}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover:not(:disabled){background:#096949}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--green);outline-offset:2px}[hidden]{display:none!important}
.appbar{height:70px;background:white;display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:20px;border-bottom:1px solid var(--line)}.brand{display:flex;gap:11px;align-items:center}.brand b{display:grid;place-items:center;width:38px;height:38px;border-radius:9px;background:var(--green);color:white;font-size:24px}.brand strong{font-size:18px}.brand small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.appbar>label{display:flex;align-items:center;gap:10px;font-size:12px}.appbar select{padding:8px;border:1px solid var(--line);border-radius:5px;background:white}.badge{font-size:11px;background:#faf2de;color:#8f6829;padding:6px 12px;border-radius:20px}
#notice{height:38px;display:flex;align-items:center;padding:0 24px;font-size:12px;background:#edf5ef;color:#3d7151;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#notice.error{background:#fff0df;color:#965b1d}
.workspace{display:grid;grid-template-columns:245px minmax(350px,1fr) 365px;height:calc(100dvh - 108px)}.sidebar{background:#eef2ef;border-right:1px solid var(--line);padding:22px 15px;display:flex;flex-direction:column;min-height:0}.sidebar h1{font-size:22px;margin:0 8px 12px}.sidebar p,.sidebar footer{font-size:11px;line-height:1.9;color:var(--muted);padding:0 8px}.sidebar footer{margin-top:auto;padding-top:22px}#orders{overflow:auto}#orders button{width:100%;display:block;text-align:left;margin:12px 0;padding:15px 12px;border-color:transparent;background:none}#orders small{display:block;font-size:11px;color:var(--muted);margin-top:8px}#orders .selected{background:#d6e9de;border-color:#bed9c9}
.chat{display:flex;flex-direction:column;min-height:0;min-width:0}.chat-head{height:85px;padding:18px 25px;background:white;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}.chat-head h2{font-size:19px;margin:5px 0}.chat-head small{color:var(--muted);font-size:11px}.scope{padding:12px 24px;background:#e4f0e8;font-size:12px;line-height:1.7;flex:none;overflow-wrap:anywhere}.messages{overflow:auto;flex:1;padding:22px 25px;min-height:0}.message{max-width:90%;margin:0 0 22px}.message.mine{margin-left:auto}.message small{font-size:10px;color:var(--muted)}.message p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;background:white;border:1px solid var(--line);padding:12px 16px;border-radius:8px;font-size:13px;margin:7px 0}.mine p{background:#d8ecdf;border-color:#c7dfcf}.message>span{font-size:10px;color:var(--muted)}.message>span button{padding:4px 8px;font-size:11px;color:#93691f}.empty{color:var(--muted);font-size:12px;line-height:2}
#send-form{padding:13px 22px;background:white;border-top:1px solid var(--line);flex:none}#send-form>label{font-size:11px;color:var(--muted)}textarea{width:100%;resize:none;border:1px solid var(--line);padding:9px 12px;border-radius:5px;min-height:65px;line-height:1.7;margin:8px 0}#send-form>div{display:flex;justify-content:space-between;align-items:center;gap:10px}#send-help{font-size:10px;color:var(--muted)}
.details{background:white;border-left:1px solid var(--line);min-height:0;display:flex;flex-direction:column}.details>header{padding:18px 22px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;flex:none}.details h2{font-size:16px;margin:0}.detail-scroll{overflow:auto;flex:1}.details section{padding:20px 22px;border-bottom:1px solid var(--line)}h3{font-size:13px;margin:0 0 12px}h3 small{font-weight:400;color:var(--muted);font-size:10px}.details p{font-size:11px;color:var(--muted);line-height:1.9}.details button{margin:5px 5px 0 0;font-size:12px}dl{margin:0}dt{font-size:10px;color:var(--muted);margin:15px 0 6px}dd{margin:0;overflow-wrap:anywhere;line-height:1.8;font-size:12px}.operation{border-left:2px solid #91b6a0;padding:4px 0 4px 11px;margin-bottom:14px}.operation strong{font-size:12px}.operation small{display:block;font-size:10px;color:var(--muted);margin:6px 0}.operation p{margin:0}
dialog{width:min(450px,90vw);border:1px solid var(--line);border-radius:10px;padding:24px;color:#253b30}dialog::backdrop{background:#16362755}dialog h2{font-size:18px}dialog p{font-size:12px;line-height:1.8;color:var(--muted)}dialog label{display:block;padding:10px 0;font-size:13px}dialog input{accent-color:var(--green);margin-right:8px}dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}#details-toggle,#details-close{display:none}
.chat-head-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;flex-shrink:0}.participant-shortcut{display:none}.chat-head>div:first-child{min-width:0;overflow-wrap:anywhere}
@media(max-width:1050px){.workspace{grid-template-columns:220px minmax(0,1fr)}.details{display:none}.details.open{display:flex;position:fixed;top:108px;bottom:0;right:0;width:min(365px,100vw);z-index:3;box-shadow:-8px 0 26px #203c3025}#details-toggle,#details-close,.participant-shortcut:not([hidden]){display:block}.badge{display:none}}
@media(max-width:650px){.chat-head{flex-wrap:wrap;gap:8px}.chat-head-actions{width:100%;justify-content:flex-start}.chat-head-actions button{font-size:11px;padding:8px}}
@media(max-width:650px){.appbar{padding:0 10px;gap:8px}.brand strong{font-size:15px}.brand small{display:none}.appbar>label{font-size:0;gap:0}.appbar select{font-size:11px;max-width:195px}.workspace{grid-template-columns:145px minmax(0,1fr)}.sidebar{padding:16px 6px}.sidebar h1{font-size:17px}.sidebar p{display:none}#orders strong{font-size:11px}#orders button{padding:12px 5px}.chat-head{padding:14px 12px}.chat-head h2{font-size:16px}.scope{padding:9px 12px;font-size:11px}.messages{padding:14px 10px}.message{max-width:98%}.message p{font-size:12px;padding:9px}#send-form{padding:10px}#send-help{font-size:9px}#notice{padding:0 10px;font-size:11px}}
/* Person picker follows the supplied two-pane reference; retains the application's green actions. */
dialog.person-picker{width:min(960px,94vw);height:min(680px,92dvh);max-height:92dvh;padding:0;border-radius:12px;overflow:hidden;background:white}
.person-picker form{display:grid;grid-template-columns:44% 56%;height:100%;min-height:0}
.person-picker .picker-directory{background:#f5f6f7;padding:26px 22px;display:flex;flex-direction:column;min-width:0;min-height:0}
.person-picker .picker-search{display:flex;align-items:center;gap:10px;background:#e9ebee;border-radius:6px;padding:10px 13px;margin:0 0 20px;flex:none}
.picker-search>span{font-size:26px;line-height:1;color:#66717b}
.person-picker .picker-search input{width:100%;min-width:0;margin:0;border:0;background:transparent;font:inherit;font-size:15px;padding:3px}
.person-picker .picker-order-contacts{overflow:auto;min-height:0;flex:1;padding-right:4px}
.person-picker details{margin:0 0 10px}
.person-picker summary{display:flex;align-items:center;gap:9px;cursor:pointer;padding:11px 8px;border-radius:5px;background:#e9ecec;font-size:14px}
.person-picker summary::before{content:'▸';color:#7b848a}.person-picker details[open]>summary::before{content:'▾'}
.person-picker summary span{flex:1;overflow-wrap:anywhere}.person-picker summary small{color:#6f7c75}
.person-picker input[type=checkbox]{width:18px;height:18px;margin:0;flex:none;accent-color:var(--green);cursor:pointer}
.person-picker .person-row{display:flex;align-items:center;gap:12px;padding:12px 8px 12px 27px;cursor:pointer}
.person-row:hover{background:#eaf0ec;border-radius:5px}
.person-avatar{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:5px;color:#367255;background:#dceae2;font-size:17px;font-weight:600}
.person-caption{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}.person-caption strong{font-size:14px;font-weight:400;overflow-wrap:anywhere}.person-caption small{font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.person-picker .picker-selection{padding:32px 28px 26px;display:flex;flex-direction:column;min-width:0;min-height:0}
.picker-selection>header{display:flex;align-items:center;gap:16px;padding-right:12px;margin-bottom:24px;flex:none}
.picker-selection h2{font-size:21px;margin:0;flex:1}.picker-selection .picker-selected-count{font-size:13px;color:#78817b;white-space:nowrap}
.person-picker .picker-order-name{flex:none}.person-picker .picker-order-name label{padding:0 0 8px;font-size:13px}
.person-picker .picker-new-order-title{margin:0 0 20px;width:100%;padding:11px 12px;font:inherit;border:1px solid #d5dcd8;border-radius:5px}
.picker-selection h3{font-size:14px;margin:0 0 5px;flex:none}.person-picker .picker-hint{margin:0 0 12px;line-height:1.6;font-size:12px;flex:none}
.picker-selected-people{flex:1;min-height:70px;overflow:auto}
.selected-person{display:flex;align-items:center;gap:12px;padding:10px 0}.selected-person>button{border:0;background:transparent;color:#78817b;font-size:23px;padding:2px 8px;flex:none}
.person-fixed{font-size:10px;color:#859187;white-space:nowrap}.person-picker .picker-empty{padding:18px 5px;color:#78817b;font-size:13px;line-height:1.8}
.person-picker .picker-create-order-status{flex:none;min-height:20px;margin:12px 0 0;line-height:1.6;font-size:12px;color:#866520}
.person-picker footer{display:flex;gap:14px;margin-top:16px;flex:none}.person-picker footer button{flex:1;padding:11px 8px;min-width:0}
.person-picker .picker-close{position:absolute;right:8px;top:5px;border:0;padding:2px 8px;background:transparent;color:#8a9298;font-size:25px}
@media(max-width:600px){
 dialog.person-picker{width:96vw;height:94dvh;max-height:94dvh}
 .person-picker form{grid-template-columns:46% 54%}.person-picker .picker-directory{padding:34px 8px 14px}.person-picker .picker-selection{padding:35px 10px 14px}
 .person-picker .picker-search{padding:8px 5px;gap:3px;margin-bottom:14px}.person-picker .picker-search input{font-size:12px}.picker-search>span{font-size:20px}
 .picker-selection>header{display:block;margin-bottom:15px;padding:0}.picker-selection h2{font-size:17px;margin-bottom:6px}.picker-selection .picker-selected-count{font-size:11px}
 .person-picker summary{font-size:12px;padding:9px 4px;gap:5px}.person-picker .person-row{padding:10px 3px;gap:6px}
 .person-avatar{width:26px;height:26px;font-size:13px}.person-caption strong{font-size:12px}.person-caption small{font-size:10px}
 .selected-person{gap:6px;flex-wrap:wrap}.person-fixed{width:100%;padding-left:32px}.person-picker footer{gap:5px}.person-picker footer button{font-size:12px;padding:10px 4px}
}
.order-unread{display:inline-block;margin-left:8px;padding:2px 6px;border-radius:9px;background:#b42318;color:#fff;font-size:11px;line-height:1.4;vertical-align:middle;white-space:nowrap}
