@charset "UTF-8";
:root{--navy:#172b42;--navy-deep:#142338;--green:#2e627f;--green-dark:#214c68;--green-pale:#edf3f7;--ink:#233346;--muted:#67788a;--border:#e1e7ee;--bg:#f4f6f9;--white:#fff;--red:#b83c40;--shadow:0 8px 28px #17304a05;font-family:Inter,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;font-size:14px;line-height:1.6}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button[aria-busy="true"],form[aria-busy="true"] button:disabled{cursor:wait}a{color:var(--green);text-decoration:none}a:hover{text-decoration:underline}button{border:0}svg{width:20px;height:20px;flex:none;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,p{margin-top:0}h1{font-size:27px;letter-spacing:-.6px;line-height:1.35;margin-bottom:8px}h2{font-size:17px;letter-spacing:-.2px;margin-bottom:0}h3{font-size:15px}p{margin-bottom:12px}.muted{color:var(--muted)}.small{font-size:12px}.mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px}.nowrap{white-space:nowrap}.pre{white-space:pre-wrap;overflow-wrap:anywhere}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}.grow{flex:1}.stack{display:grid;gap:20px}.hidden{display:none!important}.spacer{height:20px}.divider{height:1px;background:var(--border);margin:22px 0}.eyebrow{font-size:11px;letter-spacing:1.7px;text-transform:uppercase;font-weight:700;color:var(--muted);margin-bottom:7px}
:focus-visible{outline:3px solid #68b6a4;outline-offset:3px}input,select,textarea{width:100%;padding:11px 13px;border:1px solid #d9e3db;background:#fff;color:var(--ink);border-radius:8px;min-height:44px;transition:border-color .15s,box-shadow .15s}input:focus,select:focus,textarea:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 3px #2e627f16}input[type=checkbox]{width:17px;min-height:17px;accent-color:var(--green)}input[type=file]{padding:9px}textarea{min-height:100px;resize:vertical}label.field{display:grid;gap:7px;font-size:13px;font-weight:600;align-content:start}label.field small{font-weight:400;color:var(--muted)}.checkbox{display:flex;align-items:center;gap:9px;font-size:13px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.full{grid-column:1/-1}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 17px;border-radius:8px;border:1px solid var(--border);background:white;font-weight:600;font-size:13px;white-space:nowrap;color:var(--ink);transition:background .15s,transform .15s}.btn:hover{background:#eef3ef;text-decoration:none}.btn:active{transform:translateY(1px)}.btn.primary{background:var(--green);color:white;border-color:var(--green)}.btn.primary:hover{background:var(--green-dark)}.btn.ghost{background:transparent;border-color:transparent;color:var(--muted)}.btn.danger{color:var(--red);border-color:#f0d8d8}.btn.icon{width:42px;padding:10px}.text-btn{background:none;color:var(--green);padding:8px;font-weight:600}.actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.form-actions{display:flex;gap:10px;justify-content:flex-end;border-top:1px solid var(--border);padding-top:20px;margin-top:24px}.error{background:#fff0ef;border:1px solid #f4d6d3;color:#a73535;border-radius:8px;padding:13px 16px}.notice{background:#f0f6f3;border:1px solid #dce9e1;color:#426452;border-radius:9px;padding:14px 17px;font-size:13px}.badge{display:inline-flex;align-items:center;border-radius:5px;padding:3px 9px;line-height:1.6;background:#edf2ee;color:#52655a;font-size:12px;font-weight:500;white-space:nowrap}.badge.green{color:#16744a;background:#e6f5eb}.badge.amber{color:#9b6817;background:#fff4d9}.badge.red{color:#b24045;background:#fcebec}.badge.blue{color:#3d69a4;background:#eaf1fd}.dot{display:inline-block;width:6px;height:6px;background:currentColor;border-radius:50%;margin-right:6px}
.shell{min-height:100vh;display:grid;grid-template-columns:236px minmax(0,1fr)}.sidebar{background:var(--navy-deep);color:#adbdcf;padding:30px 17px 20px;position:fixed;inset:0 auto 0 0;width:236px;display:flex;flex-direction:column;z-index:30}.brand{display:flex;align-items:center;gap:11px;color:white;padding:0 12px 32px}.brand-mark{display:grid;place-items:center;width:37px;height:39px;background:#86b3c9;border-radius:11px;color:#173249;font-weight:800;font-size:23px}.brand-name{font-size:21px;font-weight:700;letter-spacing:1px}.brand-sub{font-size:9px;letter-spacing:2.3px;color:#92a9bd}.nav-label{font-size:10px;color:#8497af;letter-spacing:1.5px;padding:18px 15px 10px}.nav-link{display:flex;align-items:center;gap:13px;width:100%;color:#adbdcf;text-decoration:none;padding:12px 15px;margin:4px 0;border-radius:8px;font-weight:500;font-size:13px}.nav-link svg{width:19px;height:19px;opacity:.85}.nav-link:hover{color:white;background:#ffffff08;text-decoration:none}.nav-link.active{color:#edf5ff;background:#29435e}.nav-link.active:after{content:"";height:6px;width:6px;background:#93bcd4;border-radius:50%;margin-left:auto}.sidebar-footer{margin-top:auto;padding:18px 12px 0}.workspace-state{border:1px solid #ffffff14;border-radius:9px;padding:12px;font-size:11px;color:#9daec1;margin-bottom:20px}.workspace-state strong{display:block;color:#d9e3ed;font-size:12px;margin-bottom:4px}.user-chip{display:flex;gap:10px;align-items:center}.avatar{width:35px;height:35px;display:grid;place-items:center;border-radius:10px;background:#edf3ee;color:var(--green);font-weight:600;flex:none}.sidebar .avatar{background:#2b3f56;color:#c4d8e8}.user-chip .name{color:white;font-size:12px}.user-chip .role{font-size:10px;color:#99acc0}.shell-main{grid-column:2;min-width:0}.topbar{height:78px;background:#fff;border-bottom:1px solid var(--border);padding:0 34px;display:flex;align-items:center;justify-content:space-between;gap:15px}.crumb{font-size:12px;color:var(--muted);display:flex;gap:12px;align-items:center}.crumb strong{color:#40556b;font-weight:500}.tenant-select{max-width:220px;min-height:36px;padding:7px 30px 7px 10px;font-size:12px}.top-date{font-size:12px;color:var(--muted)}.mobile-toggle{display:none}.content{max-width:1640px;padding:34px;margin:0 auto}.page-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:28px}.page-heading p{color:var(--muted);font-size:13px;margin:0}.panel{background:white;border:1px solid var(--border);border-radius:9px;box-shadow:var(--shadow);overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:21px 23px;border-bottom:1px solid var(--border)}.panel-body{padding:23px}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.stat{background:white;border:1px solid var(--border);border-radius:12px;padding:22px 23px;box-shadow:var(--shadow);position:relative}.stat-title{font-size:12px;color:var(--muted);margin-bottom:15px}.stat-value{font-size:34px;font-weight:650;line-height:1.2;letter-spacing:-1px}.stat-foot{font-size:11px;color:var(--muted);margin-top:15px}.stat-icon{position:absolute;top:20px;right:21px;background:#f2f7f3;border-radius:10px;color:var(--green);padding:10px}.stat:first-child{background:#eef3f8;border-color:#dce5ef}.dashboard-grid{display:grid;grid-template-columns:1.65fr 1fr;gap:20px}.chart-row{display:grid;grid-template-columns:74px 1fr 32px;gap:12px;align-items:center;margin:18px 0;font-size:12px}.bar-track{height:9px;background:#eff2f6;border-radius:5px;overflow:hidden}.bar-fill{background:#7195b3;height:100%;border-radius:5px}.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.quick-link{padding:17px;border:1px solid var(--border);border-radius:9px;color:var(--ink);display:flex;flex-direction:column;gap:9px}.quick-link:hover{background:var(--green-pale);border-color:#bad7c8;text-decoration:none}.quick-link svg{color:var(--green)}.quick-link span{font-size:12px;color:var(--muted)}.toolbar{display:flex;gap:10px;align-items:center;padding:18px 22px;border-bottom:1px solid var(--border);flex-wrap:wrap}.toolbar input{width:260px}.toolbar select{width:150px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap;font-size:12px}th{background:#fafbfd;font-weight:500;color:#7c8a81;letter-spacing:.2px}th,td{padding:15px 21px;border-bottom:1px solid #edf0f4}td{color:#4c6075}tbody tr:last-child td{border:0}tbody tr:hover{background:#fafbfd}td strong{font-weight:600;color:var(--ink)}.table-foot{padding:14px 22px;border-top:1px solid var(--border);font-size:12px;color:var(--muted)}.empty{text-align:center;padding:52px 24px;color:var(--muted)}.empty-icon{margin:0 auto 14px;width:53px;height:53px;display:grid;place-items:center;border-radius:15px;color:#7795af;background:#edf2f7}.empty h3{color:#3e5269;margin-bottom:7px;font-weight:600}.empty p{font-size:12px;margin-bottom:0}.loading{display:flex;justify-content:center;align-items:center;gap:12px;min-height:180px;color:var(--muted)}.loader{display:inline-block;width:22px;height:22px;border:2px solid #dbe7dd;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite}.initial-loading{display:grid;place-content:center;justify-items:center;height:100vh;gap:16px}.details-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:20px}.kv{display:grid;grid-template-columns:100px 1fr;gap:12px;font-size:13px;margin:13px 0}.kv dt{color:var(--muted)}.kv dd{margin:0;overflow-wrap:anywhere}.tabs{display:flex;border-bottom:1px solid var(--border);padding:0 23px;gap:24px;overflow:auto}.tab{padding:17px 0;background:none;color:var(--muted);border-bottom:2px solid transparent;white-space:nowrap}.tab.active{color:var(--green);border-color:var(--green);font-weight:600}.timeline{padding:4px 0 0 6px}.timeline-entry{padding:0 0 25px 24px;position:relative;border-left:1px solid #dce7de}.timeline-entry:before{content:"";position:absolute;left:-5px;top:6px;width:9px;height:9px;border-radius:50%;background:#6bac89;border:2px solid white;box-shadow:0 0 0 1px #bad9c6}.timeline-entry:last-child{border-color:transparent;padding-bottom:0}.timeline-entry h3{margin-bottom:5px}.timeline-entry p{font-size:13px;margin:9px 0;overflow-wrap:anywhere}.attachments{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.attachment{font-size:12px;border:1px solid var(--border);border-radius:6px;padding:6px 9px;display:flex;gap:6px;align-items:center}.attachment svg{width:14px}.record-actions{display:flex;gap:5px;margin-top:10px}.record-actions button{font-size:11px}.item-row{display:grid;grid-template-columns:1.3fr 1fr .65fr .6fr 40px;gap:8px;margin-bottom:10px}.item-row input{min-width:0}.item-head{font-size:12px;color:var(--muted)}.import-stats{display:flex;gap:26px;flex-wrap:wrap;padding:18px 0}.import-stats strong{font-size:24px;color:var(--green);margin-right:7px}.chat-layout{display:grid;grid-template-columns:290px minmax(0,1fr);height:calc(100vh - 212px);min-height:530px}.conversation-list{border-right:1px solid var(--border);overflow:auto}.conversation-item{display:block;width:100%;background:white;padding:18px 20px;text-align:left;border-bottom:1px solid var(--border)}.conversation-item:hover,.conversation-item.active{background:#edf3f8}.conversation-item strong{font-size:13px;display:block;margin-bottom:5px}.conversation-item .muted{font-size:11px}.chat-main{display:flex;flex-direction:column;min-height:0;min-width:0}.chat-messages{flex:1;overflow:auto;padding:24px;background:#fafbfd}.message{display:flex;gap:11px;margin-bottom:20px}.message.staff{flex-direction:row-reverse}.message-content{max-width:80%}.message-meta{font-size:10px;color:var(--muted);margin-bottom:5px}.message.staff .message-meta{text-align:right}.bubble{background:white;border:1px solid var(--border);border-radius:0 11px 11px 11px;padding:12px 15px;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.staff .bubble{background:#edf3f8;border-color:#dce5ef;border-radius:11px 0 11px 11px}.composer{padding:16px 21px;border-top:1px solid var(--border)}.composer textarea{min-height:72px}.composer .row{margin-top:10px}.composer select{width:150px;min-height:34px;padding:6px 10px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.capabilities{display:grid;gap:12px}.capability{padding:12px;background:#f6f8fb;border-radius:8px;font-size:12px}.auth-layout{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:white}.auth-story{background:#172b42;color:#eef3f8;display:flex;flex-direction:column;padding:50px 12%;position:relative;overflow:hidden}.auth-story .brand{padding:0}.auth-copy{margin:auto 0;position:relative;z-index:1;padding:60px 0}.auth-copy h1{font-size:43px;line-height:1.45;letter-spacing:-1.2px;margin-bottom:22px}.auth-copy h1 em{font-style:normal;color:#9dbed5}.auth-copy p{color:#a7b8cb;max-width:360px;font-size:14px;line-height:1.9}.auth-feature{display:flex;gap:12px;align-items:center;margin-top:24px;color:#cbd8e6;font-size:12px}.auth-feature svg{color:#8db4ce}.auth-story footer{font-size:11px;color:#91a5bc}.auth-form-area{display:flex;align-items:center;justify-content:center;padding:48px}.auth-form{width:100%;max-width:380px}.auth-form h2{font-size:27px;margin-bottom:9px}.auth-form .field{margin:19px 0}.auth-form .primary{width:100%;margin-top:9px}.auth-form .error{margin-top:20px}.auth-foot{font-size:11px;color:#8a968d;text-align:center;margin-top:26px}.public-page{max-width:920px;margin:0 auto;padding:40px 24px}.public-page .brand{padding:0;color:var(--ink);margin-bottom:45px}.public-page .brand-name{color:var(--ink)}.query-hero{text-align:center;margin-bottom:27px}.query-hero h1{font-size:31px}.query-hero p{color:var(--muted)}.query-form{display:flex;gap:10px;padding:23px}.query-result{margin-top:24px}.public-foot{text-align:center;color:var(--muted);font-size:11px;margin-top:34px}dialog{border:1px solid var(--border);border-radius:14px;padding:0;width:min(700px,calc(100vw - 32px));max-height:90vh;color:var(--ink);box-shadow:0 25px 100px #1732492e}dialog::backdrop{background:#112a2366;}.modal-head{padding:22px 25px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border)}.modal-body{padding:25px;overflow:auto;max-height:calc(90vh - 90px)}.modal-head h2{font-size:19px}.modal-body .error{margin-bottom:18px}#toasts{position:fixed;right:25px;bottom:25px;z-index:100;display:grid;gap:10px;max-width:calc(100vw - 50px)}.toast{padding:13px 21px;background:#183e2a;color:white;border-radius:10px;box-shadow:0 8px 28px #102c2433;font-size:13px}.toast.fail{background:#8b3439}
@keyframes spin{to{transform:rotate(360deg)}}@media(min-width:1600px){.content{padding:40px 48px}.topbar{padding:0 48px}}@media(max-width:1150px){.shell{grid-template-columns:210px minmax(0,1fr)}.sidebar{width:210px}.content{padding:26px}.topbar{padding:0 26px}.stats{gap:12px}.stat{padding:18px}.stat-icon{position:static;float:right;padding:6px}.stat-value{font-size:28px}.dashboard-grid,.details-grid{grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr}.auth-story{padding:40px 9%}.auth-copy h1{font-size:35px}}@media(max-width:780px){.shell{display:block}.sidebar{transform:translateX(-100%);transition:transform .2s;width:236px;box-shadow:12px 0 40px #0002}.sidebar.open{transform:translateX(0)}.mobile-toggle{display:inline-flex}.topbar{height:68px;padding:0 18px}.top-date,.crumb{display:none}.content{padding:24px 16px}.page-heading{align-items:flex-start;margin-bottom:22px;flex-wrap:wrap}.page-heading h1{font-size:24px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-foot{font-size:10px}.stat-icon{padding:5px}.panel-head,.panel-body{padding:18px}.toolbar{padding:16px}.toolbar input{width:100%}.toolbar select{flex:1;width:120px}th,td{padding:13px 16px}.form-grid{grid-template-columns:1fr}.item-row{grid-template-columns:1fr 1fr 60px 60px 34px;gap:4px}.item-row input{padding:8px 6px;font-size:12px}.item-row .btn{min-width:34px;width:34px}.auth-layout{display:block}.auth-story{display:none}.auth-form-area{min-height:100vh;padding:32px 24px}.chat-layout{height:auto;display:block;min-height:0}.conversation-list{max-height:190px;border-right:0;border-bottom:1px solid var(--border)}.chat-main{height:580px}.chat-messages{padding:16px}.message-content{max-width:85%}.query-form{display:block}.query-form .btn{margin-top:12px;width:100%}.topbar .actions{gap:5px}.tenant-select{max-width:175px}.quick-grid{grid-template-columns:1fr 1fr}.modal-body{padding:20px}.panel-head .actions{gap:5px}.panel-head .btn{font-size:11px;padding:8px 10px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.storage-banner{padding:8px 34px;border-bottom:1px solid #dce5ed;background:#edf2f7;color:#52677d;font-size:12px}.auth-storage{margin-top:18px;padding:10px 12px;border:1px solid #dce5ed;border-radius:6px;text-align:center}.feature-fields{border:1px solid var(--border);border-radius:8px;padding:15px}.feature-fields legend{font-size:13px;font-weight:600;padding:0 6px}.feature-fields .row{gap:14px 22px}

/* Header controls shrink within the workspace; height follows their content. */
.topbar{height:auto;min-height:78px;padding-block:14px}
.topbar>.row{flex:1 1 0;min-width:0;flex-wrap:nowrap}
.topbar .crumb{min-width:0;white-space:nowrap;overflow:hidden}
.topbar .crumb strong{min-width:0;overflow:hidden;text-overflow:ellipsis}
.topbar>.actions{flex:0 1 auto;min-width:0;max-width:100%;flex-wrap:nowrap}
.tenant-switcher{display:flex;align-items:center;gap:9px;min-width:0;max-width:100%;flex:0 1 auto}
.tenant-switcher label{flex:none;white-space:nowrap}
.tenant-select{width:220px;min-width:0;max-width:100%;flex:0 1 220px;text-overflow:ellipsis}
.top-date{flex:none;white-space:nowrap}
.topbar .badge{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.content,.panel,.panel-body,.table-wrap,.form-grid>*:not(.full),.dashboard-grid>*,.details-grid>*,.settings-grid>*,.quick-grid>*,.stat{min-width:0}
.table-wrap{max-width:100%;overscroll-behavior-x:contain}
.page-heading>div,.panel-head>h2{min-width:0;overflow-wrap:anywhere}
.attachment{max-width:100%;overflow-wrap:anywhere}
.item-field{display:grid;gap:4px;min-width:0}
.item-field>span{display:none}
.nav-backdrop{display:none}
@media(max-width:1150px){.top-date{display:none}}
@media(max-width:780px){
  .topbar{min-height:68px;padding-block:12px;gap:12px}
  .topbar>.row{flex:0 0 44px}
  .topbar>.actions{flex:1 1 0;justify-content:flex-end}
  .tenant-switcher{flex:0 1 220px}
  .tenant-switcher label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .tenant-select{min-height:44px}
  .sidebar{width:min(280px,calc(100vw - 56px));height:100dvh;overflow-y:auto}
  .sidebar:not(.open){visibility:hidden}
  .nav-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:19;background:#14233866;border-radius:0}
  .panel-head{flex-wrap:wrap}
  .page-heading .actions,.panel-head .actions{max-width:100%;flex-wrap:wrap;gap:8px}
  .form-grid{grid-template-columns:minmax(0,1fr)}
  .form-grid>*{min-width:0}
  input,select,textarea{min-width:0;max-width:100%;font-size:16px}
  .btn,.text-btn,.tab{min-height:44px}
  .btn.icon{width:44px;flex-shrink:0}
  .form-actions{flex-wrap:wrap}
  .toolbar input,.toolbar select{max-width:100%;min-width:0}
  .storage-banner{padding:8px 16px;overflow-wrap:anywhere}
  .kv{grid-template-columns:80px minmax(0,1fr)}
  .modal-body{max-height:calc(90dvh - 90px)}
  .item-row:not(.item-head){grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;border:1px solid var(--border);border-radius:8px;padding:12px;gap:10px}
  .item-row.item-head{display:none}
  .item-field:nth-child(-n+2){grid-column:1/-1}
  .item-field>span{display:block;color:var(--muted);font-size:12px}
  .item-row input{font-size:16px}
  .item-row .remove-item{align-self:end;min-width:44px;width:44px}
  .conversation-item strong{overflow-wrap:anywhere}
  .chat-main{height:70dvh;min-height:420px}
}
@media(max-width:380px){.stats,.quick-grid{grid-template-columns:minmax(0,1fr)}}

.channel-enabled{min-height:44px;font-weight:600}.callback-field{display:grid;gap:7px;font-size:13px;font-weight:600;min-width:0}.callback-controls{display:flex;gap:10px;align-items:center;min-width:0}.callback-controls input{min-width:0;flex:1}.callback-field small{font-weight:400}.channel-runtime{display:flex;flex-wrap:wrap;gap:8px 24px;margin-top:16px;margin-bottom:12px;color:var(--muted);font-size:12px}.channel-optional{margin-top:22px;border:1px solid var(--border);border-radius:8px;padding:0 16px}.channel-optional summary{cursor:pointer;min-height:48px;padding:12px 0;font-weight:600}.channel-optional[open]{padding-bottom:16px}.channel-optional p{margin-top:8px}.channel-optional .form-grid{margin-top:14px}#kf-result td{overflow-wrap:anywhere}#kf-result .table-wrap{margin-top:12px}@media(max-width:480px){.callback-controls{align-items:stretch;flex-direction:column}.callback-controls .btn{align-self:flex-start}}

/* Reference layout: compact enterprise console with a pale blue navigation rail. */
:root{--navy:#e8f0fc;--navy-deep:#e8f0fc;--green:#287cf1;--green-dark:#1766d2;--green-pale:#f0f6ff;--ink:#20242b;--muted:#8b929b;--border:#ebedf0;--bg:#e8f0fc;--shadow:none;font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif}
body{font-size:14px;line-height:1.5;background:var(--bg)}
h1{font-size:18px;font-weight:600;letter-spacing:0;line-height:1.5;margin-bottom:8px}h2{font-size:15px;font-weight:600;letter-spacing:0}h3{font-size:14px;font-weight:500}
.small{font-size:12px}.muted{color:var(--muted)}a{color:#337ecb}strong{font-weight:600}.eyebrow{display:none}
.shell{grid-template-columns:210px minmax(0,1fr);min-height:100vh;padding:12px 12px 26px 0}
.sidebar{width:210px;padding:26px 12px 18px;background:#e8f0fc;color:#242a32;box-shadow:none}
.brand{gap:8px;padding:0 12px 21px;color:#3485f9}.brand-mark{width:29px;height:29px;border-radius:7px;background:transparent;color:#3485f9;font-size:24px}.brand-name{font-size:21px;letter-spacing:0;font-weight:600}.brand-sub{display:none}
.nav-link{color:#242a32;margin:1px 0;padding:11px 13px;gap:11px;font-size:14px;font-weight:400;min-height:42px;border-radius:5px}.nav-link svg{width:16px;height:16px;color:#717880;opacity:1}.nav-link:hover{color:#2677e7;background:#dce9fa}.nav-link.active{background:#d3e3fa;color:#2d83f5}.nav-link.active svg{color:#2d83f5}.nav-link.active:after{display:none}
/* Match the verified WeCom desktop menu typography; keep interaction colors. */
@media(min-width:781px){.nav-link{font-family:"Microsoft YaHei UI","Microsoft YaHei","PingFang SC",Arial,sans-serif;color:#000;font-size:14px;font-weight:400;line-height:20px}}
.sidebar-footer{padding:16px 12px 0}.sidebar .tenant-switcher{display:grid;gap:6px;margin-bottom:18px;max-width:100%}.sidebar .tenant-switcher label{position:static;width:auto;height:auto;clip-path:none;overflow:visible;white-space:normal}.sidebar .tenant-select{font-size:12px;min-height:34px;width:100%;padding:6px 24px 6px 8px;background:#f3f7fe;border-color:#d6e1f0}.sidebar-company{display:flex;gap:8px;font-size:12px;overflow-wrap:anywhere;margin-bottom:15px}.sidebar-company svg{width:15px;height:15px;flex-shrink:0}.workspace-state{padding:14px 0 10px;border:0;border-top:1px solid #dbe4f0;border-radius:0;color:#8c96a2;font-size:11px;margin-bottom:10px}.workspace-state strong{font-weight:400;color:#7f8a97;font-size:12px;margin-bottom:7px}.workspace-state svg{width:14px;height:14px}
.sidebar .avatar{background:#d5e5fa;color:#4280c9;width:30px;height:30px;border-radius:5px}.user-chip{gap:8px}.user-chip .grow{min-width:0}.user-chip .name{color:#45505f;overflow-wrap:anywhere}.user-chip .role{color:#8c96a2;font-size:10px}.user-chip .btn{color:#84909f;padding:5px;width:28px;min-height:30px}
.shell-main{position:relative;background:#fff;border-radius:10px;min-height:calc(100vh - 38px);box-shadow:0 2px 5px #567baf08}
.topbar{min-height:52px;height:auto;padding:12px 30px;border-bottom:1px solid var(--border);border-radius:10px 10px 0 0;gap:12px}.crumb,.crumb strong{font-size:12px;color:#9299a2}.crumb svg{width:13px;height:13px}.top-date{font-size:12px}
.content{max-width:none;padding:25px 30px 35px;width:100%;margin:0}.home-shell .topbar{display:none}.home-shell .content.dashboard-content{padding:0}.workspace-footer{position:absolute;top:100%;left:12px;padding-top:8px;font-size:11px;color:#a8b6c9}
.page-heading{margin-bottom:23px;align-items:flex-start;gap:15px}.page-heading p{font-size:13px;color:#8b929b}.page-heading h1{font-size:18px}
.panel{border-radius:7px;border-color:#e8ebef;box-shadow:none}.panel-head{padding:16px 20px}.panel-body{padding:20px}.panel-head h2{font-size:15px}.stack{gap:20px}
.btn{font-size:13px;font-weight:400;min-height:34px;padding:6px 14px;border-radius:4px;border-color:#dce0e5;box-shadow:none}.btn:hover{background:#f3f7fd}.btn.primary{background:#287cf1;border-color:#287cf1}.btn.primary:hover{background:#1766d2}.btn.icon{width:34px;padding:7px}.btn svg{width:16px;height:16px}.actions{gap:8px}
input,select,textarea{font-size:13px;min-height:36px;border-radius:4px;padding:8px 10px;border-color:#dce1e7}.field,label.field{font-size:13px;font-weight:400;gap:7px}input:focus,select:focus,textarea:focus{border-color:#5295ed;box-shadow:0 0 0 2px #287cf112}.form-grid{gap:17px 20px}.form-actions{margin-top:20px;padding-top:17px;gap:10px}.notice{background:#f3f7fd;border:1px solid #e2ebf8;color:#657c9a;border-radius:5px;font-size:12px;padding:12px 15px}.error{border-radius:5px}.badge{border-radius:3px;font-size:12px;padding:2px 7px}
table{font-size:13px}th{background:#f8f9fb;color:#8b929b;font-size:12px;letter-spacing:0}th,td{padding:13px 18px}td{color:#424a55}.toolbar{padding:16px 20px;gap:10px}.table-foot{padding:12px 20px}.tabs{padding:0 20px}.tab{font-size:13px;padding:14px 0;font-weight:400}.tab.active{font-weight:500}
dialog{border-radius:8px}.modal-head{padding:18px 22px}.modal-head h2{font-size:17px}.modal-body{padding:22px}.empty{padding:40px 20px}.empty h3{font-size:14px;font-weight:500;color:#707c8b}.empty-icon{border-radius:8px}.chat-layout{height:calc(100vh - 195px)}.message-meta{font-size:11px}.conversation-item{padding:15px 18px}.bubble{font-size:13px}
.home-layout{display:grid;grid-template-columns:minmax(0,1fr) 350px;min-height:calc(100vh - 38px)}
.home-main{min-width:0;padding:22px 30px 48px}.home-title{font-size:18px;font-weight:600;margin:0 0 16px;line-height:1.5}
.setup-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid #e7e9ed;border-radius:8px;overflow:hidden}
.setup-step{min-width:0;min-height:154px;padding:15px 17px 17px;border-right:1px solid #e7e9ed}.setup-step:last-child{border-right:0}.step-number{font:600 32px/1.2 Arial,sans-serif;color:#c8cbd0;margin-bottom:5px}.setup-step:first-child .step-number{color:#3185f7}.setup-step h2{font-size:14px;line-height:1.5;margin-bottom:3px;font-weight:600}.setup-step p{font-size:13px;color:#8b929b;margin-bottom:16px;line-height:1.5}.setup-step a,.setup-step>span{font-size:12px}.setup-step a svg{width:12px;height:12px;margin-left:1px}
.home-section-caption{font-size:12px;color:#969ca4;margin:26px 0 14px}
.home-info-banner{display:flex;align-items:center;gap:20px;min-height:74px;background:#f0f5ff;border-radius:7px;padding:12px 17px;margin-bottom:13px}.home-banner-icon{width:135px;flex:none;text-align:center;color:#508df4}.home-banner-icon svg{width:45px;height:45px}.home-info-banner>div{min-width:0;flex:1}.home-info-banner h2{font-size:16px;color:#507ef6;margin:0 0 3px;font-weight:600}.home-info-banner p{font-size:12px;color:#6684b3;margin:0}.home-info-banner .btn{background:#e1ebfe;color:#427ccc;border:0;min-height:29px;font-size:12px;padding:5px 12px}
.home-message{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:44px;padding:11px 0;border-bottom:1px solid #eceef1;color:#303841;font-size:14px}.home-message:hover{text-decoration:none;background:#fbfcfe}.home-message strong{font-weight:400}.home-row-action{color:#9ea6b0;font-size:12px;white-space:nowrap}.home-row-action svg{width:12px;height:12px;margin-left:8px}.quick-caption{margin-top:37px;margin-bottom:13px}
.home-quick-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.home-quick-link{display:flex;align-items:center;gap:14px;min-height:68px;padding:14px 16px;border:1px solid #e7e9ed;border-radius:8px;color:#333b45;font-size:14px;min-width:0}.home-quick-link:hover{background:#f8fbff;border-color:#d4e1f5;text-decoration:none}.home-quick-link>span:last-child{overflow-wrap:anywhere}.quick-icon{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;flex:none;background:#4b96f5;color:white}.quick-icon svg{width:21px;height:21px;fill:currentColor;stroke:none}.quick-color-1 .quick-icon{background:#15bf55}.quick-color-2 .quick-icon{background:#ffb800}.quick-color-3 .quick-icon{background:#4b96f5}
.home-company{padding:26px 32px;border-left:1px solid #edf0f3;min-width:0}.company-identity{text-align:center;padding-bottom:25px}.company-logo{display:grid;place-items:center;background:#f0f6ff;color:#3185f7;width:62px;height:62px;margin:0 auto 13px;border-radius:12px}.company-logo svg{width:38px;height:38px}.company-identity h2{font-size:16px;font-weight:500;margin:0 0 5px;overflow-wrap:anywhere}.company-identity>span{font-size:12px}.company-metrics{margin:0;border-top:1px solid #eceef1;border-bottom:1px solid #eceef1;padding:15px 0}.company-metrics>div{display:flex;gap:13px;align-items:center;font-size:13px;line-height:2.2}.company-metrics dt{color:#969ca4;min-width:74px}.company-metrics dd{margin:0;color:#35404d}.company-section{padding:22px 0 0;font-size:12px}.company-section h3{font-size:14px;font-weight:400;margin-bottom:5px}.company-section p{margin:0 0 6px;line-height:1.65}.company-section>a{font-size:12px}
@media(max-width:1450px){.home-layout{grid-template-columns:minmax(0,1fr) 280px}.home-company{padding:26px 24px}.home-quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.home-banner-icon{width:65px}.home-main{padding:22px 26px 40px}}
@media(max-width:1100px){.home-layout{grid-template-columns:minmax(0,1fr)}.home-company{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;border-left:0;border-top:1px solid #edf0f3;padding:24px 26px}.company-identity{padding:0}.company-metrics{border:0;padding:0}.company-section{padding:0}.setup-step{padding:14px 12px}.home-quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:780px){.shell{display:block;padding:8px 8px 26px}.sidebar{width:min(280px,calc(100vw - 56px));padding:24px 12px 18px}.shell-main{min-height:calc(100dvh - 34px)}.topbar,.home-shell .topbar{display:flex;min-height:58px;padding:8px 14px}.topbar>.row{flex:1;gap:10px}.topbar .crumb{display:flex;white-space:normal}.topbar .crumb>svg,.topbar .crumb>strong{display:none}.topbar>.actions{flex:0}.mobile-toggle{display:inline-flex}.content{padding:22px 16px}.home-main{padding:20px 16px 30px}.home-title,.page-heading h1{font-size:18px}.setup-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.setup-step{min-height:145px;padding:15px}.setup-step:nth-child(2){border-right:0}.setup-step:nth-child(-n+2){border-bottom:1px solid #e7e9ed}.home-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.home-quick-link{padding:12px;gap:10px}.home-info-banner{gap:12px;flex-wrap:wrap;padding:14px}.home-banner-icon{width:36px}.home-banner-icon svg{width:32px;height:32px}.home-info-banner h2{font-size:14px}.home-info-banner .btn{margin-left:48px}.home-row-action{font-size:0}.home-row-action svg{font-size:12px;margin:0}.home-message{font-size:13px}.home-company{padding:24px 16px;gap:22px 18px}.home-layout{min-height:0}.btn,.btn.icon,.text-btn,.tab{min-height:44px}.btn.icon{width:44px}.user-chip .btn{min-height:44px;width:44px}.sidebar .tenant-select{min-height:44px}.panel-head,.panel-body{padding:16px}.panel-head .btn{font-size:12px}.form-grid{grid-template-columns:minmax(0,1fr)}input,select,textarea{font-size:16px;min-height:44px}.chat-layout{height:auto}.workspace-footer{font-size:10px}.company-section{overflow-wrap:anywhere}}
@media(max-width:380px){.home-quick-grid{grid-template-columns:minmax(0,1fr)}.home-company{grid-template-columns:minmax(0,1fr)}.setup-step{padding:13px 11px}.setup-step h2{font-size:13px}.setup-step p{font-size:12px}.home-banner-icon{display:none}.home-info-banner .btn{margin-left:0}.home-title{font-size:17px}}
/* Business dashboard: actual orders, conversations, knowledge and task data. */
.business-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}.business-heading .home-title{margin-bottom:5px}.business-heading p{font-size:13px;margin:0}.business-heading>div{min-width:0}.business-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--border);border-radius:7px;overflow:hidden}.business-metric{padding:18px 20px;color:var(--ink);border-right:1px solid var(--border);min-width:0}.business-metric:last-child{border-right:0}.business-metric:hover{text-decoration:none;background:#f9fbff}.business-metric>div{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#737d89;font-size:13px}.business-metric svg{width:16px;height:16px;color:#9daab9}.business-metric>strong{display:block;font:500 30px/1.4 Arial,sans-serif;margin:10px 0 8px;overflow-wrap:anywhere}.business-metric small{display:flex;align-items:center;font-size:12px;color:#8b929b;gap:5px}.business-metric small svg{width:12px;height:12px}.business-reminder{display:flex;justify-content:space-between;gap:12px;margin-top:20px;padding:14px 17px;background:#f2f7ff;border-radius:6px;color:#53759d;font-size:13px}.business-reminder>span{display:flex;align-items:center;gap:9px}.business-reminder>span:last-child{white-space:nowrap}.business-reminder svg{width:16px;height:16px;flex:none}.business-quick{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.business-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:28px 0 14px}.business-section-head h2{font-size:15px;font-weight:500}.business-section-head a{font-size:12px;display:flex;align-items:center;gap:4px}.business-section-head svg{width:12px;height:12px}.business-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:20px}.business-status-grid>*{min-width:0}.business-status-row{display:flex;justify-content:space-between;gap:14px;padding:9px 0;font-size:13px;border-bottom:1px solid #f1f2f5}.business-status-row:last-child{border:0}.business-status-row strong{font-weight:500}.home-company>.company-section{border-top:1px solid var(--border);margin-top:22px}.home-company>.company-identity+.company-section{margin-top:0}
@media(max-width:1300px){.business-metric{padding:16px 13px}.business-metric>strong{font-size:27px}.business-quick{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){.business-heading{align-items:flex-start;flex-wrap:wrap;gap:12px}.business-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.business-metric:nth-child(2){border-right:0}.business-metric:nth-child(-n+2){border-bottom:1px solid var(--border)}.business-reminder{align-items:flex-start;flex-wrap:wrap}.business-reminder>span:first-child{align-items:flex-start}.business-reminder>span:last-child{margin-left:25px;min-height:30px}.business-status-grid{grid-template-columns:minmax(0,1fr)}.business-quick{grid-template-columns:repeat(2,minmax(0,1fr))}.home-company>.company-section{margin-top:0;padding-top:16px}}
@media(max-width:380px){.business-quick{grid-template-columns:minmax(0,1fr)}}

.model-test-toolbar{gap:14px;margin-bottom:14px;flex-wrap:wrap}.model-test-success{background:#eff9f1;border:1px solid #cce8d3;border-radius:5px;color:#246a38;padding:13px 16px}.model-test-item{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0;overflow-wrap:anywhere}.model-test-item span{min-width:0}#model-result{overflow-wrap:anywhere}@media(max-width:600px){.model-test-toolbar>.actions{width:100%}.model-test-toolbar>.actions .btn{flex:1}}

/* Constrain content instead of hiding page overflow; wide tables scroll locally. */
.sidebar{height:100dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.sidebar>.brand,.sidebar>nav,.sidebar-footer{flex-shrink:0}
.sidebar-footer{min-width:0}
.stack,.full,.field,.row>*,.panel-head>div,.modal-head h2{min-width:0}
.panel-head>div,.notice,.error,.empty,.company-section,.page-heading p{overflow-wrap:anywhere}
.btn{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.btn svg,.checkbox input{flex-shrink:0}
.panel-head h2,.modal-head h2{overflow-wrap:anywhere}
.panel-head .actions,.modal-head>.btn{flex-shrink:0}
.attachment{flex-wrap:wrap}.attachment>.text-btn{min-width:0;overflow-wrap:anywhere;text-align:left}
.table-wrap{width:100%;scrollbar-width:thin}
.table-wrap:focus-visible{outline:2px solid #5295ed;outline-offset:-2px}
td:not(.nowrap){white-space:normal;overflow-wrap:anywhere;min-width:160px;max-width:320px}
td .mono{white-space:nowrap}
th{white-space:nowrap}
.chat-main>.panel-head,.chat-main>.composer{flex-shrink:0}
.message-content{min-width:0}.chat-messages{min-height:0}
dialog{max-height:calc(100dvh - 32px);overflow:hidden}
body:has(dialog[open]){overflow:hidden}
dialog[open]{display:flex;flex-direction:column}
.modal-head{flex-shrink:0;gap:12px}
.modal-form{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.modal-body{min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain}
.modal-actions{flex-shrink:0;margin:0;padding:16px 22px;background:#fff}
.modal-actions[hidden]{display:none}
@media(max-width:780px){
  body.nav-open{overflow:hidden}
  .content{padding:22px 16px}
  .topbar .crumb{overflow-wrap:anywhere}
  .topbar .mobile-toggle{border-color:transparent;background:transparent}
  .home-company{grid-template-columns:minmax(0,1fr)}
  .home-company>.company-section{padding-top:16px}
  .home-company>.company-identity{padding-bottom:0}
  .business-heading>.btn{align-self:flex-start}
  .sidebar .tenant-select{font-size:16px}
  .modal-head{padding:14px 16px}
  .modal-body{padding:18px 16px}
  .modal-actions{padding:12px 16px}
  .modal-actions>.btn{flex:1}
  .form-grid>.divider{margin:8px 0}
  .panel-head .actions{flex-shrink:1}
  .message{gap:8px}.message-content{max-width:calc(100% - 43px)}
  .chat-main{height:75dvh;min-height:520px}
  .chat-main>.panel-head{gap:10px}
}
@media(max-width:480px){
  .panel-head>.actions{width:100%}
  .panel-head>.actions .btn{flex:1}
  .page-heading>.actions{width:100%}
  .toolbar select{flex:1 1 100%;width:100%}
  .toolbar>.btn{width:100%}
  .table-foot>.actions{width:100%;justify-content:space-between}
  .form-actions>.btn{flex:1 1 auto}
  .modal-actions>.btn{flex:1}
}

/* Separate platform administration from a selected enterprise workspace. */
.workspace-context{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;margin:0 12px 12px;padding-bottom:12px;border-bottom:1px solid #dbe4f0;color:#68788c;font-size:12px;flex-shrink:0}
.workspace-context strong{font-weight:500;white-space:nowrap}
.workspace-context .text-btn{font-size:12px;font-weight:400;padding:4px 0;min-width:0}
@media(max-width:780px){.workspace-context{margin-bottom:8px;padding-bottom:8px}.workspace-context .text-btn{min-height:44px}}

/* Login CAPTCHA shares the existing form typography and mobile width. */
.captcha-row{display:grid;grid-template-columns:minmax(0,1fr) 156px;align-items:stretch;gap:12px}.captcha-row input{min-width:0;width:100%}.captcha-refresh{padding:0;border:1px solid var(--border);border-radius:5px;background:#f4f8fd;overflow:hidden;cursor:pointer;min-height:48px;color:var(--muted);font:inherit}.captcha-refresh img{display:block;width:100%;height:48px;object-fit:contain}.captcha-refresh img[hidden],.captcha-refresh span[hidden]{display:none}.captcha-refresh:focus-visible{outline:2px solid var(--blue,#287bf4);outline-offset:2px}.captcha-refresh:disabled{cursor:wait;opacity:.7}.captcha-field small{display:block;margin-top:8px;line-height:1.5}@media(max-width:380px){.captcha-row{grid-template-columns:minmax(0,1fr) 128px;gap:8px}.captcha-row input{padding-left:10px;padding-right:10px}}

/* Qizhi: shared brand identity and a quiet, WeCom-inspired sign-in. */
.brand{gap:9px;min-width:0;color:#213047}.brand img.brand-mark{display:block;width:34px;height:34px;flex:none;border-radius:9px;background:transparent}.brand-wordmark{min-width:0}.brand .brand-name{font-size:20px;font-weight:600;line-height:1.35;letter-spacing:0;white-space:nowrap;color:#213047}.brand-name span{font-family:Arial,sans-serif;color:#287cf4;font-weight:600}.brand .brand-sub{display:block;font-size:10px;line-height:1.5;letter-spacing:1px;color:#65758a}.sidebar>.brand{padding:0 8px 22px;gap:8px}.sidebar .brand-name{font-size:18px}.sidebar .brand-sub{font-size:10px}.public-page .brand{margin-bottom:36px}
/* Login styles are scoped so the business workspace keeps its existing theme. */
.login-page{min-height:100vh;min-height:100svh;display:flex;flex-direction:column;background:radial-gradient(ellipse at 16% 38%,#e7f0ff 0,transparent 48%),radial-gradient(ellipse at 86% 82%,#eaf3ff 0,transparent 44%),#f6f8fc;color:#202937}
.login-header{height:80px;flex:none;width:100%;padding:0 max(32px,calc((100% - 1120px)/2));display:flex;align-items:center;justify-content:space-between;gap:24px}
.login-header .brand{padding:0}.login-header .brand-sub{display:none}.login-header-caption{font-size:13px;color:#617087;border-left:1px solid #d6dfec;padding-left:18px;letter-spacing:1px}
.login-main{flex:1;display:grid;place-items:center;padding:24px 32px 32px;min-width:0}
.login-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:100%;max-width:1060px;min-height:584px;border:1px solid #fff;border-radius:22px;background:#fff;overflow:hidden;box-shadow:0 24px 70px -28px #244c8433,0 2px 10px #34547a05}
.login-intro{position:relative;isolation:isolate;overflow:hidden;display:flex;flex-direction:column;padding:40px 44px;background:linear-gradient(135deg,#edf5ff 0%,#e5efff 62%,#f0f6ff 100%);border-right:1px solid #e6edf6}
.login-intro:before,.login-intro:after{content:"";position:absolute;z-index:-1;pointer-events:none;border:1px solid #fff9;border-radius:50%;width:360px;height:360px;right:-220px;top:-120px;box-shadow:0 0 0 36px #ffffff26,0 0 0 72px #ffffff20}
.login-intro:after{width:240px;height:240px;right:auto;top:auto;bottom:-205px;left:-90px}
.login-intro-brand{display:flex;align-items:center;gap:12px;margin-bottom:27px;font-size:16px;font-weight:600;color:#203858}
.login-emblem{display:block;width:44px;height:44px;flex:none;border-radius:12px;box-shadow:0 6px 14px #287cf419}
.login-intro-brand small{display:block;font-size:11px;font-weight:400;letter-spacing:1px;color:#5d7391;margin-top:4px}
.login-intro h1{font-size:34px;font-weight:700;line-height:1.4;letter-spacing:1px;margin:0 0 15px;color:#182e4b}.login-intro h1 span{color:#2672dd}
.login-intro-summary{font-size:13px;line-height:1.9;color:#5d7391;margin:0}
.login-capabilities{display:grid;gap:12px;margin-top:26px}
.login-capabilities>div{display:flex;gap:13px;align-items:center;padding:10px 14px;border:1px solid #fff;border-radius:11px;background:#ffffff80;font-size:14px;font-weight:500;color:#2b4261}
.login-capability-icon{width:36px;height:36px;display:grid;place-items:center;flex:none;border-radius:10px;background:#e1edff;color:#2672dd}
.login-capabilities svg{width:20px;height:20px;stroke:currentColor}.login-capabilities small{display:block;margin-top:3px;font-size:12px;font-weight:400;color:#5d7391;line-height:1.5}
.login-intro-foot{display:flex;align-items:center;gap:7px;margin-top:auto;padding-top:24px;font-size:11px;color:#5d7391;line-height:1.6}.login-intro-foot svg{width:15px;height:15px;flex:none}
.login-form-panel{display:flex;align-items:center;justify-content:center;min-width:0;padding:44px 52px}
.login-form-panel .auth-form{width:100%;max-width:368px;min-width:0;margin:0}
.login-form-panel .auth-form h2{font-size:26px;font-weight:600;line-height:1.4;letter-spacing:0;margin:0 0 10px;color:#182639}
.login-subtitle{font-size:13px;color:#6b778a;line-height:1.7;margin:0 0 30px}
.login-form-panel .field{margin:0 0 21px;gap:9px}.login-form-panel label{font-size:14px;font-weight:400;color:#39475a}
.login-form-panel input:not([type=hidden]){min-height:48px;border:1px solid #dbe3ee;border-radius:8px;background:#fafcfe;font-size:14px;padding:12px 14px;transition:border-color .15s,box-shadow .15s,background .15s}
.login-form-panel input:not([type=hidden]):hover{border-color:#aabdd7}.login-form-panel input:not([type=hidden]):focus{background:#fff;border-color:#267ef0;outline:2px solid #267ef026;outline-offset:1px;box-shadow:0 0 0 3px #287cf40a}
.login-form-panel input::placeholder{color:#808da0}
.login-form-panel .captcha-row{grid-template-columns:minmax(0,1fr) 132px;gap:10px}.login-form-panel .captcha-refresh{border-color:#dbe3ee;border-radius:8px}.login-form-panel .captcha-refresh img{height:48px}
.login-form-panel .captcha-field small{font-size:12px;color:#6b778a}
.login-form-panel .auth-form>.primary{margin-top:5px;min-height:48px;border:1px solid #267ef0;border-radius:8px;font-size:15px;font-weight:500;justify-content:center;gap:12px;background:#267ef0;box-shadow:0 6px 14px #267ef023;transition:background .15s,box-shadow .15s}
.login-form-panel .auth-form>.primary:hover{background:#176ee0;box-shadow:0 8px 18px #267ef033}.login-form-panel .auth-form>.primary:focus-visible{outline:2px solid #174f9b;outline-offset:3px}
.login-form-panel .auth-foot{margin-top:24px;padding-top:20px;border-top:1px solid #edf0f5;font-size:12px;line-height:1.7;color:#6b778a}.login-form-panel .error{font-size:13px;margin:0 0 18px}
.login-footer{flex:none;padding:8px 24px 22px;text-align:center;font-size:12px;line-height:1.6;color:#718098}
@media(max-width:1000px){.login-intro{padding:36px 30px}.login-form-panel{padding:36px 32px}.login-intro h1{font-size:30px}.login-intro-summary br{display:none}}
@media(max-width:700px){.login-header{height:72px;padding:0 24px}.login-header-caption{display:none}.login-main{padding:12px 20px 24px;align-items:center}.login-card{display:block;max-width:440px;min-height:0;border-radius:18px}.login-intro{display:none}.login-form-panel{padding:36px 30px}.login-form-panel .auth-form h2{font-size:24px}.login-form-panel input:not([type=hidden]){font-size:16px;min-height:48px}.login-form-panel .auth-form>.primary{min-height:48px}.login-footer{padding-bottom:max(22px,env(safe-area-inset-bottom));font-size:12px}.login-subtitle{margin-bottom:28px}}
@media(max-width:380px){.login-header{padding:0 20px}.login-main{padding-left:12px;padding-right:12px}.login-form-panel{padding:28px 20px}.login-form-panel .captcha-row{grid-template-columns:minmax(0,1fr) 108px;gap:8px}.login-form-panel .captcha-row input{font-size:16px;padding:12px 8px}.login-form-panel .auth-foot{font-size:12px}}
.kf-management-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}#kf-servicers-result{min-width:0;overflow-wrap:anywhere}#kf-servicers-result .actions{flex-wrap:wrap}#kf-servicers-result .btn{min-height:44px}#kf-servicers-result h4{margin:18px 0 10px}@media(max-width:600px){.kf-management-actions .btn{flex:1 1 140px}#kf-servicers-result td .actions{min-width:140px}}
.customer-identity{display:flex;flex-direction:column;gap:3px;margin:5px 0 8px;line-height:1.6;overflow-wrap:anywhere;word-break:break-word}.customer-identity .mono{white-space:normal}.conversation-item .customer-identity{font-size:11px}.chat-heading{flex-wrap:wrap;align-items:flex-start}.chat-heading>div:first-child{flex:1 1 280px}.chat-heading>.actions{display:flex;flex-wrap:wrap;flex:0 1 430px;justify-content:flex-end}.chat-heading .btn:disabled{opacity:.55;cursor:wait}@media(max-width:780px){.chat-heading>.actions{flex:1 1 100%;justify-content:flex-start}.chat-heading>.actions .btn{flex:1 1 130px}}

/* Settings categories retain unsaved edits when switching tabs. */
.settings-pane[hidden]{display:none!important}.settings-tabs{overflow-x:auto;flex-wrap:nowrap;flex-shrink:0}.settings-tabs .tab{white-space:nowrap}.customer-suggestions{max-height:220px;overflow:auto;border:1px solid var(--border,#dbe2ea);border-radius:8px}.customer-suggestions button{display:block;width:100%;padding:10px;text-align:left;background:white;border:0;cursor:pointer}.customer-suggestions button:hover,.customer-suggestions button:focus{background:#edf5ff}.recipient-list{max-height:240px;overflow:auto;display:grid;gap:8px}

.kf-qr-card{margin:20px 0 0;max-width:360px;border-radius:12px;overflow:hidden;box-shadow:0 4px 20px #0002;background:#fff}.kf-qr-card img{display:block;width:100%;height:auto}.recipient-list [hidden]{display:none!important}

.conversation-search{padding:16px;border-bottom:1px solid var(--border);position:sticky;top:0;background:white;z-index:1}.conversation-search input{width:100%;min-width:0}.conversation-times{margin:8px 0;line-height:1.8}.conversation-summary{padding:12px;margin-bottom:16px;border:1px solid var(--border);border-radius:8px}.conversation-summary summary{cursor:pointer}#conversation-more{margin:12px}

.conversation-summary-region{flex:none;padding:10px 16px;border-bottom:1px solid var(--border);background:#fafbfd}.conversation-summary-region .conversation-summary{margin:0}.conversation-summary-region .summary-body{max-height:180px;overflow:auto;padding-top:8px}.conversation-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px}.conversation-pagination .btn{padding:8px 10px}.conversation-customer{margin-top:8px}

.customer-notes{max-width:320px;min-width:140px;overflow-wrap:anywhere}

.history-loader{text-align:center;padding:0 0 12px;min-height:32px}.chat-messages{overflow-anchor:none}

/* Customer conversation picker: reuse the enterprise console's blue, borders and spacing. */
.customer-chat-picker{display:grid;gap:16px;min-width:0}
.customer-chat-picker .notice{margin:0;line-height:1.7}
.customer-chat-picker .field{margin:0}
.customer-chat-selection-head{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}
.customer-chat-selection-head strong{color:var(--green);font-weight:600}
.customer-chat-selection-empty{margin-top:8px}
.customer-chat-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;max-height:124px;overflow:auto}
.customer-chat-chip{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:32px;padding:5px 9px;border:1px solid #d5e5fc;border-radius:4px;background:var(--green-pale);color:var(--green-dark);font:inherit;font-size:12px;text-align:left;cursor:pointer}
.customer-chat-chip>span{min-width:0;overflow-wrap:anywhere}
.customer-chat-chip svg{width:14px;height:14px;flex:none}
.customer-chat-chip:hover{background:#e3efff}
.customer-chat-list-panel{border:1px solid var(--border);border-radius:5px;overflow:hidden}
.customer-chat-options{max-height:300px;overflow:auto;overscroll-behavior:contain}
.customer-chat-option{display:flex;align-items:center;gap:12px;padding:14px 16px;margin:0;min-height:68px;border-bottom:1px solid var(--border);cursor:pointer;background:var(--white);transition:background .15s}
.customer-chat-option:last-child{border-bottom:0}
.customer-chat-option:hover{background:#f8faff}
.customer-chat-option:has(input:checked){background:var(--green-pale)}
.customer-chat-option:has(input:disabled){background:#f8f9fb;cursor:not-allowed}
.customer-chat-option input{appearance:auto;width:16px;height:16px;min-height:16px;margin:0;flex:none;padding:0;accent-color:var(--green);cursor:inherit}
.customer-chat-option-text{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere;line-height:1.5}
.customer-chat-option-text strong{font-size:13px;font-weight:500;color:var(--ink)}
.customer-chat-id{color:#697586;word-break:break-all}
.customer-chat-option:has(input:disabled) .customer-chat-option-text strong{color:#697586}
.customer-chat-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;background:#fafbfd;border-top:1px solid var(--border)}
.customer-chat-pagination .btn{padding:6px 12px}
.customer-chat-pagination>span{text-align:center}
.customer-chat-empty{padding:32px 16px;text-align:center;font-size:13px}
.customer-chat-chip:focus-visible,.customer-chat-option input:focus-visible{outline:2px solid var(--green);outline-offset:3px}
@media(max-width:640px){.customer-chat-picker{gap:14px}.customer-chat-option{padding:12px}.customer-chat-chip{min-height:40px}.customer-chat-pagination{padding:10px;gap:8px}.customer-chat-pagination .btn{padding:6px 10px;flex:none}.customer-chat-options{max-height:260px}}
@media(prefers-reduced-motion:reduce){.customer-chat-option{transition:none}}

/* Shared phone layouts across enterprise and platform features. */
.mobile-chat-toolbar{display:none}
.table-cell-value{min-width:0;overflow-wrap:anywhere}
@media(max-width:780px){
 :root{--mobile-text-muted:#697586}
 .content{padding:18px 12px}.topbar{min-height:56px;padding:6px 12px}.topbar .crumb{display:flex;font-size:13px}.topbar>.row{flex:1 1 auto}.topbar>.actions:empty{display:none}
 .page-heading{gap:14px;margin-bottom:18px}.page-heading>.actions{width:100%;display:flex}.page-heading>.actions>.btn{flex:1}.page-heading p{line-height:1.7}
 .panel-head,.panel-body{padding:16px}.toolbar{padding:14px;gap:10px}.toolbar input,.toolbar select{width:100%;flex:1 1 100%}.toolbar .btn{flex:1}
 .table-wrap.responsive-table{overflow:visible;outline-offset:0}
 .responsive-table table,.responsive-table tbody{display:block;width:100%;white-space:normal}
 .responsive-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .responsive-table tbody>tr{display:block;padding:12px 14px;border-bottom:8px solid #f4f6f9;background:white}
 .responsive-table tbody>tr:last-child{border-bottom:0}
 .responsive-table tbody>tr>td{display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;align-items:start;width:auto;min-width:0;max-width:none;padding:8px 0;border:0!important;font-size:13px;white-space:normal}
 .responsive-table td::before{content:attr(data-label);color:var(--mobile-text-muted);font-size:12px;line-height:1.8}
 .responsive-table td .mono,.responsive-table td.mono{white-space:normal;overflow-wrap:anywhere}
 .responsive-table .table-cell-value{max-width:100%;overflow-wrap:anywhere;white-space:normal}
 .responsive-table td.pre .table-cell-value{white-space:pre-wrap}
 .responsive-table .actions{gap:6px;flex-wrap:wrap}.responsive-table .btn,.responsive-table .text-btn{min-height:44px}
 .table-foot{padding:14px}.table-foot>.actions{width:100%;justify-content:space-between}.customer-notes{min-width:0;max-width:none}
 .tabs{padding:0 14px;gap:20px}.settings-tabs{position:sticky;top:0;background:white;z-index:3;padding:0 12px;border-radius:5px}.settings-tabs .tab{flex:none;padding:12px 2px;font-size:13px}
 .callback-controls{flex-direction:column;align-items:stretch}.callback-controls .btn{align-self:stretch}
 .panel-head>.actions{width:100%;justify-content:flex-start}.panel-head>.actions .btn{flex:1 1 auto}
 .modal-body .field+.field{margin-top:14px}.modal-body :is(.form-grid,.appointment-grid)>.field{margin-top:0}
 dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}.modal-head{padding:12px 14px}.modal-body{padding:16px 14px}.modal-actions{padding:12px 14px max(12px,env(safe-area-inset-bottom))}
 .modal-actions>.btn{min-height:44px}.modal-head h2{font-size:16px}.modal-body input:not([type=checkbox]):not([type=hidden]),.modal-body select,.modal-body textarea{font-size:16px}
 .notice,.error{overflow-wrap:anywhere}.attachments,.attachment{min-width:0}.badge{max-width:100%;white-space:normal}.kv{grid-template-columns:80px minmax(0,1fr)}
 .query-hero h1{font-size:23px}.public-page{padding:24px 12px}.query-form{padding:16px}.query-result .details-grid{display:block}
 .chat-layout{display:block;height:auto;min-height:0}
 .chat-layout .conversation-list{max-height:none;overflow:visible;border:0}
 .chat-layout:not(.has-active-conversation) .chat-main{display:none}
 .conversation-search{position:static;padding:14px}.conversation-item{padding:14px 16px}.conversation-item .customer-identity{max-height:36px;overflow:hidden}
 .chat-layout.has-active-conversation{position:fixed;inset:0;z-index:15;height:100dvh;height:var(--chat-viewport-height,100dvh);border:0;border-radius:0;background:white;overflow:hidden}
 body:has(.chat-layout.has-active-conversation){overflow:hidden}
 .chat-layout.has-active-conversation .conversation-list{display:none}
 .chat-layout.has-active-conversation .chat-main{height:100%;min-height:0;display:flex}
 .mobile-chat-toolbar{display:flex;gap:10px;align-items:center;flex-shrink:0;padding:max(8px,env(safe-area-inset-top)) 12px 8px;border-bottom:1px solid var(--border);background:white}
 .mobile-chat-toolbar>strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
 .mobile-chat-toolbar>.btn{flex:none;padding:6px 10px;font-size:12px;min-height:44px}
 .chat-main>.chat-heading{display:none}
 .chat-main.show-chat-details>.chat-heading{display:flex;max-height:32dvh;overflow:auto;padding:12px 14px;overscroll-behavior:contain}
 .chat-heading h2{font-size:15px}.chat-heading .customer-identity,.chat-heading .conversation-times{font-size:12px;line-height:1.6}.chat-heading .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
 .chat-heading>.actions .btn{min-width:0;font-size:12px;padding:6px;min-height:44px}
 .conversation-summary-region{padding:8px 12px}.conversation-summary-region .conversation-summary{padding:9px 10px;font-size:12px;background:white}
 .conversation-summary summary{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conversation-summary-region .summary-body{max-height:20dvh;font-size:13px}
 .chat-messages{padding:16px 12px;min-height:100px;overscroll-behavior:contain}.message{gap:8px;margin-bottom:18px}.message .avatar{width:28px;height:28px;border-radius:6px;font-size:12px}.message-content{max-width:calc(100% - 36px)}.bubble{font-size:14px;line-height:1.7;padding:10px 12px}.message-meta{font-size:11px}
 .chat-main>.composer{padding:10px 12px max(10px,env(safe-area-inset-bottom));max-height:32dvh;overflow:auto}.composer textarea{min-height:60px;max-height:100px}.composer .notice{font-size:11px;padding:8px 10px}.composer .row{gap:8px;margin-top:8px}.composer select{flex:1;min-width:0;width:auto}
}
@media(max-width:360px){.responsive-table tbody>tr>td{grid-template-columns:76px minmax(0,1fr);gap:8px}.customer-chat-pagination{flex-wrap:wrap}.customer-chat-pagination>span{order:-1;width:100%}.login-form-panel .captcha-row{grid-template-columns:minmax(0,1fr) 100px}}
/* Conversation workspace: compact mobile hierarchy, complete details on demand. */
.conversation-avatar,.conversation-short-time,.conversation-channel,.message-meta-mobile,.summary-updated{display:none}
.conversation-row-body{min-width:0}.conversation-preview{font-size:12px;color:#66758a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:7px 0}
.chat-status{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:#166d57;background:#eaf6f0;border-radius:5px;padding:2px 7px;white-space:nowrap}
.chat-status i{width:5px;height:5px;border-radius:50%;background:currentColor;flex:none}
.chat-status.human{color:#245da8;background:#edf3ff}.chat-status.waiting{color:#925b15;background:#fff5e5}.chat-status.ended{color:#626d7e;background:#eff1f4}
.system-event{display:block;text-align:center;color:#6b7789;font-size:12px;margin:14px 0 22px}
.system-event details{max-width:100%;overflow-wrap:anywhere}.system-event summary{cursor:pointer;list-style:none}.system-event summary::-webkit-details-marker{display:none}.system-event summary time{display:block;font-size:11px;margin-top:3px}.system-event-detail{padding:10px;background:#eff2f6;border-radius:8px;margin-top:8px;text-align:left}
.delivery-failed{color:#b42332}.delivery-pending{color:#945d12}
@media(max-width:780px){
 :root{--muted:#66758a;--border:#e6ebf1;--bg:#f5f7fa;--ink:#1c2b40}
 .shell{padding:0;background:#f5f7fa}.shell-main{min-height:100dvh;border-radius:0;background:#f5f7fa;box-shadow:none}
 .topbar,.home-shell .topbar{height:56px;min-height:56px;background:#fff;padding:6px 16px}.topbar .mobile-toggle{border:0;background:transparent;margin-left:-8px;color:#34445b}.topbar .crumb{color:#506079;font-size:13px;font-weight:500}
 .content{padding:20px 16px 28px}.workspace-footer{position:static;padding:12px 16px 20px;color:#738198;font-size:11px}
 .page-heading h1{font-size:22px;letter-spacing:-.4px;font-weight:650}.page-heading p{font-size:12px;color:#66758a}
 .panel{border-radius:12px;box-shadow:none}.btn{border-radius:8px}.btn:disabled{cursor:default}.btn:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #5896ed;outline-offset:2px}
 .conversations-content{padding:22px 0 0}.conversations-content>.page-heading{padding:0 16px;margin-bottom:18px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px}
 .conversations-content>.page-heading>div:first-child{display:contents}.conversations-content .page-heading h1{grid-column:1;grid-row:1;margin:0;align-self:center}.conversations-content .page-heading p{grid-column:1/-1;grid-row:2;font-size:12px;margin-top:0}
 .conversations-content>.page-heading>.actions{width:auto;grid-column:2;grid-row:1;display:block}.conversations-content #new-conversation{background:#fff;border:1px solid #dce5f0;color:#356396;font-size:12px;padding:8px 11px;gap:5px}.conversations-content #new-conversation svg{width:16px;height:16px}
 .conversations-content .chat-layout:not(.has-active-conversation){border:0;border-radius:0;background:transparent;box-shadow:none}
 .conversation-search{padding:0 16px 12px;background:transparent;border:0}.conversation-search .field{position:relative;font-size:12px;color:#53657c;gap:7px;margin:0}.conversation-search input{border:1px solid #dfe6ef;border-radius:10px;background:#fff;height:46px;padding:10px 14px;font-size:16px;box-shadow:0 1px 2px #24395703}.conversation-search input::placeholder{font-size:14px;color:#738198}
 #conversation-count{font-size:11px;padding:10px 1px 0;color:#66758a}
 #conversation-results{border-top:1px solid #e6ebf1;background:#fff}
 .conversation-item{display:flex;gap:12px;padding:17px 16px;min-height:108px;border-bottom:1px solid #e9edf2;text-decoration:none;color:#1c2b40}.conversation-item:hover,.conversation-item.active{background:#f0f5fc}.conversation-item:active{background:#eaf1fc}
 .conversation-avatar{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:13px;color:#365c95;background:#eaf0fa;font-weight:650;font-size:17px;margin-top:1px}
 .conversation-item:nth-child(3n+2) .conversation-avatar{background:#eaf3f0;color:#377364}.conversation-item:nth-child(3n+3) .conversation-avatar{background:#f0edf8;color:#6b5694}
 .conversation-row-body{flex:1;min-width:0}.conversation-row-title{display:flex;align-items:baseline;gap:10px}.conversation-item strong{font-size:14px;line-height:1.5;color:#203149;font-weight:600;margin:0;min-width:0;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 .conversation-short-time{display:block;flex:none;color:#6a788b;font-size:11px;font-variant-numeric:tabular-nums}.conversation-item .customer-identity,.conversation-full-time{display:none}
 .conversation-preview{font-size:13px;color:#5e6e83;line-height:1.5;margin:5px 0 8px;max-width:100%}.conversation-channel{display:inline;font-size:11px;color:#6a788b}.conversation-row-footer{gap:6px}.conversation-row-footer .chat-status{font-size:10px;padding:1px 6px;line-height:1.7}
 .conversation-pagination{padding:14px 16px;border:0;background:transparent}.conversation-pagination .btn{min-width:78px;font-size:12px;background:white;border-color:#dfe6ef}.conversation-pagination .btn:disabled{background:transparent;opacity:.6}.conversation-pagination>span{color:#66758a;font-size:12px;font-variant-numeric:tabular-nums}
 .mobile-chat-toolbar{gap:8px;padding:max(8px,env(safe-area-inset-top)) 12px 8px 6px;min-height:70px;border-bottom:1px solid #e6ebf1}
 .mobile-chat-toolbar .chat-back{width:40px;min-width:40px;padding:10px;border:0;color:#334b6c;background:transparent}.chat-back svg{transform:rotate(180deg);width:21px;height:21px}
 .mobile-chat-title{flex:1;min-width:0}.mobile-chat-title strong{font-size:14px;font-weight:600;display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:1.5}.mobile-chat-title .chat-status{background:transparent;padding:1px 0;font-size:11px}
 .mobile-chat-toolbar #mobile-chat-details{font-size:12px;border:0;color:#356396;background:#f0f4fa;border-radius:8px;padding:8px 10px;min-height:44px}
 .conversation-summary-region{padding:8px 14px;background:#fff;border-bottom:1px solid #e6ebf1}.conversation-summary-region .conversation-summary{border:0;border-radius:8px;background:#f3f6fb;padding:0 12px;box-shadow:none}
 .conversation-summary summary{min-height:44px;padding:12px 0;line-height:20px;color:#344b69;font-size:12px}.summary-title{font-weight:600}.summary-state{font-size:11px;color:#617289}.summary-date{display:none}.summary-updated{display:block}.conversation-summary-region .summary-body{padding:0 0 12px;font-size:13px;color:#40536d}
 .chat-messages{padding:14px 14px 20px;background:#f5f7fa}.history-loader{min-height:24px;padding:0 0 10px}.history-loader .small{font-size:11px;color:#738198}
 .message{gap:9px;margin-bottom:22px;align-items:flex-start}.message .avatar{width:30px;height:30px;margin-top:21px;border-radius:9px;background:#e5ecef;color:#476577;font-size:12px}.message.ai-message .avatar{background:#e5edfc;color:#3465a6;font-size:10px;font-weight:700}.message-content{max-width:calc(100% - 42px);min-width:0;width:fit-content}
 .message-meta-full{display:none}.message-meta-mobile{display:inline}.message-meta{font-size:10px;color:#6a788b;margin:0 2px 5px;line-height:16px}
 .bubble{padding:11px 13px;font-size:15px;line-height:1.65;border:1px solid #e6eaf0;border-radius:2px 12px 12px 12px;color:#25364d;background:white;box-shadow:0 1px 2px #20314903}.staff .bubble{background:#eaf1ff;border-color:#dde7f8;border-radius:12px 2px 12px 12px}
 .system-event{margin:6px 0 22px;font-size:11px;color:#6a788b}.system-event summary{padding:8px 12px;min-height:44px}.system-event summary time{font-size:10px;margin-top:2px}.system-event-detail{font-size:11px}
 .chat-main>.composer{background:white;padding:10px 16px max(12px,env(safe-area-inset-bottom));border-top:1px solid #e6ebf1}.composer>.notice{border:0;background:transparent;color:#52657e;padding:0;font-size:11px;line-height:1.6;text-align:center}
 .chat-main.show-chat-details>.chat-heading{background:#fff;box-shadow:0 3px 8px #23364e06}.chat-heading .actions .btn{background:#f8fafc;border-color:#e1e7ef}
}
.chat-messages .attachments:empty{display:none}
/* Mobile IM visual language. Existing desktop styles and business routes are retained. */
.mobile-bottom-nav,.mobile-workspace-header,.mobile-conversation-shortcuts,.conversation-inline-status,.conversation-search-icon{display:none}
@media(max-width:780px){
 :root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif;--ink:#171a1f;--muted:#757a83;--bg:#fff;--border:#eef0f2;--green:#1677ff;--green-dark:#0968e8;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
 body{font-size:15px;line-height:1.5}.shell,.shell-main{background:#fff}.shell-main{padding-bottom:calc(94px + env(safe-area-inset-bottom))}.workspace-footer{display:none}
 .topbar,.home-shell .topbar{height:76px;min-height:76px;padding:max(14px,env(safe-area-inset-top)) 16px 10px;border-bottom:0;gap:8px;background:#fff}.topbar .crumb{display:none}.topbar>.row{flex:none;margin-left:auto}.topbar>.actions{display:none}.topbar .mobile-toggle{width:44px;margin:0;color:#25282d;border-radius:50%}
 .mobile-workspace-header{display:flex;gap:10px;align-items:center;min-width:0;flex:1}.mobile-workspace-header img{border-radius:10px;flex:none}.mobile-workspace-header>div{min-width:0}.mobile-workspace-header strong{font-size:17px;font-weight:600;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#181b20;line-height:1.4}.mobile-workspace-header span{font-size:12px;color:#757a83;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
 .content{padding:16px 16px 24px}.page-heading h1{font-size:21px;font-weight:600;color:#171a1f}.page-heading p{font-size:13px;color:#757a83}.btn{font-weight:400;border-radius:8px}.panel{border-color:#eceef1;border-radius:10px}.panel-head h2{font-weight:500;color:#1f2329}.badge{font-weight:400}.sidebar{background:#fff;box-shadow:8px 0 40px #18233818}
 .mobile-bottom-nav{position:fixed;z-index:12;bottom:max(12px,env(safe-area-inset-bottom));left:12px;right:12px;display:flex;align-items:stretch;justify-content:space-around;background:#fffffff5;border:1px solid #eeeff1;box-shadow:0 4px 24px #1e293b0c;border-radius:30px;padding:5px 4px;min-height:70px;backdrop-filter:blur(14px)}
 .mobile-bottom-nav>a,.mobile-bottom-nav>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;flex:1;min-width:0;min-height:58px;max-width:92px;padding:6px 2px;border-radius:24px;color:#73777e;background:transparent;font-size:11px;line-height:1.4;text-decoration:none;border:0}.mobile-bottom-nav svg{width:23px;height:23px;stroke-width:1.8}.mobile-bottom-nav [aria-current=page]{background:#f0f1f3;color:#181b20;font-weight:500}.mobile-bottom-nav [aria-current=page] svg{stroke-width:2.2}.mobile-bottom-nav a:active,.mobile-bottom-nav button:active{background:#e9edf4}
 body:has(.chat-layout.has-active-conversation) .mobile-bottom-nav{display:none}
 .conversations-content{padding:0}.conversations-content>.page-heading{padding:6px 16px 8px;gap:0;margin:0;align-items:center}.conversations-content .page-heading h1{font-size:21px;font-weight:600}.conversations-content .page-heading p{display:none}.conversations-content #new-conversation{font-size:12px;background:transparent;border:0;color:#515863;padding:8px 0 8px 10px;min-height:44px}.conversations-content #new-conversation svg{width:19px;height:19px;color:#252b34}
 .conversation-search{padding:4px 16px 0;display:flex;flex-direction:column}.conversation-search .field{display:block;position:relative}.conversation-search-label{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}.conversation-search-icon{position:absolute;left:14px;top:12px;display:block;color:#868b94;pointer-events:none}.conversation-search-icon svg{width:18px;height:18px}.conversation-search input{height:44px;min-height:44px;padding:10px 14px 10px 40px;border:1px solid transparent;border-radius:24px;background:#f3f4f5;color:#1f2329;font-size:16px;box-shadow:none}.conversation-search input::placeholder{color:#888d95;font-size:15px}.conversation-search input:focus{border-color:#69a4fa;background:#f6f8fc}
 #conversation-count{font-size:12px;color:#7d828b;padding:12px 0 4px}
 .mobile-conversation-shortcuts{display:flex;justify-content:space-around;padding:4px 16px 12px;gap:8px;border-bottom:7px solid #f7f8fa}.mobile-conversation-shortcuts:empty{display:none}.mobile-conversation-shortcuts a{display:flex;gap:7px;align-items:center;justify-content:center;min-height:44px;flex:1;color:#24272d;text-decoration:none;font-size:15px;font-weight:400}.mobile-conversation-shortcuts svg{width:21px;height:21px;color:#1677ff}.mobile-conversation-shortcuts a:nth-child(2) svg{color:#16a56b}.mobile-conversation-shortcuts a:nth-child(3) svg{color:#1677ff}
 #conversation-results{border:0;padding-top:3px}.conversation-item{min-height:88px;gap:12px;padding:16px;border:0;align-items:center;background:#fff}.conversation-item:hover,.conversation-item.active{background:#f6f7f9}.conversation-item:active{background:#eff1f4}
 .conversation-avatar{width:46px;height:46px;border-radius:13px;background:#329af0;color:#fff;font-size:20px;font-weight:500;margin:0}.conversation-item:nth-child(3n+2) .conversation-avatar{background:#efa142;color:#fff}.conversation-item:nth-child(3n+3) .conversation-avatar{background:#667ee7;color:#fff}
 .conversation-row-title{align-items:center;gap:5px}.conversation-item strong{font-size:16px;font-weight:500;color:#15181d;line-height:1.4}.conversation-short-time{font-size:11px;color:#858990;margin-left:3px}.conversation-preview{font-size:14px;color:#858990;margin:7px 0 0;line-height:1.45}.conversation-row-footer{display:none}
 .conversation-inline-status{display:inline-flex;flex:none;max-width:70px}.conversation-inline-status .chat-status{border:1px solid #b8dccf;background:transparent;color:#27845f;border-radius:8px;font-size:9px;font-weight:400;line-height:1.35;padding:1px 4px;gap:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;display:block}.conversation-inline-status .chat-status i{display:none}.conversation-inline-status .human{color:#3478c7;border-color:#c1d9f6}.conversation-inline-status .waiting{color:#aa7522;border-color:#ead7b3}.conversation-inline-status .ended{color:#7c8189;border-color:#dfe1e5}
 .conversation-pagination{padding:12px 16px;border-top:1px solid #f3f4f6}.conversation-pagination .btn{border:0;background:#f4f5f6;border-radius:18px;color:#616771;min-width:76px;min-height:44px}.conversation-pagination>span{color:#80858f}
 .mobile-chat-toolbar{min-height:66px;background:#fff;border-bottom:1px solid #edeef0;padding:max(8px,env(safe-area-inset-top)) 12px 8px 6px}.mobile-chat-title strong{font-size:16px;font-weight:500;color:#14171c}.mobile-chat-title .chat-status{font-size:11px;color:#737a84}.mobile-chat-title .chat-status i{color:#30a66d}.mobile-chat-toolbar .chat-back{color:#1f2329}.mobile-chat-toolbar #mobile-chat-details{background:transparent;color:#555d69;font-size:12px;padding:8px 6px}
 .conversation-summary-region{background:#fff;border-bottom:1px solid #e9ebef;padding:5px 14px 8px}.conversation-summary-region .conversation-summary{background:#f5f6f8;border:0;border-radius:8px;padding:0 12px}.conversation-summary summary{font-size:12px;color:#4a505b;min-height:40px;padding:10px 0}.summary-title{font-weight:500}.summary-state{color:#868b94;font-size:11px}.conversation-summary-region .summary-body{color:#4a505b;line-height:1.65}
 .chat-messages{background:#f5f6f8;padding:12px 14px 20px}.message{gap:10px;margin-bottom:20px}.message .avatar{width:34px;height:34px;border-radius:9px;background:#409cf0;color:white;font-size:14px;font-weight:400;margin-top:20px}.message.ai-message .avatar{background:#1677ff;color:white;font-size:11px;font-weight:600}.message-content{max-width:calc(100% - 44px)}.message-meta{font-size:11px;color:#898e98;font-weight:400;line-height:16px;margin-bottom:4px}.message-meta-mobile{font-size:11px}
 .bubble{font-size:16px;font-weight:400;line-height:1.55;letter-spacing:0;color:#1f2329;background:white;border:1px solid #e9ebef;border-radius:3px 8px 8px 8px;padding:10px 12px;box-shadow:none}.staff .bubble{background:#dfeaff;border-color:#dfeaff;border-radius:8px 3px 8px 8px;color:#1f2329}.message.staff .message-meta{color:#858b96}.system-event{font-size:11px;color:#9297a1;margin:0 0 16px}.history-loader .small{color:#969ba4}.system-event summary{min-height:44px;padding:8px 10px}
 .chat-main>.composer{background:#fafbfc;border-color:#e6e8ec;padding:12px 16px max(14px,env(safe-area-inset-bottom))}.composer>.notice{color:#808691;font-size:11px;line-height:1.5}
 .chat-heading .actions .btn{color:#373d47;background:#fff;border-color:#e5e7eb}.chat-heading h2{font-weight:500}.modal-head h2{font-weight:600}.modal-body{color:#252a34}.responsive-table td strong{font-weight:500}.responsive-table td::before{color:#838892}.settings-tabs .tab{color:#757a83}.settings-tabs .tab.active{color:#1677ff}
}
@media(max-width:360px){.conversation-inline-status{max-width:57px}.conversation-item{gap:10px;padding:15px 12px}.conversation-avatar{width:42px;height:42px}.conversation-item strong{font-size:15px}.conversation-preview{font-size:13px}.mobile-bottom-nav{left:8px;right:8px}.mobile-chat-title strong{font-size:15px}}
@media(max-width:780px){html{scroll-padding-bottom:calc(100px + env(safe-area-inset-bottom))}}
/* Compact mobile directories: details appear only for the selected record. */
.directory-toggle{display:none}
@media(max-width:780px){
 .directory-content>.page-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 10px;align-items:center;margin-bottom:16px}.directory-content>.page-heading>div:first-child{display:contents}.directory-content .page-heading h1{grid-column:1;grid-row:1;margin:0;font-size:21px}.directory-content .page-heading p{grid-column:1/-1;grid-row:2;font-size:12px;line-height:1.6}.directory-content>.page-heading>.actions{grid-column:2;grid-row:1;width:auto}.directory-content .page-heading>.actions .btn{font-size:12px;min-height:44px;padding:8px 10px;gap:4px;background:#f0f6ff;color:#1677ff;border-color:transparent}.directory-content .page-heading>.actions svg{width:16px;height:16px}
 .directory-content .panel:has(.compact-directory)>.panel-head{padding:12px 14px;background:#fafbfc}.directory-content .panel:has(.compact-directory)>.panel-head h2{font-size:12px;color:#7a818c;font-weight:400}
 .directory-content #customer-filter{display:flex;flex-wrap:nowrap;padding:12px;gap:8px}.directory-content #customer-filter input{min-width:0;flex:1;width:0;height:44px;border-radius:8px;background:#f5f6f8;border-color:transparent;font-size:16px}.directory-content #customer-filter input::placeholder{font-size:12px}.directory-content #customer-filter .btn{flex:none;padding:8px 10px;font-size:13px;border:0;color:#1677ff;background:transparent}
 .compact-directory.responsive-table tbody>tr{padding:0;border-bottom:1px solid #edf0f3;background:#fff}.compact-directory.responsive-table tbody>tr:last-child{border-bottom:0}
 .compact-directory.responsive-table tbody>tr>td{display:none;padding:8px 14px;font-size:13px;grid-template-columns:90px minmax(0,1fr);gap:10px}
 .compact-directory.responsive-table tbody>tr>td:first-child{display:block;padding:0}.compact-directory.responsive-table td:first-child::before,.compact-directory.responsive-table td:first-child>.table-cell-value{display:none}
 .directory-toggle{display:flex;align-items:center;gap:10px;width:100%;min-height:78px;text-align:left;padding:14px;background:white;color:#1f2329;border:0;border-radius:0}.directory-toggle:hover{background:#f8fafc}.directory-toggle:focus-visible{outline-offset:-3px}.directory-avatar{width:38px;height:38px;flex:none;display:grid;place-items:center;border-radius:10px;background:#eaf2ff;color:#3e7acb;font-size:17px;font-weight:500}.directory-record:nth-child(3n+2) .directory-avatar{background:#eaf5f0;color:#40866c}.directory-record:nth-child(3n+3) .directory-avatar{background:#f1edfa;color:#7961ac}
 .directory-label{min-width:0;flex:1}.directory-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;line-height:1.45;font-weight:500;color:#1f2329}.directory-subtitle{display:block;font-size:11px;line-height:1.5;color:#858b95;margin-top:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.directory-chevron{display:flex;color:#9aa1ac;flex:none}.directory-chevron svg{width:16px;height:16px}.directory-toggle>.badge{font-size:10px;padding:2px 5px;flex:none}
 .compact-directory.responsive-table tbody>tr.directory-open>td:not(:first-child){display:grid;background:#fafbfc}.directory-open .directory-toggle{background:#f4f8fe}.directory-open .directory-chevron{transform:rotate(90deg)}.compact-directory.responsive-table tbody>tr.directory-open>td:nth-child(2){padding-top:14px}.compact-directory.responsive-table tbody>tr.directory-open>td:last-child{padding-bottom:14px}.compact-directory .customer-notes{white-space:pre-wrap}.compact-directory .table-cell-value a{overflow-wrap:anywhere}
 .directory-content .table-foot{gap:8px;padding:12px;display:flex;flex-wrap:nowrap;font-size:11px}.directory-content .table-foot>.actions{width:auto;gap:4px;margin-left:auto}.directory-content .table-foot .btn{font-size:11px;min-height:44px;padding:7px 8px}
}
@media(max-width:780px){.directory-content #customer-filter .btn{width:auto}}
/* Phone customer details have their own scroll area; the chat keeps its position. */
@media(max-width:780px){
 .chat-main.show-chat-details>.chat-heading{display:block;flex:1 1 auto;min-height:0;max-height:none;height:auto;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:20px 16px max(24px,env(safe-area-inset-bottom));box-shadow:none;scroll-padding:16px}
 .chat-main.show-chat-details>.conversation-summary-region,.chat-main.show-chat-details>.chat-messages,.chat-main.show-chat-details>.composer{display:none}
 .chat-main.show-chat-details>.chat-heading>div:first-child{width:100%;min-width:0}.chat-main.show-chat-details>.chat-heading>.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;margin-top:20px;padding-top:18px;border-top:1px solid #eef0f3;gap:10px}
 .chat-main.show-chat-details .chat-heading>.actions .btn{min-height:46px;padding:10px 6px;font-size:12px;white-space:normal;line-height:1.5}.chat-main.show-chat-details .chat-heading .customer-identity{margin:12px 0}.chat-main.show-chat-details .chat-heading .conversation-times{margin:12px 0}
}
@media(max-width:780px){
 .mobile-chat-toolbar #mobile-chat-details{background:#edf4ff;border:1px solid #c7dcfa;color:#1769c9;border-radius:8px;min-height:44px;padding:10px 12px;font-size:13px;font-weight:500;box-shadow:0 1px 2px #1769c908}
 .mobile-chat-toolbar #mobile-chat-details:hover{background:#e3eeff}.mobile-chat-toolbar #mobile-chat-details:active{background:#d4e5ff;border-color:#7eaceb}.mobile-chat-toolbar #mobile-chat-details:focus-visible{outline:3px solid #77aafa;outline-offset:2px}
 .mobile-chat-toolbar #mobile-chat-details[aria-expanded=true]{background:#f5f7fa;border-color:#d7dee8;color:#3f5068}
}
/* Phone order overview: identifier, customer, statuses and factual milestones. */
.mobile-order-list,.mobile-order-empty{display:none}
@media(max-width:780px){
 .order-compact-list{display:none}.mobile-order-list{display:block}.mobile-order-empty{display:block}
 .orders-list-content>.page-heading{gap:10px}.orders-list-content>.page-heading>.actions{justify-content:flex-end}.orders-list-content>.page-heading>.actions>.btn{flex:none;padding:8px 12px;font-size:12px}
 .orders-list-content #order-filter{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:8px;padding:12px}.orders-list-content #order-filter input{grid-column:1/-1;width:100%;background:#f5f6f8;border-color:transparent;border-radius:9px}.orders-list-content #order-filter select{width:100%;min-width:0;font-size:12px;padding:8px 5px;min-height:44px}.orders-list-content #order-filter>.btn{width:auto;min-width:44px;font-size:12px;padding:8px;gap:4px}.orders-list-content #order-filter>.btn svg{width:14px;height:14px}
 .mobile-order-card{display:block;padding:15px 14px;border-bottom:7px solid #f5f6f8;color:#252a34;text-decoration:none;background:#fff}.mobile-order-card:last-child{border-bottom:0}.mobile-order-card:hover{text-decoration:none;background:#fafcff}.mobile-order-card:active{background:#f0f5fe}.mobile-order-card:focus-visible{outline-offset:-3px}
 .mobile-order-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}.mobile-order-title strong{font-family:Arial,sans-serif;font-size:16px;font-weight:600;color:#242b36;overflow-wrap:anywhere;min-width:0;letter-spacing:.2px}.mobile-order-title svg{width:16px;height:16px;color:#9ba2ad}
 .mobile-order-customer,.mobile-order-status{display:flex;align-items:center;gap:8px;margin:7px 0;font-size:13px;min-width:0}.mobile-order-customer>span,.mobile-order-status>span:first-child{font-size:12px;color:#838a95;flex:none;width:28px}.mobile-order-customer strong{font-size:13px;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mobile-order-status .badge{font-size:11px;font-weight:400;padding:2px 7px;border-radius:5px}
 .mobile-order-progress{display:flex;gap:10px;align-items:center;margin-top:12px;border-top:1px solid #f1f3f5;padding-top:10px}.mobile-order-progress>span{font-size:11px;color:#717985;flex:none}.mobile-order-progress small{font-size:9px;color:#969ba4;display:block}.mobile-order-progress ol{display:flex;flex:1;gap:5px;margin:0;padding:0;list-style:none;min-width:0}.mobile-order-progress li{flex:1;font-size:10px;color:#959ba5;min-width:0}.mobile-order-progress li i{display:block;height:4px;background:#e9edf2;border-radius:2px;margin-bottom:5px}.mobile-order-progress li.done{color:#3b876f}.mobile-order-progress li.done i{background:#3aaa85}.mobile-order-progress li.current{color:#287cf1}.mobile-order-progress li.current i{background:#77a8f4}.mobile-order-progress.exceptional strong{font-size:12px;color:#b37423;font-weight:500}
 .orders-list-content .table-foot{display:flex;flex-wrap:nowrap;padding:12px;gap:8px;font-size:11px}.orders-list-content .table-foot>.actions{width:auto;margin-left:auto;gap:4px}.orders-list-content .table-foot .btn{padding:7px 8px;font-size:11px;min-height:44px}
}
.reply-settings .reply-group{border:1px solid var(--border,#e5e7eb);border-radius:10px;min-width:0}
.reply-settings .reply-group>summary{padding:14px 16px;cursor:pointer;font-weight:600;min-height:48px}
.reply-settings .reply-group>summary>span{margin-left:12px;font-weight:400}
.reply-settings .reply-group-body{padding:0 16px}
.reply-settings .reply-item{padding:16px 0;border-top:1px solid var(--border,#e5e7eb);min-width:0}
.reply-settings .reply-item label{font-weight:600}
.reply-settings textarea{display:block;width:100%;min-height:90px;box-sizing:border-box}
.reply-settings .reply-variables{margin-top:8px;overflow-wrap:anywhere}
.reply-settings .reply-variables code{color:#285ba6}
.reply-settings .reply-validation{color:#b42318;margin:6px 0}
.reply-settings .reply-validation:empty{display:none}
.reply-settings .reply-preview{margin-top:12px;background:#f5f7fa;border-radius:8px;padding:10px 12px;overflow-wrap:anywhere}
.reply-settings .reply-preview>summary{cursor:pointer;min-height:28px}
.reply-settings .reply-preview .pre{white-space:pre-wrap}
.reply-settings .form-actions{flex-wrap:wrap;margin-top:20px}
@media(max-width:767px){
 .reply-settings .panel-body{padding:14px}.reply-settings .reply-group-body{padding:0 12px}.reply-settings .reply-group>summary{padding:14px 12px}
 .reply-settings .reply-item>.row{flex-wrap:wrap;gap:8px}.reply-settings .reply-item .btn{min-height:44px;width:auto;padding:8px 10px;font-size:12px}
 .reply-settings .reply-preview>summary{min-height:44px;display:flex;align-items:center}.reply-settings .form-actions>span{flex-basis:100%}
}

/* Knowledge management shares the existing enterprise visual tokens. */
.knowledge-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}.knowledge-tabs .btn{min-height:44px}
/* Collapsible sidebar sections share the existing page permissions and routes. */
.nav-parent{background:transparent;text-align:left;cursor:pointer}
.nav-parent:hover{color:#000;background:#dce5f0}
.nav-parent>span:not(.nav-chevron){flex:1;min-width:0}
.nav-parent .nav-chevron{display:flex;align-items:center;margin-left:auto;flex:none}
.nav-parent .nav-chevron svg{width:14px;height:14px;transform:rotate(90deg);transition:transform .16s ease;color:#9099a5}
.nav-parent[aria-expanded="true"] .nav-chevron svg{transform:rotate(270deg)}
.nav-children{display:grid;gap:2px;padding:2px 0 6px}
.nav-children[hidden]{display:none}
.nav-child{display:flex;align-items:center;min-height:38px;padding:9px 10px 9px 40px;border-radius:5px;font-size:14px;line-height:20px;font-weight:400;color:#000;overflow-wrap:anywhere}
.nav-child:hover{color:#2677e7;background:#dce9fa;text-decoration:none}
.nav-child.active{color:#2d83f5;background:#d3e3fa}
.nav-parent:focus-visible,.nav-child:focus-visible{outline:2px solid #287cf1;outline-offset:-2px}
@media(min-width:781px){
 .nav-child{font-family:"Microsoft YaHei UI","Microsoft YaHei","PingFang SC",Arial,sans-serif}
 .order-management-tabs,.knowledge-tabs{display:none}
}
@media(max-width:780px){.nav-parent,.nav-child{min-height:44px}.nav-child{padding-left:40px}}
@media(prefers-reduced-motion:reduce){.nav-parent .nav-chevron svg{transition:none}}
.knowledge-guide{max-width:960px;font-size:16px;line-height:1.85;overflow-wrap:anywhere}.knowledge-guide p{margin-bottom:20px}.knowledge-guide ul{padding-left:24px;margin:0 0 20px}.knowledge-guide li+li{margin-top:12px}.knowledge-guide .notice{font-size:inherit;line-height:inherit}
.knowledge-search{display:flex;gap:12px;align-items:end}.knowledge-search .field{flex:1;margin:0}
.knowledge-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border-top:1px solid var(--border,#e5e9ef)}
.knowledge-main{min-width:0;flex:1}.knowledge-main strong{overflow-wrap:anywhere}.knowledge-main .actions{margin-top:8px;flex-wrap:wrap}
.knowledge-detail-actions{flex-wrap:wrap;gap:8px;margin:16px 0}.knowledge-preview-answer{padding:16px 0;overflow-wrap:anywhere;max-height:45vh;overflow:auto}
.knowledge-list .btn{min-height:44px}.knowledge-tabs+div pre{overflow-wrap:anywhere;white-space:pre-wrap}
@media(max-width:700px){.knowledge-row{padding:14px 12px;gap:8px}.knowledge-search{padding:12px}.knowledge-tabs{gap:6px}.knowledge-tabs .btn{padding:8px 12px}.knowledge-detail-actions .btn{flex:1 0 auto;min-height:44px}}

/* Keep the common knowledge form short; optional matching details expand on demand. */
.knowledge-editor-options { border: 1px solid var(--border, #e5e7eb); border-radius: 8px; padding: 0 14px; }
.knowledge-editor-options > summary { cursor: pointer; min-height: 44px; display: list-item; align-content: center; padding: 12px 0; font-weight: 500; }
.knowledge-editor-options > .stack, .knowledge-editor-options > .form-grid { padding-bottom: 14px; }
.knowledge-editor [hidden] { display: none !important; }
.knowledge-keyword-field{display:grid;gap:7px;min-width:0}
.knowledge-keyword-label{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:600}
.knowledge-help-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;flex:none;border:0;border-radius:6px;background:transparent;color:var(--green);cursor:pointer}
.knowledge-help-button span{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border:1.5px solid currentColor;border-radius:50%;font-size:12px;font-weight:600;line-height:1}
.knowledge-help-button:hover,.knowledge-help-button:focus-visible,.knowledge-help-button[aria-expanded="true"]{background:#edf4ff}
.knowledge-keyword-help{position:fixed;inset:auto;margin:0;width:min(390px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:16px 18px;border:1px solid var(--border);border-radius:8px;background:#fff;color:var(--ink);box-shadow:0 8px 28px #17324926;font-size:13px;line-height:1.7;overflow-wrap:anywhere}
.knowledge-keyword-help p{margin:8px 0 0}.knowledge-keyword-example{margin-top:8px;padding:8px 12px;border-radius:5px;background:#f3f6fa}
@media(pointer:coarse){.knowledge-help-button{width:44px;height:44px}}

.model-request-details{margin-top:16px;min-width:0}.model-request-details summary{cursor:pointer;padding:12px 0;overflow-wrap:anywhere}.model-request-details p{overflow-wrap:anywhere}.model-request-body,.model-request-text{max-height:50vh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}

.model-direct-turn{min-width:0;padding-top:20px;border-top:1px solid var(--border)}

.routing-fields{border:0;padding:0;margin:20px 0;min-width:0}.routing-fields>legend{font-weight:700;margin-bottom:16px}.routing-rule{border:1px solid var(--border);border-radius:10px;margin:14px 0;padding:16px}.routing-rule>summary{cursor:pointer;font-weight:600;min-height:32px}.routing-rule[open]>summary{margin-bottom:16px}.routing-template{margin:18px 0}.routing-id{overflow-wrap:anywhere}

.routing-flow{background:var(--bg);border-left:3px solid var(--green);padding:12px 16px;line-height:1.75}.routing-fields :disabled{opacity:1;color:var(--ink);-webkit-text-fill-color:var(--ink);cursor:default}.routing-fields [hidden]{display:none!important}

.routing-preview-section{margin:22px 0;padding:18px;border:1px solid var(--border);border-radius:10px;background:var(--bg)}.routing-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.routing-preview-card{min-width:0}.routing-preview-card h4{margin:0 0 10px;font-size:13px;color:var(--muted)}.routing-preview-bubble{background:var(--white);border:1px solid var(--border);border-radius:12px;padding:16px;line-height:1.8;overflow-wrap:anywhere}.routing-preview-option{color:var(--green);text-decoration:underline}.routing-preview-grid[aria-busy=true]{opacity:.55}@media(max-width:780px){.routing-preview-grid{grid-template-columns:1fr}}

/* Desktop reference, 2026-10-03: user-supplied WeCom measurements.
   Shared typography and controls use measured values; phone layouts stay independent.
   Hover/focus states are our accessible adaptations, not claimed reference measurements. */
@media (min-width:781px) {
 :root {
  --desktop-font:system-ui,-apple-system,BlinkMacSystemFont,Helvetica,"PingFang SC",SCHeiti,"Microsoft YaHei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
  --navy:#e8effa;--navy-deep:#e8effa;--bg:#e8effa;
  --green:#267ef0;--green-dark:#1d69ce;--green-pale:rgba(38,126,240,.06);
  --ink:#10141a;--muted:rgba(10,17,26,.5);--border:rgba(6,15,26,.07);
  --desktop-link:#1b539a;--control-border:rgba(7,15,26,.15);
  font-family:var(--desktop-font);
 }
 body{font-size:14px;line-height:20px}
 a{color:var(--desktop-link)}
 .sidebar{background:var(--bg)}
 .nav-link,.nav-child{font-family:var(--desktop-font);font-size:14px;font-weight:400;line-height:20px;min-height:40px;border-radius:6px}
 .nav-link{padding:10px 13px}.nav-child{padding:10px 10px 10px 40px}
 .nav-link.active,.nav-child.active{color:var(--green);background:rgba(38,126,240,.12)}
 .nav-link.active svg{color:var(--green)}
 .nav-link:hover,.nav-child:hover{color:var(--green);background:rgba(38,126,240,.07)}
 .nav-parent:hover{color:#000;background:rgba(7,15,26,.06)}
 .shell-main{box-shadow:none;border-radius:10px}
 .content{padding:24px 32px 36px}.topbar{padding-inline:32px}
 .crumb,.crumb strong,.top-date,.page-heading p{color:var(--muted)}
 .page-heading{padding-bottom:20px;margin-bottom:24px;border-bottom:1px solid var(--border);flex-wrap:wrap}
 .page-heading h1,.home-title{font-size:18px;font-weight:700;line-height:24px;color:#000;letter-spacing:0}
 .page-heading p{font-size:13px;line-height:18px}
 .panel-head h2,.modal-head h2{font-size:16px;font-weight:700;line-height:22.4px;color:var(--ink)}
 .panel-head h2 .mono{font-size:inherit;line-height:inherit}
 .modal-head h2{font-size:18px;line-height:24px}
 .content h3{font-size:15px;font-weight:700;line-height:21px;color:var(--ink)}
 .panel{border-color:var(--border);border-radius:8px;box-shadow:none}
 .panel-head{padding:20px 24px}.panel-body{padding:24px}.stack{gap:24px}
 .toolbar{padding:16px 20px;gap:12px}.table-foot{padding:12px 20px}
 .btn,.knowledge-list .btn,#kf-servicers-result .btn{font-size:14px;font-weight:400;line-height:20px;min-height:32px;padding:5px 12px;border-radius:4px;border-color:var(--control-border)}
 .btn.primary{background:var(--green);border-color:transparent;color:#fff}
 .btn.primary:hover{background:var(--green-dark)}
 .btn:not(.primary):not(.danger):not(.ghost):hover{background:#f6f6f7}
 .btn.ghost{border-color:transparent}.btn.danger{border-color:#f0d8d8}
 .btn.icon{width:32px;padding:5px}.btn:disabled{transform:none}
 .content .text-btn,.modal-body .text-btn{font-size:14px;font-weight:400;line-height:20px;color:var(--desktop-link)}
 .content .text-btn:hover,.modal-body .text-btn:hover{text-decoration:underline}
 .btn:disabled:hover{background:#fff}.btn.primary:disabled:hover{background:var(--green)}
 :is(.shell,dialog) input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),:is(.shell,dialog) select {
  font-family:inherit;font-size:14px;line-height:20px;min-height:32px;height:32px;
  padding:5px 12px;border-radius:4px;border-color:var(--control-border);
 }
 select{padding-right:28px}
 textarea{font-family:inherit;font-size:14px;line-height:20px;min-height:100px;padding:8px 12px;border-radius:4px;border-color:var(--control-border)}
 input[type=file]{font-size:14px;border-color:var(--control-border)}
 input[type=checkbox],input[type=radio]{width:16px;height:16px;min-height:16px;padding:0;accent-color:var(--green);flex:none}
 input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
 input:focus,select:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 2px rgba(38,126,240,.14)}
 :focus-visible{outline-color:var(--green)}
 .nav-parent:focus-visible,.nav-child:focus-visible{outline-color:var(--green)}
 .field,label.field,.callback-field,.checkbox,.knowledge-keyword-label{font-size:14px;line-height:20px;font-weight:400}
 .channel-enabled{font-weight:700}.form-grid{gap:20px 24px}
 .field small,.callback-field small{font-size:12px;line-height:18px}
 .form-actions{margin-top:24px;padding-top:20px}
 .kv{grid-template-columns:120px minmax(0,1fr);font-size:14px;line-height:20px;gap:16px;margin:16px 0}
 .kv dt{color:var(--muted)}.kv dd{color:var(--ink)}
 table{font-size:14px;line-height:20px}th{font-size:13px;font-weight:400;line-height:24px;color:rgba(11,18,26,.6);background:#f6f6f7;letter-spacing:0}
 th{padding:5px 18px}td{padding:14px 18px;color:var(--ink)}th,td{border-bottom-color:var(--border)}
 td strong{font-weight:600}td .mono,td.mono{font-size:13px}
 .timeline-entry p:not(.small){font-size:14px;line-height:20px}
 .tab{font-size:14px;line-height:20px;font-weight:400;padding:16px 0;color:var(--ink)}
 .tab.active{color:var(--green);font-weight:700;border-color:var(--green)}
 .notice{font-size:13px;line-height:20px;color:var(--ink);background:#f3f6fc;border-color:rgba(38,126,240,.12);border-radius:4px}
 .badge{font-weight:400}.badge.amber{background:#fdf4dc}
 .bubble{font-size:14px;line-height:21px}.conversation-item strong{font-size:14px}.message-meta{font-size:12px;line-height:18px}
 .conversation-item{color:var(--ink)}
 .conversation-item .muted,.conversation-item .customer-identity{font-size:12px;line-height:18px}
 .conversation-preview{font-size:13px;line-height:18px;color:var(--muted)}
 .knowledge-guide{font-size:14px;line-height:1.75}.knowledge-row{padding:16px 24px}
 .knowledge-main strong{font-weight:600}.knowledge-keyword-help{font-size:13px;line-height:20px}
 .knowledge-editor-options,.channel-optional,.reply-settings .reply-group,.routing-rule{border-radius:8px}
 .reply-settings .reply-group>summary,.routing-rule>summary{font-weight:600}
 .modal-head{padding:20px 24px}.modal-body{padding:24px}
.home-quick-link>span:last-child,.home-message{color:var(--ink)}
 .home-section-caption,.company-section-title{color:var(--muted)}
 .sidebar-footer{font-size:13px;line-height:18px;color:var(--muted)}
 .sidebar .tenant-switcher label,.sidebar-company{font-size:13px;line-height:18px;color:var(--muted)}
 .workspace-state{font-size:13px;line-height:18px;color:var(--muted)}
 .workspace-state strong{display:flex;align-items:center;gap:6px;font-size:13px;line-height:18px;font-weight:400;color:inherit}
 .workspace-state svg,.sidebar-company svg{width:16px;height:16px}
 .user-chip .name{font-size:13px;line-height:18px;font-weight:400;color:var(--ink)}
 .user-chip .role{font-size:12px;line-height:18px;color:var(--muted)}
 .workspace-footer{font-size:12px;line-height:15px;color:rgba(8,16,26,.3)}
}

/* Keep the workspace caption on the same text column as the isolation label. */
.workspace-state{display:grid;grid-template-columns:16px minmax(0,1fr);column-gap:6px;row-gap:7px}
.workspace-state strong{display:contents}
.workspace-state svg{width:16px;height:16px;align-self:center}
.workspace-state strong>span,.workspace-state .workspace-kind{grid-column:2;min-width:0}
@media(min-width:781px){
 .sidebar-footer .user-chip{display:grid;grid-template-columns:16px minmax(0,1fr) 28px;column-gap:6px}
 .sidebar-footer .user-chip .avatar{width:24px;height:24px;justify-self:center;font-size:13px;border-radius:4px}
 .sidebar-footer .user-chip .btn{width:28px}
}

/* Customer detail entry keeps the surrounding order typography. */
.customer-detail-link{padding:0;border:0;background:none;color:var(--desktop-link,#1b539a);font:inherit;text-align:inherit;cursor:pointer}.customer-detail-link:hover{text-decoration:underline}.customer-detail-link:disabled{cursor:wait}.customer-detail-fields dd{overflow-wrap:anywhere}.mobile-order-summary{display:block;color:inherit}.mobile-order-summary:hover{text-decoration:none}

.order-export-dates[hidden]{display:none}

.customer-order-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:12px}.customer-order-stats>div{padding:14px;border:1px solid var(--border);border-radius:6px}.customer-order-stats span{display:block;color:var(--muted);font-size:13px;line-height:18px}.customer-order-stats strong{display:block;margin-top:8px;font-size:24px;line-height:30px;font-weight:600;color:var(--ink)}@media(max-width:600px){.customer-order-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Keep phone controls inside their cells, including unbroken member IDs. */
@media(max-width:780px){
 .recipient-list{grid-template-columns:minmax(0,1fr);min-width:0}
 .recipient-list .checkbox,.recipient-list .checkbox>span{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .recipient-list input[type=checkbox]{flex:none}
 .mobile-order-customer strong{min-width:0;flex:1}
 .mobile-order-customer .customer-detail-link{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .mobile-order-customer .customer-detail-link:focus-visible{outline-offset:-2px}
 .directory-content .page-heading>.actions .btn.primary{color:#fff;background:#287cf1;border-color:#287cf1}
 .directory-content .page-heading>.actions .btn.primary:hover{background:#1766d2;border-color:#1766d2}
}
@media(max-width:360px){
 .orders-list-content #order-filter{grid-template-columns:repeat(2,minmax(0,1fr))}
.orders-list-content #order-filter>.btn{grid-column:1/-1}
}

/* Customer nicknames use the same reference blue on desktop and phones. */
.conversation-item .conversation-row-title>strong{color:var(--desktop-link,#1b539a)}

/* Layout audit: keep complete controls and reading space at narrow/short sizes. */
@media(min-width:781px){
 .modal-body .field+.field{margin-top:16px}
 .modal-body :is(.form-grid,.appointment-grid)>.field{margin-top:0}
 .chat-main>.chat-heading{max-height:35%;overflow:auto;overscroll-behavior:contain}
 .chat-main>.conversation-summary-region{max-height:20%;overflow:auto;overscroll-behavior:contain}
 .chat-main>.composer{max-height:25%;overflow:auto;overscroll-behavior:contain}
 .chat-main>.chat-messages{min-height:100px}
}
@media(max-width:780px){
 .modal-actions{flex-wrap:wrap}
 .modal-actions>.btn{flex:1 1 auto;min-width:max-content;max-width:100%;white-space:nowrap}
 .mobile-bottom-nav span{white-space:nowrap}
}

@media(min-width:781px) and (max-width:1050px){
 .chat-layout{display:flex;flex-direction:column;height:auto;min-height:0}
 .chat-layout .conversation-list{max-height:240px;border-right:0;border-bottom:1px solid var(--border);flex:none}
 .chat-layout .chat-main{height:600px;flex:none}
 .chat-layout:not(.has-active-conversation) .chat-main{display:none}
}

/* Supplied Qizhi emblem: retain aspect ratio and blend its white canvas. */
.brand img.brand-mark,.login-emblem,.mobile-workspace-header>img{object-fit:contain;border-radius:0;mix-blend-mode:multiply;box-shadow:none}
.brand .brand-name,.login-intro-brand{color:#084b39}

.order-percent{padding:12px 0;margin-bottom:12px}.order-percent progress{display:block;width:100%;height:14px;accent-color:#287cf1;margin:10px 0}.item-progress{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:12px;border-top:1px solid #e9edf2}.item-progress .full{grid-column:1/-1}.item-row{align-items:start}.item-row .remove-item{grid-column:5;grid-row:1}.order-percent .small{margin:6px 0}@media(max-width:640px){.item-progress{grid-template-columns:minmax(0,1fr)}.item-row .remove-item{grid-column:auto;grid-row:auto}}

/* Customer capability order view: product progress and touch-friendly actions. */
.public-progress{margin:18px 0 12px}
.public-progress-label{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;font-size:14px}
.public-progress-label strong{color:var(--green)}
.public-progress progress{display:block;width:100%;height:12px;border:0;border-radius:6px;overflow:hidden;background:var(--green-pale);accent-color:var(--green)}
.public-progress progress::-webkit-progress-bar{background:var(--green-pale);border-radius:6px}
.public-progress progress::-webkit-progress-value{background:var(--green);border-radius:6px}
.public-progress progress::-moz-progress-bar{background:var(--green);border-radius:6px}
.public-product-search{display:flex;align-items:flex-end;gap:12px;margin-bottom:16px}
.public-product-search .field{flex:1;min-width:0;margin:0;font-size:14px}
.public-product-search .field[hidden]{display:none}
.public-product-search input{min-height:44px;font-size:16px;width:100%;margin-top:6px}
.public-product-search .btn,.public-product-actions .btn{min-height:44px;min-width:108px;font-size:14px}
.public-products-list{display:grid;gap:16px}
.public-product-card{border:1px solid var(--border);border-radius:9px;padding:18px;min-width:0}
.public-product-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.public-product-heading h3{font-size:16px;margin:0;overflow-wrap:anywhere}
.public-product-status{color:var(--green);font-size:14px;overflow-wrap:anywhere;flex-shrink:0;max-width:45%;text-align:right}
.public-product-meta{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin:12px 0}
.public-product-meta>div{display:flex;gap:8px;font-size:14px;min-width:0}
.public-product-meta dt{color:var(--muted);flex:none}
.public-product-meta dd{margin:0;overflow-wrap:anywhere}
.public-product-actions{display:flex;align-items:center;gap:12px;margin-top:16px}
.public-product-actions p{margin:0;font-size:13px;overflow-wrap:anywhere}
.public-products-count{font-size:13px;margin:0 0 12px}
@media(max-width:600px){
 .public-product-search{flex-wrap:wrap;gap:8px}
 .public-product-search .field{flex-basis:100%}
 .public-product-card{padding:16px 12px}
 .public-product-meta{grid-template-columns:minmax(0,1fr);gap:6px}
 .public-product-actions{align-items:flex-start;flex-direction:column;gap:8px}
 .public-product-actions .btn{width:100%}
}

/* Internal order products: compact columns, inline units and expandable notes. */
.order-product-table{min-width:0;max-width:100%}
.order-product-table table{table-layout:fixed;width:100%;white-space:normal}
.order-product-table th,.order-product-table td{padding:12px;white-space:normal;overflow-wrap:anywhere;vertical-align:top}
.order-product-table th:nth-child(1){width:23%}
.order-product-table th:nth-child(2){width:16%}
.order-product-table th:nth-child(3){width:10%}
.order-product-table th:nth-child(4){width:13%}
.order-product-table th:nth-child(5){width:19%}
.order-product-table th:nth-child(6){width:19%}
.order-product-table td.pre .table-cell-value{white-space:pre-wrap}
.order-product-meter{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.order-product-meter progress{display:block;flex:1;min-width:36px;width:100%;height:8px;accent-color:var(--green)}
.order-product-meter span{font-size:12px;color:var(--ink);white-space:nowrap}
.order-product-table .has-details td{border-bottom:0}
.order-product-table .order-product-extra td{padding-top:0}
.order-product-details summary{cursor:pointer;color:var(--green);min-height:36px;padding:8px 0;font-size:13px;overflow-wrap:anywhere}
.order-product-details summary:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.order-product-description{background:var(--green-pale);padding:12px 16px;border-radius:6px;margin-bottom:4px;white-space:normal}
.order-product-description .pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:0}
.order-product-description dl{margin:0}
.order-product-description .kv{grid-template-columns:minmax(80px,25%) minmax(0,1fr);margin:8px 0}
@media(max-width:768px){
 .order-product-table table{table-layout:auto}
 .order-product-table .responsive-table tbody>tr.has-details{border-bottom:0;padding-bottom:0}
 .order-product-table .responsive-table tbody>tr.order-product-extra{padding-top:0}
 .order-product-table .responsive-table tbody>tr.order-product-extra>td{display:block;padding:0}
 .order-product-table .responsive-table .order-product-extra td::before{display:none}
 .order-product-details summary{min-height:44px;padding:12px 0}
}

.customer-period-filter{align-items:flex-end}
.customer-period-filter .field{margin:0;gap:7px;width:140px;min-width:0}
.customer-period-filter .field input,.customer-period-filter .field select{width:100%}
.customer-period-filter .field[hidden]{display:none}
.customer-period-overview{margin-bottom:24px}
.customer-period-summary{margin:18px 0}
.customer-period-summary .stat{background:#fff;border-color:var(--border);border-radius:8px;box-shadow:none}
.customer-period-summary .stat-value{font-size:25px;letter-spacing:0;overflow-wrap:anywhere}
.customer-period-state-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0}
.customer-period-states{display:flex;flex-wrap:wrap;gap:12px;font-size:13px}
.customer-period-orders th,.customer-period-orders td{white-space:normal;overflow-wrap:anywhere}
.customer-period-products summary{min-height:36px;cursor:pointer;color:var(--green);padding:8px 0}
.customer-period-products p{margin:8px 0;overflow-wrap:anywhere}
@media(max-width:768px){
 .customer-period-filter .field{flex:1;min-width:120px}
 .customer-period-filter .field input,.customer-period-filter .field select,.customer-period-filter .btn{min-height:44px;height:44px}
 .customer-period-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .customer-period-state-grid{grid-template-columns:minmax(0,1fr)}
 .customer-period-products summary{min-height:44px}
}

/* Order percentage cells share the existing meter, caption and badge styles. */
.order-status-percentage{min-width:120px;max-width:240px}
.order-status-caption{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px}
.mobile-order-percentages{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:12px 0 0}
.mobile-order-percentages .order-status-percentage{min-width:0;max-width:none;margin-top:6px}
.mobile-order-percentages .order-product-meter{flex-wrap:nowrap}
@media(max-width:420px){.mobile-order-percentages{grid-template-columns:1fr;gap:12px}}

#order-notification-summary{margin-bottom:24px}
.order-notification-recipients{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.order-notification-recipients p{margin:6px 0 0;overflow-wrap:anywhere}
@media(max-width:768px){.order-notification-recipients{grid-template-columns:minmax(0,1fr)}}

@media(min-width:769px){.customer-period-filter .field input,.customer-period-filter .field select{height:32px;min-height:32px;padding-top:4px;padding-bottom:4px}}

/* Shared order meters: explicit track/fill replaces browser-native bevels. */
:is(.order-product-meter,.order-percent,.public-progress) progress{
 -webkit-appearance:none;appearance:none;display:block;height:8px;border:0;border-radius:999px;overflow:hidden;background:#e9eef5;accent-color:var(--green);box-shadow:none
}
:is(.order-product-meter,.order-percent,.public-progress) progress::-webkit-progress-bar{background:#e9eef5;border-radius:999px;box-shadow:none}
:is(.order-product-meter,.order-percent,.public-progress) progress::-webkit-progress-value{background:var(--green);border-radius:999px}
:is(.order-product-meter,.order-percent,.public-progress) progress::-moz-progress-bar{background:var(--green);border-radius:999px}
.order-product-meter{flex-wrap:nowrap;gap:10px}
.order-product-meter progress{flex:1 1 0;width:auto;min-width:36px}
.order-product-meter>span{flex:0 0 54px;text-align:right;font-variant-numeric:tabular-nums;line-height:1.4}
.order-percent .row>strong:last-child,.public-progress-label>span{font-variant-numeric:tabular-nums}

/* Order editor: shared control sizes, paired labels, and aligned product fields. */
.order-editor{align-items:start}
.order-editor .customer-picker-field{position:relative;min-width:0}
.order-editor .customer-picker-hint{margin:-8px 0 0;font-size:12px;line-height:18px}
.order-editor .field{margin:0!important;min-width:0}
.order-editor #items{display:grid;gap:16px;margin-top:12px}
.order-editor .item-row{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(72px,.65fr) minmax(64px,.6fr) 32px;gap:16px 12px;margin:0;padding:16px;border:1px solid var(--border);border-radius:8px;background:var(--white);align-items:start}
.order-editor .item-field{display:grid;gap:7px;font-size:14px;line-height:20px;font-weight:400}
.order-editor .item-field>span{display:block;color:var(--ink);font-size:inherit;line-height:inherit}
.order-editor .item-row .remove-item{grid-column:5;grid-row:1;align-self:end;width:32px;min-width:32px;height:32px;min-height:32px;padding:6px}
.order-editor .item-progress{gap:20px 24px;padding:16px 0 0;border-top:1px solid var(--border)}
.order-editor .item-progress textarea{min-height:80px}
@media(max-width:780px){
 .order-editor .item-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;padding:14px;gap:14px 12px}
 .order-editor .item-field:nth-child(-n+2){grid-column:1/-1}
 .order-editor .item-row .remove-item{grid-column:3;grid-row:3;width:44px;min-width:44px;height:44px;min-height:44px}
 .order-editor .item-progress{grid-template-columns:minmax(0,1fr);gap:16px;padding-top:14px}
 .order-editor .item-field{font-size:14px;line-height:20px}
 .order-editor .item-row input{padding:8px 10px;font-size:16px}
}

/* Keep production record controls aligned with the order editor. */
.record-editor{align-items:start}
.record-editor .field{margin:0!important;min-width:0}
.record-editor #progress-scope-hint{margin:0;font-size:12px;line-height:18px}
.record-editor .notice{margin:0}

.order-detail-progress-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.order-detail-progress-summary .order-product-meter{margin-top:14px}
.product-shipment-row{display:flex;gap:16px;flex-wrap:wrap;padding:8px 0;border-top:1px solid var(--border)}
.shipment-attachment-details{margin:12px 0;min-width:0}.shipment-attachment-details>summary{width:fit-content;max-width:100%;min-height:44px;cursor:pointer}.shipment-attachment-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(180px,100%),1fr));gap:12px;margin-top:12px}.shipment-attachment-card{display:flex;flex-direction:column;align-items:stretch;gap:8px;min-width:0;border:1px solid var(--border);border-radius:8px;padding:10px}.shipment-attachment-image{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:130px;width:100%;padding:8px;background:var(--bg);color:inherit;border:0;border-radius:6px;cursor:pointer}.shipment-attachment-image img{width:100%;height:120px;object-fit:contain}.shipment-attachment-image img[hidden]{display:none}.shipment-attachment-name{white-space:normal;overflow-wrap:anywhere;text-align:left;min-height:44px}.shipment-attachment-details>summary:focus-visible,.shipment-attachment-image:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.shipment-products-details{margin:12px 0;min-width:0}.shipment-products-details>summary{width:fit-content;max-width:100%;white-space:normal;min-height:44px;cursor:pointer}.shipment-products-details>summary:focus-visible{outline:2px solid var(--green);outline-offset:2px}.shipment-products-table{margin-top:12px;max-width:100%;overflow-x:auto}.shipment-products-table td{white-space:normal;overflow-wrap:anywhere}.shipment-products-table table{min-width:420px}
@media(max-width:780px){.order-detail-progress-summary{grid-template-columns:minmax(0,1fr);gap:16px}.product-shipment-row{gap:8px 12px}}

.order-row-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.order-product-table th:nth-child(1){width:16%}.order-product-table th:nth-child(2){width:10%}.order-product-table th:nth-child(3){width:9%}.order-product-table th:nth-child(4){width:12%}.order-product-table th:nth-child(5){width:14%}.order-product-table th:nth-child(6){width:11%}.order-product-table th:nth-child(7){width:14%}.order-product-table th:nth-child(8){width:14%}
.mobile-order-product{font-size:13px;color:var(--muted);padding:8px 0}
@media(max-width:780px){.mobile-order-card>.order-row-actions{justify-content:flex-end;padding-top:12px}}

/* Import preview uses shared panels, badges, tables and control sizes. */
.import-preview-toolbar{align-items:end;gap:16px}.import-preview-toolbar .field{margin:0;min-width:160px}.import-preview-table th,.import-preview-table td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}.import-preview-table table{table-layout:fixed}.import-preview-table th:nth-child(1){width:12%}.import-preview-table th:nth-child(2){width:20%}.import-preview-table th:nth-child(3){width:20%}.import-preview-table th:nth-child(4){width:13%}.import-preview-table th:nth-child(5){width:18%}.import-preview-table th:nth-child(6){width:17%}.import-cell{margin:3px 0;white-space:pre-wrap;overflow-wrap:anywhere}.import-cell.changed,.import-cell.added{border-left:3px solid var(--green);padding-left:8px}.import-cell.invalid{background:#fff0ef;border-left:3px solid var(--red);padding:6px 8px}.import-field-error{color:var(--red);font-size:12px;margin:5px 0}.import-invalid-row>td:first-child{border-left:3px solid var(--red)}.import-row-details summary,.import-warning summary{cursor:pointer;color:var(--green);padding:8px 0;min-height:32px}.import-field-grid{display:grid;gap:12px;margin-top:10px}.import-warning{margin-top:16px}#import-error-summary p{margin:8px 0 12px}#import-issue-list th,#import-issue-list td{white-space:normal;overflow-wrap:anywhere}#import-preview .import-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}#import-preview .import-stats span{border:1px solid var(--border);border-radius:8px;padding:12px 16px}#import-preview .import-stats strong{display:block}
@media(max-width:780px){.import-preview-toolbar{display:grid;grid-template-columns:minmax(0,1fr);padding:16px}.import-preview-toolbar .field{min-width:0}.import-preview-toolbar input,.import-preview-toolbar select{height:44px;min-height:44px}.import-preview-table table,.import-preview-table tbody,.import-preview-table tr,.import-preview-table td{display:block;width:100%}.import-preview-table thead{display:none}.import-preview-table td{border:0;padding:6px 16px}.import-preview-table tr{border-bottom:1px solid var(--border);padding:12px 0}.import-row-details summary,.import-warning summary{min-height:44px}#import-preview .import-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}

/* Conversation updates leave the composer and reading position intact. */
#live-chat-controls{display:contents}.chat-live-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 20px;border-top:1px solid var(--border);background:#fff;flex:none}.chat-live-bar [hidden]{display:none!important}.chat-live-bar .btn{font-size:12px;min-height:32px}.chat-messages{overflow-anchor:none}.chat-heading-info{min-width:0;overflow-wrap:anywhere}
@media(max-width:780px){.chat-live-bar{padding:6px 14px}.chat-live-bar .btn{min-height:44px}.chat-main.show-chat-details>.chat-live-bar{display:none}.chat-live-bar .small{font-size:11px}}

/* Platform database inspector: existing panel, form and table tokens. */
.database-layout{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:24px;align-items:start}
.database-layout>.panel{min-width:0}.database-summary{flex-wrap:wrap;gap:16px}
.database-table-list{display:grid;gap:8px;max-height:640px;overflow:auto}
.database-table-choice{font:inherit;text-align:left;display:grid;gap:6px;width:100%;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--white);color:inherit;cursor:pointer;overflow-wrap:anywhere}
.database-table-choice.active{border-color:var(--green);background:var(--green-pale)}
.database-table-choice:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.database-table-name{overflow-wrap:anywhere}.database-structure{margin:16px 0}.database-structure summary,.database-data-table summary{cursor:pointer;padding:8px 0}
.database-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:20px 0}
.database-filters .field{margin:0!important;flex:1 1 150px;min-width:0}.database-filters button{flex:0 0 auto}
.database-row-id{overflow-wrap:anywhere;max-width:240px}.database-json{white-space:pre-wrap;overflow-wrap:anywhere;max-height:360px;overflow:auto;min-width:220px;max-width:640px;margin:12px 0;font-size:13px;line-height:1.6}
@media(max-width:900px){.database-layout{grid-template-columns:minmax(0,1fr)}.database-table-list{max-height:260px}}
@media(max-width:600px){.database-filters .field{flex-basis:100%}.database-filters button,.database-table-choice{min-height:44px}.database-filters input,.database-filters select{min-height:44px}.database-data-table{min-width:600px}}

.database-data-table td{vertical-align:top}.database-data-table .database-row-id{white-space:normal}.database-data-table details{white-space:normal}.database-filters .pagination{min-width:0}

.database-structure .database-field-description{white-space:normal;min-width:220px;max-width:480px;overflow-wrap:anywhere}

/* Keep production and shipment meters aligned even when captions are empty. */
.order-status-percentage{display:grid;grid-template-rows:20px minmax(26px,auto);row-gap:6px}
.order-status-percentage>.order-product-meter{min-height:20px}
.order-status-percentage>.order-status-caption{margin-top:0;min-height:26px;align-items:flex-start;align-content:flex-start}
.responsive-table td:has(.order-status-percentage){vertical-align:top}

/* Product status configuration uses the existing form and button tokens. */
.product-schema-row{grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;align-items:end;padding:14px 0;border-bottom:1px solid var(--border)}
.product-schema-row .remove-status{min-height:44px}
@media(max-width:780px){.product-schema-row{grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:12px}.product-schema-row .remove-status{grid-column:1/-1;justify-self:start}}

/* Current KF directory selection uses the existing recipient list layout. */
.kf-directory-picker .checkbox{min-height:44px;padding:8px;cursor:pointer;border:1px solid var(--border);border-radius:8px;overflow-wrap:anywhere}.kf-directory-picker .checkbox:has(input:disabled){cursor:default;background:var(--paper,#f7f9fc)}.kf-directory-picker input[type=radio]{width:18px;min-height:18px;flex:none;margin:0}.kf-directory-picker .checkbox span{min-width:0;overflow-wrap:anywhere}#kf-add-directory .actions{margin-top:12px}#kf-add-directory .btn{min-height:44px}

.kf-directory-error{background:#fff0ef;border:1px solid #f4d6d3;color:#a73535;border-radius:8px;padding:13px 16px}

/* Full-screen order editor: keep each product on its own aligned row. */
dialog.order-fullscreen{inset:0;margin:0;width:100vw;max-width:none;height:100dvh;max-height:100dvh;border:0;border-radius:0}
html.mobile-visual-viewport dialog{position:fixed;top:var(--mobile-viewport-top);bottom:calc(100% - var(--mobile-viewport-top) - var(--mobile-viewport-height));max-height:calc(var(--mobile-viewport-height) - 20px);margin:auto}
html.mobile-visual-viewport dialog.order-fullscreen{height:var(--mobile-viewport-height);max-height:var(--mobile-viewport-height);margin:0}
html.mobile-keyboard-open .mobile-bottom-nav{display:none}
html.mobile-visual-viewport dialog .modal-actions{margin:0}
html.mobile-viewport-short dialog .modal-head{padding:8px 14px}
html.mobile-viewport-short dialog .modal-head h2{max-height:48px;overflow:auto}
html.mobile-viewport-short dialog .modal-body{padding:8px 14px}
html.mobile-viewport-short dialog .modal-actions{padding:8px 14px max(8px,env(safe-area-inset-bottom))}
/* The keyboard already occupies the bottom safe area; leave room for an input. */
html.mobile-keyboard-open.mobile-viewport-tight dialog{max-height:var(--mobile-viewport-height)}
html.mobile-keyboard-open.mobile-viewport-tight dialog :is(.modal-head,.modal-body,.modal-actions){padding:4px 14px}
html.mobile-keyboard-open.mobile-viewport-tight dialog .modal-head h2{max-height:44px}
dialog.order-fullscreen .modal-form{flex:1}
dialog.order-fullscreen .modal-body{flex:1}
dialog.order-fullscreen .modal-actions{border-top:1px solid var(--border);padding-bottom:max(16px,env(safe-area-inset-bottom))}

/* EXE remote manager: preserve local drafts while polling only status/list regions. */
dialog.bridge-remote-modal{width:min(1180px,calc(100vw - 32px))}
.bridge-remote-root,.bridge-remote-view,.bridge-remote-editor,.bridge-remote-fields{min-width:0;max-width:100%}
.bridge-remote-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:16px 0}
.bridge-remote-status p{flex-basis:100%;margin:0;overflow-wrap:anywhere}
.bridge-remote-toolbar{flex-wrap:wrap;justify-content:space-between;margin:14px 0}
.bridge-remote-tabs{padding:0;gap:20px;margin:16px 0}
.bridge-remote-feedback:not(:empty){margin:14px 0;padding:12px 15px;border:1px solid var(--border);border-radius:5px;background:var(--green-pale);overflow-wrap:anywhere}
.bridge-remote-feedback.bridge-remote-feedback-error{background:#fff1f1;color:#8b3439}
.bridge-remote-root :is(input,select,textarea){min-width:0;max-width:100%}
.bridge-remote-root .actions{gap:8px;flex-wrap:wrap}
.bridge-remote-root .table-wrap{max-width:100%;overflow-x:auto}
.bridge-remote-root table{min-width:700px}
.bridge-remote-break{white-space:normal;overflow-wrap:anywhere;max-width:380px}
.bridge-remote-editor{border:1px solid var(--border);border-radius:7px;padding:20px;margin-top:18px;background:#fff}
.bridge-remote-editor[hidden],.bridge-remote-root [hidden]{display:none!important}
.bridge-remote-editor>.row{justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.bridge-remote-editor fieldset{min-width:0;border:1px solid var(--border);border-radius:5px;padding:14px;margin:14px 0}
.bridge-remote-editor legend{padding:0 6px;font-size:13px}
.bridge-remote-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;max-height:300px;overflow:auto}
.bridge-remote-check{display:flex;align-items:center;gap:10px;min-height:44px;font-size:13px;overflow-wrap:anywhere}
.bridge-remote-check input{flex:none;width:18px;height:18px;margin:0}
.bridge-remote-models{margin:14px 0}
.bridge-remote-section{border-bottom:1px solid var(--border);padding:0 0 18px;margin:0 0 18px;min-width:0}
.bridge-remote-section-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:10px}
.bridge-remote-section-head h3,.bridge-remote-editor>.row h3{margin:0}
.bridge-remote-empty{margin:12px 0;padding:14px 16px;border:1px solid var(--border);border-radius:5px;background:#fafbfd;text-align:center}
.bridge-remote-directory-config{border:1px solid var(--border);border-radius:5px;padding:0 14px;margin:12px 0}
.bridge-remote-directory-config summary{cursor:pointer;padding:12px 0;font-size:13px}
.bridge-remote-directory-config[open]{padding-bottom:14px}
.bridge-remote-directory-config textarea{min-height:84px;max-height:220px}
.bridge-remote-directory-config .actions{margin-top:12px}
.bridge-remote-directory-query{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;margin:14px 0 10px}
.bridge-remote-directory-results{min-width:0}
.bridge-remote-directory-results .field{margin:10px 0}
.bridge-remote-update-summary{margin:14px 0}
.bridge-remote-update-summary .panel-body{padding:16px 18px;overflow-wrap:anywhere}
.bridge-remote-update-summary p{margin-bottom:5px}
.bridge-remote-desktop-summary{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,2fr);gap:16px;margin:14px 0;padding:16px;border:1px solid var(--border);border-radius:5px;background:#fafbfd}
.bridge-remote-desktop-summary p{margin:6px 0 0;overflow-wrap:anywhere}
.bridge-remote-desktop .actions{margin:14px 0}
.bridge-remote-desktop-summary .bridge-remote-break{max-width:none}
@media(max-width:780px){
 dialog.bridge-remote-modal{width:calc(100vw - 20px)}
 .bridge-remote-root .responsive-table table{display:table;min-width:700px}
 .bridge-remote-root .responsive-table thead{display:table-header-group;position:static;width:auto;height:auto;overflow:visible;clip-path:none;white-space:nowrap}
 .bridge-remote-root .responsive-table tbody{display:table-row-group}
 .bridge-remote-root .responsive-table tr{display:table-row;padding:0;border:0}
 .bridge-remote-root .responsive-table th,.bridge-remote-root .responsive-table tbody>tr>td{display:table-cell;width:auto;padding:12px;white-space:normal;border-bottom:1px solid var(--border)!important}
 .bridge-remote-root .responsive-table td::before{display:none}
 .bridge-remote-root .responsive-table .table-cell-value{width:auto;min-width:0}
 .bridge-remote-editor{padding:14px}
 .bridge-remote-checks{grid-template-columns:minmax(0,1fr)}
 .bridge-remote-directory-query{grid-template-columns:minmax(0,1fr)}
 .bridge-remote-desktop-summary{grid-template-columns:minmax(0,1fr);gap:12px;padding:14px}
 .bridge-remote-root :is(button,input:not([type=checkbox]),select){min-height:44px}
}
.order-fullscreen .order-products-scroll{overflow-x:auto;max-width:100%;padding-bottom:4px}
@media(min-width:1000px){
 .order-fullscreen .order-editor{grid-template-columns:repeat(4,minmax(0,1fr))}
 .order-fullscreen .order-editor .customer-picker-field{grid-column:1/3}
 .order-fullscreen .order-editor .customer-picker-hint{grid-column:3/5;align-self:center;margin:0}
 .order-fullscreen .order-editor #items{gap:10px;min-width:1550px}
 .order-fullscreen .order-editor .item-row{grid-template-columns:minmax(150px,1.2fr) minmax(100px,.8fr) 80px 64px minmax(125px,.9fr) 92px minmax(170px,1.3fr) minmax(150px,1.2fr) 125px 145px 44px;padding:12px;gap:12px;align-items:start}
 .order-fullscreen .order-editor .item-row>.item-field:nth-child(1){grid-column:1;grid-row:1}
 .order-fullscreen .order-editor .item-row>.item-field:nth-child(2){grid-column:2;grid-row:1}
 .order-fullscreen .order-editor .item-row>.item-field:nth-child(3){grid-column:3;grid-row:1}
 .order-fullscreen .order-editor .item-row>.item-field:nth-child(4){grid-column:4;grid-row:1}
 .order-fullscreen .order-editor .item-row>.item-field{grid-template-rows:40px auto}
 .order-fullscreen .order-editor .item-progress{display:contents}
 .order-fullscreen .order-editor .item-progress>.field{display:grid;gap:7px;font-size:14px;line-height:20px;grid-template-rows:40px auto;grid-column:span 2}
 .order-fullscreen .order-editor .item-progress>.field:nth-child(1){grid-column:5;grid-row:1}
 .order-fullscreen .order-editor .item-progress>.field:nth-child(2){grid-column:6;grid-row:1}
 .order-fullscreen .order-editor .item-progress>.field:nth-child(3){grid-column:7;grid-row:1}
 .order-fullscreen .order-editor .item-progress>.field:nth-child(4){grid-column:8;grid-row:1}
 .order-fullscreen .order-editor .item-progress textarea{height:44px;min-height:44px;resize:none;overflow:auto}
 .order-fullscreen .order-editor .item-row :is(input[data-item],select[data-item],textarea[data-item]){height:44px;min-height:44px;font-size:14px;font-weight:400;line-height:20px;padding:11px 10px;border:1px solid var(--control-border);border-radius:4px;margin:0;width:100%;min-width:0}
 .order-fullscreen .order-editor .item-row .remove-item{grid-column:11;grid-row:1;align-self:start;margin-top:47px;width:44px;min-width:44px;height:44px;min-height:44px}
}

@media(min-width:1000px){
.order-fullscreen .order-editor .item-progress>.field:nth-child(5){grid-column:9;grid-row:1}
.order-fullscreen .order-editor .item-progress>.field:nth-child(6){grid-column:10;grid-row:1}
}
.shipment-product-fields{padding:14px;border:1px solid var(--border);border-radius:8px}

/* Order editor controls share one size; checkbox/file and custom multiline fields retain their own semantics. */
.order-fullscreen .order-editor :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]),select){height:44px;min-height:44px;font-size:14px;font-weight:400;line-height:20px;padding:11px 10px;border-radius:4px}
.order-fullscreen .order-editor .item-progress>.field{font-weight:400}

/* Keep long business labels inside their form column and mobile actions at readable widths. */
label.field{grid-template-columns:minmax(0,1fr);overflow-wrap:anywhere}
@media(max-width:780px){.page-heading>.actions>.btn{flex:0 1 auto}}

/* Customer order: all product progress stays visible, extra history is secondary. */
/* Dedicated customer-facing order cards; business screens keep their existing styles. */
.public-order-page{max-width:1320px;--public-blue:#245fad;--public-blue-soft:#f0f6ff;--public-teal:#146b60;--public-teal-soft:#f0f8f5;--public-ink:#18324f}
.public-order-page .query-hero{margin-bottom:20px}
.public-order-overview>.panel{box-shadow:0 4px 20px #17304a06;border-radius:14px}
.public-order-heading{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-bottom:14px;align-items:start}
.public-order-heading>div{min-width:0;overflow-wrap:anywhere}
.public-order-heading h2{margin:4px 0 0;font-size:25px;color:var(--public-ink)}
.public-order-heading>div:last-child{text-align:right;display:grid;gap:4px}
.public-summary-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0 12px}
.public-summary-counts>div{padding:14px 16px;border-radius:10px;background:var(--public-blue-soft);display:grid;gap:4px}
.public-summary-counts>div:nth-child(2){background:var(--public-teal-soft)}
.public-summary-counts span{font-size:13px;color:var(--muted)}
.public-summary-counts strong{font-size:28px;line-height:1.25;color:var(--public-blue);font-variant-numeric:tabular-nums}
.public-summary-counts>div:nth-child(2) strong{color:var(--public-teal)}
.public-order-progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.public-order-explanation{color:var(--muted);font-size:13px;line-height:1.7;margin:12px 0 0}
.public-order-overview .public-progress-label{flex-wrap:wrap;gap:4px 8px}
.public-order-overview .public-progress-label strong{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.public-order-overview .public-products-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.public-order-overview .public-products-list>.empty{grid-column:1/-1}
.public-order-overview .public-product-card{display:block;padding:0;border:1px solid #d5e1ef;border-radius:12px;box-shadow:0 4px 14px #18324f08;background:#fff;min-width:0}
.public-order-overview .public-product-identity{display:flex;justify-content:space-between;gap:16px;padding:18px 20px;background:var(--public-blue-soft);border-left:4px solid var(--public-blue);border-radius:11px 11px 0 0;min-width:0}
.public-order-overview .is-complete .public-product-identity{border-left-color:var(--public-teal)}
.public-product-title{min-width:0;flex:1}
.public-order-overview .public-product-number{display:block;width:auto;height:auto;border-radius:0;background:none;color:var(--public-blue);font-size:12px;font-weight:600;margin:0 0 5px;letter-spacing:.4px}
.public-order-overview .public-product-identity h3{font-size:20px;font-weight:700;color:var(--public-ink);line-height:1.45;margin:0 0 7px;overflow-wrap:anywhere}
.public-order-overview .public-product-spec{font-size:14px;line-height:1.6;color:#44566d;margin:0;overflow-wrap:anywhere}
.public-product-spec>span{color:#5b6e85;margin-right:6px}
.public-product-ordered{flex:none;max-width:42%;min-width:0;align-self:center;text-align:right;overflow-wrap:anywhere}
.public-product-ordered>span{font-size:12px;color:#526981;display:block;margin-bottom:2px}
.public-product-ordered strong{font-size:26px;line-height:1.35;color:var(--public-ink);font-variant-numeric:tabular-nums}
.public-product-ordered>div>span{font-size:13px;color:#526981}
.public-product-progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:16px}
.public-product-production,.public-product-delivery{min-width:0;padding:12px;border-radius:9px;background:var(--public-blue-soft)}
.public-product-delivery{background:var(--public-teal-soft)}
.public-product-section-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;min-height:26px;font-size:13px;line-height:1.5}
.public-product-section-heading>span:first-child{display:flex;align-items:center;gap:5px;font-weight:600;color:var(--public-blue)}
.public-product-section-heading svg{width:17px;height:17px}
.public-product-delivery .public-product-section-heading>span:first-child{color:var(--public-teal)}
.public-order-overview .public-product-status,.public-product-delivery-status{display:inline-block;max-width:100%;text-align:left;font-size:12px;line-height:1.5;padding:3px 7px;border-radius:5px;background:#e0ecff;color:var(--public-blue);overflow-wrap:anywhere;margin:0}
.public-order-overview .is-complete .public-product-status{background:#dceee6;color:var(--public-teal)}
.public-product-delivery-status{background:#dceee6;color:var(--public-teal)}
.public-product-progress-grid .public-progress{margin:12px 0 0}
.public-product-progress-grid .public-progress-label{font-size:13px;align-items:baseline;gap:4px;margin-bottom:8px}
.public-product-progress-grid .public-progress-label strong{font-size:20px;line-height:1.35;color:var(--public-blue)}
.public-product-progress-grid progress{height:8px;background:#dce7f6;accent-color:var(--public-blue)}
.public-product-progress-grid progress::-webkit-progress-bar{background:#dce7f6}
.public-product-progress-grid progress::-webkit-progress-value{background:var(--public-blue)}
.public-product-progress-grid progress::-moz-progress-bar{background:var(--public-blue)}
.public-product-delivery .public-progress-label strong{color:var(--public-teal)}
.public-product-delivery progress{accent-color:var(--public-teal);background:#d9e9e3}
.public-product-delivery progress::-webkit-progress-bar{background:#d9e9e3}
.public-product-delivery progress::-webkit-progress-value{background:var(--public-teal)}
.public-product-delivery progress::-moz-progress-bar{background:var(--public-teal)}
.public-product-quantities{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0 0;line-height:1.6}
.public-product-quantities>div{min-width:0;overflow-wrap:anywhere}
.public-product-quantities dt{font-size:12px;color:#516d66}
.public-product-quantities dd{margin:1px 0 0;font-size:12px;color:#516d66}
.public-product-quantities strong{font-size:17px;font-variant-numeric:tabular-nums;color:#194d43}
.public-product-details{min-width:0;border-top:1px solid #e3eaf2;padding:0 16px}
.public-product-details>summary{display:flex;align-items:center;gap:10px;min-height:48px;cursor:pointer;font-size:14px;line-height:1.7;padding:12px 0;color:var(--public-ink);list-style:none;overflow-wrap:anywhere}
.public-product-details>summary::-webkit-details-marker{display:none}
.public-product-details>summary>span:first-child{font-weight:600;flex:1;min-width:0}
.public-product-batch-count{font-size:12px;color:#5b6e85}
.public-product-details>summary>svg{width:16px;height:16px}
.public-product-details[open]>summary>svg{transform:rotate(90deg)}
.public-product-details>summary:hover{color:var(--public-blue)}
.public-product-details .public-shipment-history h4{font-size:13px;margin:8px 0}
.public-product-details .public-shipment-history p{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr);gap:8px;padding:10px 0;border-bottom:1px solid var(--border);margin:0;font-size:13px;overflow-wrap:anywhere}
.public-product-details .public-history-empty{margin:8px 0}
.public-product-details .public-product-actions{display:grid;gap:8px;margin:12px 0 16px}
.public-product-details .public-product-actions .btn{min-width:0;width:100%;color:var(--public-blue);border-color:#c9d9ee;background:#f8fbff}
.public-order-records>details{padding:0 20px;border-bottom:1px solid var(--border)}
.public-order-records>details:last-child{border-bottom:0}
.public-order-records>details>summary{min-height:44px;cursor:pointer;font-size:14px;line-height:1.7;padding:10px 0;overflow-wrap:anywhere}
.public-order-records .panel-body{padding:4px 0 18px}
@media(max-width:1099px){.public-order-overview .public-products-list{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){
 .public-order-heading{grid-template-columns:minmax(0,1fr);gap:12px}
 .public-order-heading>div:last-child{text-align:left}
 .public-summary-counts{gap:6px}
 .public-summary-counts>div{padding:10px 8px}
 .public-summary-counts span{font-size:12px}
 .public-summary-counts strong{font-size:23px}
 .public-order-progress-grid{grid-template-columns:minmax(0,1fr);gap:0}
 .public-order-overview .public-products-list{gap:16px}
 .public-order-overview .public-product-identity{padding:14px 12px;gap:12px}
 .public-order-overview .public-product-identity h3{font-size:18px}
 .public-product-ordered strong{font-size:24px}
 .public-product-progress-grid{grid-template-columns:minmax(0,1fr);padding:12px;gap:10px}
 .public-product-production,.public-product-delivery{padding:10px 12px}
 .public-product-progress-grid .public-progress-label strong{font-size:19px}
 .public-product-quantities{margin-top:10px}
 .public-product-quantities>div{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px}
 .public-product-details{padding:0 12px}
 .public-order-records>details{padding:0 14px}
}


/* Desktop uses one aligned row per product; mobile retains the dedicated cards. */
.public-products-columns{display:none}
@media(min-width:1024px){
 .public-order-overview{--public-product-columns:minmax(0,1.6fr) minmax(0,.55fr) minmax(0,1.1fr) minmax(0,1.1fr) minmax(0,.95fr) minmax(0,.7fr)}
 .public-products-columns{display:grid;grid-template-columns:var(--public-product-columns);gap:16px;padding:14px 16px;background:#edf3fb;border:1px solid #d5e1ef;border-bottom:0;border-radius:10px 10px 0 0;color:#445b74;font-size:13px;font-weight:600}
 .public-order-overview .public-products-list{grid-template-columns:minmax(0,1fr);gap:0;border:1px solid #d5e1ef;border-radius:0 0 10px 10px}
 .public-order-overview .public-product-card{display:grid;grid-template-columns:var(--public-product-columns);gap:12px 16px;align-items:start;padding:16px;border:0;border-bottom:1px solid #e3eaf2;box-shadow:none;border-radius:0;background:#fff}
 .public-order-overview .public-product-card:last-child{border-bottom:0;border-radius:0 0 10px 10px}
 .public-order-overview .public-product-identity,.public-product-progress-grid,.public-product-delivery{display:contents}
 .public-order-overview .public-product-card{position:relative}
 .public-product-details{grid-column:6;grid-row:1;display:block;border:0;padding:0}
 .public-product-details[open]{grid-column:1/-1;grid-row:2}
 .public-product-details[open]>summary{position:absolute;right:16px;top:16px;width:calc((100% - 112px) * .1166667)}
 .public-product-title{grid-column:1;grid-row:1;border-left:3px solid var(--public-blue);padding-left:12px}
 .public-order-overview .is-complete .public-product-title{border-left-color:var(--public-teal)}
 .public-order-overview .public-product-identity h3{font-size:17px;margin-bottom:5px}
 .public-order-overview .public-product-spec{font-size:13px}
 .public-product-ordered{grid-column:2;grid-row:1;max-width:100%;align-self:start;text-align:left;padding-top:8px}
 .public-product-ordered{position:relative}
 .public-product-ordered>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
 .public-product-ordered strong{font-size:22px}
 .public-product-production{grid-column:3;grid-row:1;padding:10px 12px}
 .public-product-delivery-progress{grid-column:4;grid-row:1;padding:10px 12px;border-radius:9px;background:var(--public-teal-soft)}
 .public-product-progress-grid .public-progress-label strong{font-size:18px}
 .public-product-quantities{grid-column:5;grid-row:1;margin:8px 0 0;gap:8px}
 .public-product-details>summary{flex-wrap:wrap;align-self:start;padding:8px 0;font-size:13px}
 .public-product-details>summary>span:first-child{flex-basis:100%;font-weight:600}
 .public-product-details:not([open])>:not(summary){display:none}
 .public-product-details[open]>.public-shipment-history,.public-product-details[open]>.public-history-empty{grid-column:1/-1;grid-row:2;margin:0;padding:12px 16px;background:#f7fafc;border:1px solid #e3eaf2;border-radius:8px}
 .public-product-details .public-shipment-history h4{margin:0 0 8px}
 .public-product-details[open]>.public-product-actions{display:flex;align-items:center;flex-wrap:wrap;margin:12px 0 0;gap:12px}
 .public-product-details .public-product-actions .btn{width:auto;min-width:120px}
 .public-product-details .public-product-actions p{flex:1;min-width:0}
}

/* Customer order product picker shares the customer selector surface. */
.public-product-search{align-items:flex-start}
.public-product-picker{position:relative}
.public-product-search>#public-product-clear{margin-top:26px}
.public-product-picker-input{display:flex;gap:0;margin-top:6px;min-width:0}
.public-product-picker-input input{flex:1;min-width:0;margin-top:0;border-top-right-radius:0;border-bottom-right-radius:0}
.public-product-picker-input .btn{min-width:44px;width:44px;flex:0 0 44px;padding:10px;border-left:0;border-top-left-radius:0;border-bottom-left-radius:0}
.public-product-picker-input svg{transform:rotate(90deg)}
.public-product-options{position:static;margin-top:4px;background:var(--surface,#fff);box-shadow:0 8px 24px #13223720}
.public-product-options[hidden]{display:none}
.public-product-options button{min-height:44px;overflow-wrap:anywhere;white-space:normal}
.public-product-options strong,.public-product-options span{display:block}
.public-product-options span{font-size:12px;color:var(--muted);margin-top:4px}
.public-product-options [aria-selected=true]{background:#edf5ff;outline:2px solid var(--primary,#287cf8);outline-offset:-2px}
.public-product-options p{padding:12px;margin:0}
@media(max-width:640px){.public-product-search>#public-product-clear{margin-top:0}}

/* Compact desktop heading keeps the brand, page title and link hint in one row. */
@media(min-width:1024px){
 .public-order-page{padding-top:24px}
 .public-order-header{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:24px}
 .public-order-header .brand{margin-bottom:0;justify-self:start}
 .public-order-header .query-hero{display:contents}
 .public-order-header .query-hero h1{font-size:26px;line-height:1.4;margin:0}
 .public-order-header .query-hero p{margin:0;text-align:right;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
 .public-order-page>.query-result{margin-top:20px}
}

/* Motion is decorative and clipped to the actual, incomplete progress value. */
.public-order-page .public-progress-meter{position:relative;border-radius:999px;overflow:hidden}
.public-order-page .public-progress-meter.is-moving::after{content:"";position:absolute;inset:0 auto 0 0;width:var(--public-progress-percent);border-radius:inherit;pointer-events:none;background-image:repeating-linear-gradient(115deg,transparent 0 10px,#ffffff32 10px 20px,transparent 20px 30px);background-size:40px 100%;animation:public-progress-flow 2.8s linear infinite}
@keyframes public-progress-flow{from{background-position:0 0}to{background-position:40px 0}}
@media(prefers-reduced-motion:reduce){.public-order-page .public-progress-meter.is-moving::after{display:none;animation:none}}

.public-order-external{display:grid;gap:4px;text-align:center}
.public-order-external-value{font-size:22px;line-height:1.4;color:var(--public-ink);overflow-wrap:anywhere}
@media(max-width:600px){.public-order-external{text-align:left}}

/* A continuous blue frame makes each mobile product easy to distinguish. */
@media(max-width:600px){
 .public-order-overview .public-product-card{border:4px solid #8fb7ed;box-shadow:0 4px 14px #245fad14}
 .public-order-overview .public-product-identity{border-left:0;border-radius:7px 7px 0 0}
}

/* Keep the brand and order title on one compact mobile header row. */
@media(max-width:600px){
 .public-order-page{padding-top:20px}
 .public-order-header{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px 16px}
 .public-order-header .brand{margin-bottom:0;justify-self:start}
 .public-order-header .query-hero{display:contents}
 .public-order-header .query-hero h1{font-size:24px;line-height:1.4;margin:0;justify-self:end;text-align:right}
 .public-order-header .query-hero p{grid-column:1/-1;margin:0;text-align:left;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
 .public-order-page>.query-result{margin-top:16px}
}

/* A restrained enterprise presentation for the customer-facing order portal. */
.public-order-page{position:relative;isolation:isolate;min-height:100vh;--muted:#586b80;--border:#dce5ef;--public-frame:#8fb7ed;--public-surface:#f6f9fd;--public-shadow:0 8px 28px #18324f08}
.public-order-page::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,#eaf2ff 0,#f3f7fc 320px,#f5f8fc 100%)}
.public-order-header .query-hero h1{color:var(--public-ink);font-weight:700;letter-spacing:.5px}
.public-order-header .query-hero p{color:var(--muted)}
.public-order-overview>.panel{border-color:var(--border);border-radius:16px;box-shadow:var(--public-shadow)}
.public-order-page .panel-head{padding:18px 24px;background:linear-gradient(90deg,#f9fbff,#fff);border-color:var(--border)}
.public-order-page .panel-head h2{display:flex;align-items:center;gap:9px;font-size:16px;font-weight:650;color:var(--public-ink);margin:0}
.public-order-page .panel-head h2::before{content:"";width:3px;height:16px;flex:none;background:var(--public-blue);border-radius:2px}
.public-order-page .panel-body{padding:24px}
.public-order-heading{gap:12px}
.public-order-heading>div{background:var(--public-surface);border:1px solid #e5edf6;border-radius:12px;padding:12px 16px;align-self:stretch;align-content:start}
.public-order-heading>div:first-child{background:var(--public-blue-soft);border-color:#dce8f8}
.public-order-heading h2{font-size:24px;line-height:1.4;letter-spacing:.2px}
.public-order-external-value{font-size:20px;line-height:1.4}
.public-summary-counts{gap:12px;margin:20px 0 16px}
.public-summary-counts>div{border:1px solid #e2ebf8;padding:14px 16px;border-radius:12px;gap:6px}
.public-summary-counts>div:nth-child(2){border-color:#dcece7}
.public-summary-counts span{color:var(--muted)}
.public-order-progress-grid{gap:16px}
.public-order-progress-grid>.public-progress{min-width:0;padding:14px 16px;margin:0;background:var(--public-blue-soft);border:1px solid #e2ebf8;border-radius:12px}
.public-order-progress-grid>.public-progress:nth-child(2){background:var(--public-teal-soft);border-color:#dcece7}
.public-order-progress-grid .public-progress-label{font-size:14px;line-height:1.6;margin-bottom:10px}
.public-order-progress-grid .public-progress-label strong{font-size:20px;color:var(--public-blue)}
.public-order-progress-grid>.public-progress:nth-child(2) .public-progress-label strong{color:var(--public-teal)}
.public-order-progress-grid progress{height:9px}
.public-order-progress-grid>.public-progress:nth-child(2) progress{accent-color:var(--public-teal)}
.public-order-progress-grid>.public-progress:nth-child(2) progress::-webkit-progress-value{background:var(--public-teal)}
.public-order-progress-grid>.public-progress:nth-child(2) progress::-moz-progress-bar{background:var(--public-teal)}
.public-order-explanation{font-size:12px;line-height:1.7;padding:12px 0 0;margin:16px 0 0;border-top:1px solid #e9eef5}
.public-order-page .public-product-search{gap:12px}
.public-order-page .public-product-picker label{font-size:13px;color:#445b72;font-weight:500}
.public-order-page .public-product-picker-input input{border-color:#cbd9ea;background:#fbfdff;min-height:44px;font-size:14px}
.public-order-page .public-product-picker-input .btn{border-color:#cbd9ea;background:#f0f6ff;color:var(--public-blue)}
.public-order-page .public-product-search>#public-product-clear{min-height:44px;border-color:#cbd9ea;background:#fff;color:var(--public-blue);font-size:13px}
.public-order-page .public-product-options{border-color:#cbd9ea;border-radius:10px}
.public-order-page .public-products-count{font-size:13px;color:var(--muted);margin:18px 0 12px}
.public-order-page .public-product-details>summary:focus-visible,.public-order-page .public-order-records summary:focus-visible{outline:2px solid var(--public-blue);outline-offset:3px;border-radius:6px}
.public-order-page .public-product-actions .btn:active,.public-order-page .public-product-search .btn:active{background:#e6effc}
.public-order-records>details>summary{color:var(--public-ink);font-weight:500;min-height:48px}
@media(max-width:1023px){
 .public-order-header{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:12px 8px}
 .public-order-header .brand{margin-bottom:0;justify-self:start;grid-column:1;grid-row:1;gap:6px}
 .public-order-header .query-hero{display:contents}
 .public-order-header .query-hero h1{grid-column:2;grid-row:1;justify-self:center;text-align:center;font-size:24px;line-height:1.4;margin:0;white-space:nowrap}
 .public-order-header .query-hero p{grid-column:1/-1;grid-row:2;margin:0;text-align:center;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
 .public-order-overview .public-product-identity{background:linear-gradient(120deg,#edf5ff,#f6f9ff)}
 .public-order-overview .public-product-production,.public-order-overview .public-product-delivery{border:1px solid #e2ebf8;border-radius:10px}
 .public-order-overview .public-product-delivery{border-color:#dcece7}
 .public-order-overview .public-product-section-heading{font-size:14px}
}
@media(max-width:600px){
 .public-order-page{padding:20px 12px 32px}
 .public-order-header .brand img.brand-mark{width:28px;height:28px}
 .public-order-header .brand .brand-name{font-size:18px}
 .public-order-header .brand .brand-sub{font-size:9px;letter-spacing:0;white-space:nowrap}
 .public-order-page .panel-head{padding:16px}
 .public-order-page .panel-body{padding:16px}
 .public-order-heading{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .public-order-heading>div{padding:10px}
 .public-order-heading>div:first-child{grid-column:1/-1}
 .public-order-heading h2{font-size:22px}
 .public-order-external-value{font-size:17px}
 .public-summary-counts{gap:6px;margin:16px 0 12px}
 .public-summary-counts>div{padding:10px 6px;gap:6px}
 .public-summary-counts span{font-size:12px;line-height:1.5}
 .public-summary-counts strong{font-size:25px}
 .public-order-progress-grid{gap:10px}
 .public-order-progress-grid>.public-progress{padding:12px}
 .public-order-progress-grid .public-progress-label{font-size:13px}
 .public-order-progress-grid .public-progress-label strong{font-size:20px}
 .public-order-page .public-order-explanation{margin-top:12px}
 .public-order-overview .public-product-card{border-color:var(--public-frame)}
 .public-order-overview .public-product-identity{padding:14px 12px}
 .public-order-overview .public-product-progress-grid{gap:12px}
}

.public-order-page .public-order-records .panel-body{padding:4px 0 18px}
@media(max-width:360px){.public-order-header .query-hero h1{font-size:22px}}

.bridge-remote-file-toolbar{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin:16px 0}.bridge-remote-file-toolbar .field{flex:1;min-width:200px}.bridge-remote-file-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:420px;overflow:auto;background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:16px;font-size:13px}.bridge-remote-screenshot{display:block;max-width:100%;height:auto;max-height:600px;object-fit:contain;border:1px solid var(--line);border-radius:8px;margin:16px 0}.bridge-remote-computer-output{min-width:0;margin-top:20px}

/* .191: FTP-style local directory browsing, scoped to computer management. */
.bridge-remote-ftp{display:grid;grid-template-columns:240px minmax(0,1fr);border:1px solid var(--line);border-radius:10px;overflow:hidden;margin-top:20px;min-height:320px}.bridge-remote-folder-nav{background:#f7f9fc;border-right:1px solid var(--line);padding:12px;max-height:580px;overflow:auto;min-width:0}.bridge-remote-folder-heading{font-size:12px;font-weight:600;color:var(--muted);margin:8px 8px 10px}.bridge-remote-folder-item{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;text-align:left;background:transparent;border:0;border-radius:6px;color:var(--text);padding:8px 10px 8px calc(10px + var(--folder-depth,0)*10px);cursor:pointer}.bridge-remote-folder-item:hover,.bridge-remote-folder-item.active{background:#e9f1ff;color:#2460ac}.bridge-remote-folder-item span{overflow-wrap:anywhere;min-width:0}.bridge-remote-folder-item svg,.bridge-remote-file-name svg{width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;color:#6c93c2}.bridge-remote-file-name:has(strong) svg,.bridge-remote-folder-item svg{color:#bd8c35}.bridge-remote-folder-item:disabled{opacity:.55;cursor:default}.bridge-remote-file-main{min-width:0;padding:16px}.bridge-remote-file-main .bridge-remote-computer-output{margin-top:0}.bridge-remote-folder-path{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0}.bridge-remote-folder-path button{border:0;border-radius:5px;background:transparent;color:#2460ac;padding:8px;min-height:44px;max-width:100%;overflow-wrap:anywhere;cursor:pointer}.bridge-remote-folder-path button:hover{background:#edf3fc}.bridge-remote-file-name{display:flex;align-items:center;gap:9px;text-align:left;border:0;background:transparent;color:inherit;padding:8px 0;min-height:44px;max-width:100%;overflow-wrap:anywhere}.bridge-remote-file-name strong,.bridge-remote-file-name span{min-width:0}.bridge-remote-file-name:has(strong){cursor:pointer;color:#1f5488}.bridge-remote-file-row:hover{background:#f8faff}@media(max-width:760px){.bridge-remote-ftp{grid-template-columns:minmax(0,1fr)}.bridge-remote-folder-nav{border-right:0;border-bottom:1px solid var(--line);max-height:220px}.bridge-remote-file-main{padding:12px}}

.bridge-remote-history-tools{display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px}.bridge-remote-history-tools .field{flex:1;min-width:200px}.bridge-remote-history-layout{display:grid;grid-template-columns:minmax(240px,1fr) minmax(0,2fr);gap:20px}.bridge-remote-history-layout>section{min-width:0}.bridge-remote-history-conversation{border:1px solid var(--line);border-radius:8px;padding:16px;max-height:560px;overflow:auto}.bridge-remote-history-message{padding:12px;border:1px solid var(--line);border-radius:8px;margin:12px 0}.bridge-remote-history-message.is-user{background:#eef5ff}.bridge-remote-history-message.is-assistant{background:#f7f9fc}.bridge-remote-history-message>strong{font-size:12px;color:#517391}.bridge-remote-history-message>div{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:6px}@media(max-width:760px){.bridge-remote-history-layout{grid-template-columns:minmax(0,1fr)}}

/* Keep remote history panels within the dialog even for long titles/IDs. */
.bridge-remote-root{container-type:inline-size;container-name:remote-manager}
.bridge-remote-tabs{flex-wrap:wrap;min-width:0}
.bridge-remote-editor>.row h3{min-width:0;flex:1 1 240px;overflow-wrap:anywhere}
.bridge-remote-editor>.row>.btn{flex:0 1 auto;max-width:100%;white-space:normal}
.bridge-remote-history-area,.bridge-remote-history-layout,.bridge-remote-history-conversation{min-width:0;max-width:100%}
.bridge-remote-history-layout{grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);align-items:start}
.bridge-remote-history-layout :is(h4,strong,.small){overflow-wrap:anywhere;white-space:normal}
.bridge-remote-root .bridge-remote-history-layout .table-wrap{overflow-x:visible;min-width:0}
.bridge-remote-root .bridge-remote-history-layout table{width:100%;min-width:0!important;table-layout:fixed}
.bridge-remote-root .bridge-remote-history-layout th,.bridge-remote-root .bridge-remote-history-layout td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}
.bridge-remote-history-layout th:last-child,.bridge-remote-history-layout td:last-child{width:128px}
.bridge-remote-history-layout .btn{width:100%;max-width:100%;white-space:normal;padding:9px 12px}
.bridge-remote-history-conversation{max-height:min(560px,65dvh);overflow:auto;overscroll-behavior:contain}
.bridge-remote-history-tools .field{min-width:0;flex:1 1 240px}
.bridge-remote-history-tools>.btn{max-width:100%;white-space:normal}
.bridge-remote-history-message>div{word-break:normal;overflow-wrap:anywhere;max-width:100%}
.bridge-remote-clipboard,.bridge-remote-clipboard-records,.bridge-remote-clipboard-record{min-width:0;max-width:100%}
.bridge-remote-clipboard-records{max-height:60dvh;overflow:auto;overscroll-behavior:contain}
.bridge-remote-clipboard-record{padding:14px;margin:12px 0;border:1px solid var(--border);border-radius:8px;background:#f7f9fc}
.bridge-remote-clipboard-record time{font-size:13px;color:var(--muted)}
.bridge-remote-clipboard-record pre{white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal;font:inherit;margin:10px 0 0;max-width:100%}
@container remote-manager (max-width:900px){.bridge-remote-history-layout{grid-template-columns:minmax(0,1fr)}}
@media(max-width:960px){.bridge-remote-history-layout{grid-template-columns:minmax(0,1fr)}}

/* Screen viewing keeps its own bounded stage inside the management dialog. */
.bridge-screen{min-width:0;max-width:100%}.bridge-screen-tools{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap}.bridge-screen-tools .field{min-width:0;flex:1 1 180px}.bridge-screen-tools .btn{min-height:44px;max-width:100%;white-space:normal}.bridge-screen-stage{min-width:0;min-height:0;background:#111827;border:1px solid var(--line);border-radius:10px;overflow:hidden;aspect-ratio:16/9;max-height:65dvh;display:grid;place-items:center;margin-top:16px}.bridge-screen-stage canvas{display:block;min-width:0;min-height:0;width:100%;height:100%;max-width:100%;max-height:65dvh;object-fit:contain}.bridge-screen [data-screen-status]{overflow-wrap:anywhere}@media(max-width:600px){.bridge-screen-tools .btn{flex:1 1 140px}.bridge-screen-stage{max-height:50dvh}}

.bridge-screen-full-tools[hidden]{display:none}.bridge-screen-full-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;width:100%;min-width:0;box-sizing:border-box;background:#111827;color:#fff}.bridge-screen-full-tools .actions{display:flex;gap:8px;flex-wrap:wrap;margin:0}.bridge-screen-full-tools .btn{min-height:44px}.bridge-screen-stage.bridge-screen-page-full{position:fixed;inset:0;z-index:10000;width:100vw;height:100dvh;max-height:none;aspect-ratio:auto;margin:0;border:0;border-radius:0;grid-template-rows:auto minmax(0,1fr)}.bridge-screen-stage.bridge-screen-page-full canvas{min-height:0;max-height:none;width:100%;height:100%;object-fit:contain}@media(max-width:600px){.bridge-screen-full-tools{padding:8px;gap:8px;flex-wrap:wrap}.bridge-screen-full-tools .btn{padding:8px 12px}}

.bridge-remote-drive-label{display:block;min-width:0}.bridge-remote-drive-label strong,.bridge-remote-drive-label small{display:block}.bridge-remote-drive-label small{font-size:12px;font-weight:400;line-height:1.5;color:var(--muted);overflow-wrap:anywhere;margin-top:3px}

.memory-device-id{overflow-wrap:anywhere;max-width:24rem}
.memory-computer-root{display:grid;gap:16px;min-width:0}
.memory-computer-root .tabs{display:flex;flex-wrap:wrap;gap:8px}
.memory-computer-root .btn,.memory-computer-root .tab{min-height:44px}
.memory-computer-root [hidden]{display:none!important}
.memory-computer-root :is([data-memory-feedback],[data-memory-clean-result],[data-memory-clean-reason],[data-memory-update-reason],[data-memory-update-status],[data-memory-startup-reason]):empty{display:none}
.memory-computer-root .btn{padding:10px 16px;font-size:14px;line-height:22px;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.memory-controls{display:grid;gap:12px;padding:16px;border:1px solid var(--border);border-radius:10px;background:var(--paper,#f7f9fc);min-width:0}
.memory-controls :is(p,h3){margin:0;overflow-wrap:anywhere}
.memory-action-bar{display:flex;flex-wrap:wrap;align-items:stretch;gap:8px}
.memory-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.memory-status-card{display:flex;flex-direction:column;gap:8px;min-width:0;padding:12px 14px;border:1px solid var(--border);border-radius:8px;background:var(--surface,#fff)}
.memory-status-card h3{font-size:13px;color:var(--muted);font-weight:600;line-height:20px}
.memory-startup-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}
.memory-startup-row p{flex:1 1 160px;min-width:0}
.memory-computer-root>.tabs{margin:0;padding:0;column-gap:16px;row-gap:0}
.memory-computer-root>.tabs .tab{padding:10px 4px;font-size:14px;line-height:22px}
.memory-computer-root>[data-memory-feedback]{font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.memory-computer-root>[data-memory-view]{min-width:0}
.memory-computer-root [data-memory-view]>h3{margin:0 0 8px;font-size:15px;line-height:24px}
.memory-computer-root [data-memory-view]>p{margin:0 0 12px;overflow-wrap:anywhere}
.memory-computer-root .bridge-remote-file-toolbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:end;gap:12px;margin:16px 0 10px}
.memory-computer-root .bridge-remote-file-toolbar>.field{min-width:0;margin:0;gap:6px}
.memory-computer-root [data-memory-view] .bridge-remote-file-toolbar .field input[name=computer_path][type=text]{height:44px;min-height:44px;line-height:22px;padding:10px 12px}
@media(max-width:700px){.memory-status-grid{grid-template-columns:minmax(0,1fr)}.memory-controls{padding:12px}.memory-action-bar>.btn{flex:1 1 140px}.memory-computer-root .bridge-remote-file-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.memory-computer-root .bridge-remote-file-toolbar>.field{grid-column:1/-1;grid-row:1}.memory-computer-root .bridge-remote-file-toolbar>.btn{width:100%}}
.memory-summary{padding:12px 16px;border:1px solid var(--border,#dfe5ed);border-radius:12px;background:var(--surface,#fff)}
.memory-commands{white-space:pre-wrap;font-size:13px;color:var(--muted,#65758b)}
.memory-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:420px;overflow:auto;padding:12px;background:#f4f7fb;border-radius:8px}
.memory-screenshot{display:block;max-width:100%;height:auto;border:1px solid #dfe5ed;border-radius:8px;margin-top:12px}
.memory-path-row{display:flex;flex-wrap:wrap;align-items:end;gap:8px}
.memory-path-row .grow{min-width:min(100%,240px)}
.memory-result{white-space:pre-wrap;overflow-wrap:anywhere}
.memory-computer-root .table-wrap{max-width:100%}
@media(max-width:780px){.memory-computer-root .row{flex-wrap:wrap}.memory-path-row .field{width:100%}.memory-computer-root .tabs .tab{flex:1 1 40%}}

.memory-network,.memory-connection-ip{overflow-wrap:anywhere;max-width:20rem}.memory-network-adapter+.memory-network-adapter{margin-top:10px}.memory-network-adapter strong{font-size:13px}.memory-network-details{padding:10px 16px;border:1px solid var(--border);border-radius:10px}.memory-network-details summary{cursor:pointer;min-height:24px}.memory-network-details [data-memory-network]{margin-top:8px}

/* Order-list product preview: shared desktop/mobile, readable full names. */
.order-list-products{max-width:19rem;white-space:normal}.order-list-products-trigger{display:block;max-width:100%;min-height:44px;padding:4px 0;text-align:left;white-space:normal;overflow-wrap:anywhere;line-height:1.6}.order-list-products-table table{table-layout:fixed;width:100%;white-space:normal}.order-list-products-table th,.order-list-products-table td{white-space:normal;overflow-wrap:anywhere;vertical-align:top}.order-list-products-table th:first-child{width:45%}.order-list-products-table th:nth-child(2){width:30%}.order-list-products-table th:last-child{width:25%}

.order-list-product-names{display:flex;flex-direction:column;align-items:flex-start;gap:2px}

.order-list-products-popover{position:fixed;inset:auto;margin:0;padding:14px;width:min(640px,calc(100vw - 24px));max-height:min(440px,calc(100dvh - 24px));overflow:auto;border:1px solid var(--border);border-radius:8px;background:var(--paper,#fff);color:var(--ink);box-shadow:0 10px 32px #17324930;white-space:normal}.order-list-products-popover p{margin:0 0 10px}.order-list-products-popover .table-wrap{overflow:visible}.order-list-products-popover th,.order-list-products-popover td{padding:9px 12px}

/* Main order list: product names occupy the removed summary columns. */
.order-compact-list .order-list-products-cell{width:60%;white-space:normal}.order-compact-list .order-list-products{max-width:none;width:100%}.order-compact-list .order-list-product-names{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;align-items:center}.order-compact-list .order-list-products-trigger{width:100%;min-width:0}.mobile-order-list .order-list-product-names{flex-direction:row;flex-wrap:wrap;gap:4px 14px}
.order-custom-list td[data-list-field]{white-space:normal;overflow-wrap:anywhere;min-width:120px;max-width:460px}.order-expanded-list .order-list-products-cell{min-width:260px}.mobile-order-field{display:grid;gap:5px;margin-bottom:12px;overflow-wrap:anywhere;min-width:0}.mobile-order-field .order-status-percentage{min-width:0;max-width:none}.mobile-order-field .order-list-products{max-width:100%}@media(max-width:780px){.order-expanded-list{display:none}.mobile-order-field .order-list-product-names{display:flex;flex-wrap:wrap}}
#list-fields{border:0;padding:0;min-width:0}

/* Enterprise list presets share field bindings and actions across live and preview views. */
.order-list-presentation.appearance-compact .order-desktop-list th,.order-list-presentation.appearance-compact .order-desktop-list td{padding:8px 12px}
.order-list-presentation.appearance-compact .mobile-order-field{gap:3px;margin-bottom:8px}
.order-list-presentation.appearance-compact .mobile-order-card{padding:12px}
.order-list-presentation.appearance-card .order-desktop-list{display:none}
.order-list-presentation.appearance-card .mobile-order-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px;padding:16px;background:#f4f7fb}
.order-list-presentation.appearance-card .mobile-order-card{display:flex;flex-direction:column;min-width:0;padding:18px;border:1px solid #dbe3ee;border-radius:12px;background:#fff;color:#252a34}
.order-list-presentation.appearance-card .mobile-order-field:first-child{padding-bottom:12px;border-bottom:1px solid #e7edf5}
.order-list-presentation.appearance-card .mobile-order-field:first-child>div{font-weight:600}
.order-list-presentation.appearance-card .mobile-order-field>div{min-width:0}
.order-list-presentation.appearance-card .order-list-product-names{display:flex;flex-wrap:wrap;gap:6px 12px}
.order-list-presentation.appearance-card .order-row-actions{margin-top:auto;padding-top:12px;border-top:1px solid #e7edf5}
.order-list-presentation.appearance-card .mobile-order-empty{display:block}
@media(max-width:780px){.order-list-presentation.appearance-card .mobile-order-list{grid-template-columns:minmax(0,1fr);padding:10px;gap:10px}}

.order-compact-list .order-list-products[data-product-limit="3"] .order-list-product-names{grid-template-columns:repeat(3,minmax(0,1fr))}

.order-compact-list .order-list-products[data-product-limit="1"] .order-list-product-names{grid-template-columns:minmax(0,1fr)}

/* Keep template labels and controls aligned at desktop and phone widths. */
#list-fields .list-template-settings{display:grid;grid-template-columns:minmax(180px,240px) minmax(220px,320px);align-items:start;gap:12px}#list-fields .list-template-settings>.field{margin:0;display:grid;gap:7px;line-height:20px;min-width:0}#list-fields .list-template-settings :is(input,select){box-sizing:border-box;width:100%;height:44px;min-height:44px;margin:0}@media(max-width:600px){#list-fields .list-template-settings{grid-template-columns:minmax(0,1fr)}}

/* Mobile controls share a compact grid; safe-area space stays inside the dock. */
@media(max-width:780px){
 .mobile-bottom-nav{bottom:0;left:8px;right:8px;min-height:64px;padding:4px 4px calc(4px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;background:#f5f9ff;border-color:#c8daf5;box-shadow:0 -3px 18px #1d559526;backdrop-filter:none}
 .mobile-bottom-nav>a,.mobile-bottom-nav>button{min-height:56px;border-radius:17px;color:#526780;font-size:11px}
 .mobile-bottom-nav [aria-current=page]{background:#287cf1;color:#fff;font-weight:600;box-shadow:0 2px 7px #287cf130}
 .shell-main{padding-bottom:calc(82px + env(safe-area-inset-bottom))}
 :is(.orders-list-content,.order-detail-content)>.page-heading>.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}
 :is(.orders-list-content,.order-detail-content)>.page-heading>.actions>.btn{width:100%;min-width:0;min-height:44px;margin:0;padding:8px;font-size:14px;white-space:nowrap}
 .order-detail-content>.page-heading>.actions>.btn:last-child:nth-child(odd){grid-column:1/-1}
 .orders-list-content #order-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start;padding:12px}
 .orders-list-content #order-filter input,.orders-list-content #order-filter select{min-width:0;width:100%;min-height:44px;margin:0;border:1px solid #d8dfe9;border-radius:8px;background:#fff;font-size:16px;padding:8px}
 .orders-list-content #order-filter input,.orders-list-content #order-filter select[name=shipping_status]{grid-column:1/-1}
 .orders-list-content #order-filter .order-filter-actions{grid-column:1/-1;display:grid;grid-template-columns:1.15fr .85fr 1fr;gap:8px;min-width:0;width:100%;align-items:start}
 .orders-list-content #order-filter .order-filter-actions .btn{display:flex;justify-content:center;align-items:center;width:100%;min-width:0;min-height:44px;margin:0;padding:8px 4px;font-size:14px;white-space:nowrap;border-radius:8px;gap:4px}
 .orders-list-content #order-filter .order-date-picker{min-width:0;width:100%;margin:0}
 .orders-list-content #order-filter .order-date-popover{max-width:calc(100vw - 58px);box-sizing:border-box}
}

/* Customer statistics use the same two-column phone controls as order filters. */
@media(max-width:780px){
 .customer-period-filter{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:10px}
 .customer-period-filter .field{width:100%;min-width:0;margin:0}
 .customer-period-filter :is(#customer-stats-month-label,#customer-stats-quarter-label){grid-column:1/-1}
 .customer-period-filter .btn{width:100%;min-width:0;height:auto;min-height:44px;margin:0;font-size:14px;white-space:nowrap;padding:8px}
}

/* Keep touch controls consistent in portrait and phone landscape layouts. */
@media(max-width:780px),(pointer:coarse) and (max-width:1024px){
 :is(#app,#modal) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),select,textarea){min-width:0;max-width:100%;font-size:16px}
 :is(#app,#modal) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),select){min-height:44px}
 :is(#app,#modal) :is(.btn,.text-btn,.tab){min-height:44px}
 :is(#app,#modal) :is(.btn,.text-btn){font-size:14px}
 :is(#app,#modal) .btn.icon{min-width:44px}
}

/* Retry is shown only after an image request fails. */
#modal [data-image-retry][hidden]{display:none}

/* Customer management actions stay reachable in the compact mobile directory. */
@media(max-width:780px){
 #customer-list .compact-directory.responsive-table tbody>tr>td:last-child{display:block;padding:0 14px 12px}
 #customer-list .compact-directory.responsive-table tbody>tr>td:last-child::before{display:none}
 #customer-list .compact-directory td:last-child .actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
 #customer-list .compact-directory td:last-child .btn{width:auto;min-height:44px;padding:8px 12px}
}
