:root{color:#172b46;background:#eef3fa;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:14px;font-synthesis:none;--nav:#102b51;--muted:#596b85;--line:#dce5f2;--blue:#1458bc;--blue-soft:#eaf3ff;--white:#fff;--red:#a82a30;}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
button,input,textarea,select{font:inherit}
button,a,input,select,textarea{outline-offset:3px}
button{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;border:0;cursor:pointer;border-radius:7px;padding:8px 12px;font-weight:600;color:inherit;background:none}
button:disabled{opacity:.43;cursor:default}
.primary{background:var(--blue);color:white;box-shadow:0 2px 4px #21498224}
.primary:hover:not(:disabled){background:#0d469c}
.outline{border:1px solid #cad8e9;background:white}
.outline:hover:not(:disabled),.textbtn:hover,.iconbtn:hover{background:var(--blue-soft);color:#0c54ad}
.textbtn,.iconbtn{color:#315579}
.iconbtn{font-size:20px;padding:4px 9px}
.compact{padding:4px 7px}
a{color:#1556a5}
h1,h2,h3,p{margin:0}
input:not([type=checkbox]),select,textarea{display:block;width:100%;color:#1b304c;background:white;border:1px solid #c8d5e6;border-radius:7px;min-height:37px;padding:7px 10px;min-width:0}
input[type=checkbox]{accent-color:var(--blue)}
input[type=file]{padding:4px;max-width:100%}
select{padding-right:26px}
textarea{resize:vertical}
label{min-width:0}
.formfield{display:grid;gap:6px;margin-bottom:12px;min-width:0}
.formfield>span,.photoarea h3{font-weight:650;font-size:13px;color:#2b4666}
.formfield:has(input[type=checkbox]){display:flex;align-items:center}
.error{color:var(--red);white-space:pre-line;font-weight:600}
.error:not(:empty){margin:12px 0 0}
.muted{color:var(--muted)}
.layout{display:grid;grid-template-columns:220px minmax(0,1fr);height:100dvh}
.sidebar{color:#dce9fb;background:var(--nav);height:100%;display:flex;flex-direction:column;min-height:0;z-index:5}
.brand{display:flex;align-items:center;gap:12px;padding:22px 19px 19px;letter-spacing:.08em;font-size:20px;font-weight:720;color:#fff;border-bottom:1px solid #ffffff21}
.brand img{width:43px;height:43px}
.brand small,.sidebarfoot small,.member small{display:block;font-size:12px;letter-spacing:0;color:#b6c9e4;font-weight:500;margin-top:3px}
.side-scroll{overflow:auto;flex:1;padding:7px 10px 18px;scrollbar-width:thin;scrollbar-color:#4a648a transparent}
.navgroup{margin:17px 12px 6px;color:#a6bedf;font-size:12px;letter-spacing:.08em}
.navbtn{margin:2px 0;width:100%;justify-content:flex-start;padding:9px 11px;color:#dce9fb;border-radius:8px;line-height:1.2}
.navbtn.active{color:#fff;background:#2860a2;box-shadow:inset 3px 0 #94d4ff}
.navbtn:hover:not(.active){background:#1f426e}
.navicon{width:21px;display:inline-grid;place-items:center;color:#a8d9ff;font-size:16px;font-weight:700}
.sidebar details summary{padding:9px 13px;color:#b7cbe5;cursor:pointer}
.sidebarfoot{display:flex;align-items:center;gap:8px;border-top:1px solid #ffffff21;padding:12px}
.sidebarfoot>div{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis}
.sidebarfoot strong,.member strong{white-space:nowrap}
.avatar{height:34px;width:34px;border-radius:50%;background:#d5e8ff;color:#173d72;font-weight:700;display:grid;place-items:center;flex:none}
.signout{color:#d7e8ff;padding:6px}
.right{min-width:0;min-height:0;display:flex;flex-direction:column}
.top{height:54px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;flex:none;padding:0 24px}
.crumb{font-size:13px;font-weight:650;color:#405a7b}
.pilot{margin-left:auto;color:#244a73;background:#e5f0ff;padding:5px 8px;border-radius:5px;font-size:12px;font-weight:600;white-space:nowrap}
.mobile,.phone-brand,.phone-nav,.drawer-backdrop,.phone-upload,.camera-picker{display:none!important}
.content{padding:22px 24px;min-width:0;flex:1;overflow:auto}
.page{display:flex;flex-direction:column;gap:14px;min-height:0}
.pagehead h1{font-size:26px;letter-spacing:.02em;line-height:1.25;font-weight:750}
.pagehead p{color:var(--muted);margin-top:6px}
.toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.toolbar .formfield{margin:0}
.search{display:flex;align-items:center;gap:6px;background:white;border:1px solid #cad8e9;border-radius:7px;padding:0 6px 0 10px;color:#335f8a;max-width:100%}
.search input{border:0;padding-left:0;min-height:32px;width:215px}
.search .textbtn{padding:5px 7px}
.tablecard{border:1px solid var(--line);border-radius:9px;background:white;min-width:0;overflow:hidden}
.gridscroll{max-height:calc(100dvh - 218px);overflow:auto;min-height:168px;scrollbar-color:#aabed7 #f3f7fd;position:relative}
.grid{border-collapse:separate;border-spacing:0;table-layout:fixed;width:max-content;min-width:100%;vertical-align:middle}
.grid th,.grid td{padding:0 9px;border-bottom:1px solid #e5ecf5;border-right:1px solid #e5ecf5;text-align:left;height:35px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.grid th{position:sticky;top:0;z-index:2;background:#edf4ff;color:#203b5d;font-weight:680;height:38px}
.grid td{background:white}
.grid tbody tr:nth-child(even) td{background:#fbfdff}
.grid tbody tr:hover td{background:#f2f7ff}
.grid .rownum{position:sticky;left:0;z-index:1;text-align:center;padding:0 3px;color:#4e6683;background:#f7faff!important;border-right:1px solid #cedcf0}
.grid thead .rownum{z-index:3;background:#edf4ff!important}
.rowbutton{width:100%;border-radius:0;color:#345c91;padding:6px}
.rowbutton:hover{background:#deecff}
.editable:focus{outline:2px solid #659de2;outline-offset:-2px}
.editable:has(.inlineeditor){overflow:visible;position:relative}
.inlineeditor{display:flex;align-items:center;gap:3px;min-width:120px}
.inlineeditor .error{position:absolute;z-index:5;background:#fff1f1;padding:8px;top:25px;max-width:260px;white-space:normal}
.inlineeditor input,.inlineeditor select{min-height:29px;padding:4px}
.colbtn{display:flex;justify-content:flex-start;padding:0;border-radius:0;max-width:100%;width:100%;height:36px;font-weight:inherit;gap:6px}
.colbtn:hover{color:#175cba}
.typeicon,.caret{color:#496f9e}
.typeicon{font-size:12px;min-width:10px}
.caret{margin-left:auto}
.chips{display:inline-flex;align-items:center;gap:4px;max-width:100%}
.chip{display:inline-block;background:#edf3fb;color:#2b4a6d;padding:2px 7px;border-radius:5px;font-size:12px;line-height:1.4;max-width:195px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.attachment{font-size:16px;text-decoration:none;background:#e8f2ff;border-radius:4px;padding:1px 6px}
.gridfoot{min-height:45px;display:flex;align-items:center;justify-content:flex-end;padding:6px 10px;gap:9px;border-top:1px solid var(--line);color:#456181;font-size:13px}
.gridfoot>span:first-child{margin-right:auto}
.gridfoot button{font-size:12px;padding:4px 8px}
.gridempty,.empty,.waiting{color:var(--muted);padding:27px}
.empty>button{margin-left:12px}
.statsline{padding:5px 0 9px}
.panel{background:white;border:1px solid var(--line);border-radius:9px;padding:16px}
.narrow{max-width:800px}
.querybar{display:flex;flex-wrap:wrap;align-items:end;gap:10px}
.querybar .formfield{margin:0}
.querybar .error{flex-basis:100%}
.receive-form{display:grid;grid-template-columns:minmax(0,330px) max-content;align-items:end;gap:9px}
.receive-form .formfield{margin:0}
.receive-form .error{grid-column:1/-1}
.receiving-results:not(:empty){border-top:1px solid var(--line);margin-top:15px;padding-top:15px}
.candidate,.member{display:flex;align-items:center;gap:14px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:12px 0}
.candidate>button,.member>button{margin-left:auto}
.member:last-child,.candidate:last-child{border-bottom:0}
.member small{color:var(--muted)}
.metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.metric{background:#fff;border:1px solid var(--line);border-radius:10px;padding:15px}
.metric p{color:var(--muted);margin-bottom:10px}
.metric strong{font-size:26px;color:#214e84}
dialog{border:1px solid #bfcfe3;border-radius:13px;padding:0;width:min(530px,calc(100vw - 24px));max-height:calc(100dvh - 28px);color:inherit;box-shadow:0 18px 60px #0d23404a}
dialog.wide{width:min(940px,calc(100vw - 24px))}
dialog::backdrop{background:#11284377}
.dialoghead{position:sticky;top:0;z-index:3;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding:12px 18px;background:white}
.dialoghead h2{font-size:18px}
.dialogbody{padding:16px 18px}
.actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;margin-top:13px}
.formgrid,.detailgrid,.photogrid,.twocol{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px 16px}
.twocol{margin-bottom:12px}
.models-input,.cascade{display:grid;gap:6px}
.model-choice{display:flex;gap:5px;align-items:center}
.choices{border:1px solid #ccd9ea;border-radius:7px;padding:8px;min-height:37px;background:#fff}
.choices summary{cursor:pointer}
.fieldchecks{display:flex;flex-wrap:wrap;gap:7px 14px;padding:8px 0;max-height:280px;overflow:auto}
.fieldchecks label{display:flex;align-items:center;gap:4px}
.soft{padding:11px;background:#edf5ff;border-radius:7px;margin-bottom:12px}
.soft p+p{margin-top:4px}
.detailbanner{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#edf5ff;border-radius:8px;padding:12px 14px}
.detailbanner strong{font-size:18px}
.detailbanner p{margin-top:4px;color:var(--muted)}
.detailgrid{margin:12px 0;border-bottom:1px solid var(--line);padding-bottom:12px}
.detailgrid dt{color:var(--muted);font-size:12px}
.detailgrid dd{margin:4px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.alert{border:2px solid #e4a4a4;border-radius:8px;padding:11px;color:#9a2026;background:#fff1f0;font-size:19px;font-weight:750;margin-bottom:12px}
.alert small{display:block;margin-top:5px;font-size:14px}
.danger{color:#9a2026;font-weight:700}
.photoarea{border:1px solid var(--line);border-radius:8px;padding:10px;min-width:0}
.photoarea p{margin:4px 0 8px}
.photoarea .upload-progress:not(:empty){margin:7px 0 0;color:#24548d}
.photoarea .upload-progress:empty,.photoarea .error:empty{display:none}
.conflict-refresh{margin-top:9px}
.photolist{display:flex;flex-wrap:wrap;gap:5px;margin:5px 0}
.photolist img,.photolist video{width:100px;height:84px;object-fit:contain;border-radius:5px;background:#eef4fb}
.historyitem{border-bottom:1px solid var(--line);padding:8px 0 12px;overflow-wrap:anywhere}
.historyitem p{margin:4px 0 6px}
.pricecards{display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:8px;margin-bottom:16px}
.pricecards div{background:#ecf4ff;border-radius:8px;padding:10px;display:grid;gap:5px}
.pricecards strong,.quoteoutput strong{color:#1254a8;font-size:22px}
.quoteoutput:not(:empty){margin-top:14px;padding:10px 13px;background:#eef6ff;border-radius:8px}
.quoteoutput p{margin-top:6px}
#toast{display:none;position:fixed;right:18px;bottom:16px;z-index:15;background:#14375f;color:white;padding:10px 15px;border-radius:8px;max-width:calc(100vw - 36px);white-space:pre-line}
#toast.open{display:block}
#toast.bad{background:#a0202d}
.authpage{display:grid;grid-template-columns:40% 1fr;min-height:100dvh}
.authbrand{background:var(--nav);color:white;padding:clamp(28px,6vw,88px);display:flex;justify-content:center;flex-direction:column}
.authbrand img{width:95px;height:95px;margin-bottom:19px}
.authbrand p:first-of-type{font-size:36px;font-weight:760;letter-spacing:.09em}
.authbrand p:last-of-type{font-size:16px;color:#bed9fc}
.authline{width:54px;height:3px;background:#85c9ff;margin:19px 0}
.authside{display:grid;place-items:center;padding:23px}
.authcard{width:min(100%,390px);background:#fff;border:1px solid var(--line);border-radius:14px;padding:27px;box-shadow:0 10px 50px #14375f15}
.authcard h1{font-size:24px}
.authcard p:not(.error){color:var(--muted);margin:8px 0 18px}
.authcard button{width:100%;margin-top:5px}
@media(max-width:730px){
  .layout{grid-template-columns:1fr}
  .sidebar{display:none;position:fixed;inset:0 auto 0 0;width:min(82vw,295px);padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);z-index:9}
  .drawer-open .sidebar{display:flex}
  .drawer-open .drawer-backdrop{display:block!important;position:fixed;inset:0;z-index:8;background:#102b5185;border-radius:0}
  .top{height:calc(57px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 16px 0}
  .top .crumb{display:none}
  .phone-brand{display:flex!important;align-items:center;gap:9px;font-size:16px;font-weight:750}
  .phone-brand img{width:32px;height:32px}
  .mobile{display:inline-flex!important}
  .content{padding:17px max(14px,env(safe-area-inset-right)) 22px max(14px,env(safe-area-inset-left))}
  .phone-nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));background:white;border-top:1px solid var(--line);padding:5px 8px max(6px,env(safe-area-inset-bottom));flex:none}
  .phone-tab{flex-direction:column;line-height:1.1;gap:3px;min-height:50px;padding:4px 2px;font-size:12px;color:#4c6482}
  .phone-tab>span{font-size:21px;line-height:23px}
  .phone-tab[aria-current=page]{color:#104f9f;background:#e9f2ff}
  .gridscroll{max-height:calc(100dvh - 285px)}
  .phone-orders{gap:12px}
  .phone-pagehead{display:flex;align-items:center;justify-content:space-between;gap:10px}
  .phone-pagehead button{color:#1357ab;min-height:44px}
  .phone-orders .search{max-width:none;min-height:52px;padding:5px;background:#fff;border-radius:11px}
  .phone-orders .search input{flex:1;min-width:0;padding:6px 8px}
  .phone-orders .search button{min-height:40px;padding:7px 13px}
  .phone-filters{display:flex;gap:6px;overflow:auto;padding:2px 1px;scrollbar-width:none}
  .phone-filters button{min-height:44px;flex:1;padding:7px 8px;color:#365778}
  .phone-filters button[aria-current=page]{background:#ddebff;border-color:#a6c8f2;color:#104d99}
  .phone-order-list{display:grid;gap:9px}
  .phone-order-card{display:grid;justify-content:stretch;gap:6px;padding:11px 13px;width:100%;border:1px solid var(--line);border-radius:12px;background:white;box-shadow:0 1px 3px #19395309;white-space:normal;text-align:left;font-weight:500}
  .phone-order-card:active{background:#edf5ff}
  .phone-card-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
  .phone-card-head strong{font-size:16px;overflow-wrap:anywhere}
  .phone-card-head .chips{flex:none}
  .phone-card-gear{font-weight:650;color:#1a4577;overflow-wrap:anywhere}
  .phone-card-period,.phone-card-codes{font-size:12px;color:#536a86;display:flex;flex-wrap:wrap;gap:4px 12px;overflow-wrap:anywhere}
  .phone-card-period,.phone-card-codes{word-spacing:.15em}
  .phone-card-period:empty{display:none}
  .phone-orders .gridfoot{border:0;padding:4px 0}
  .phone-orders .gridfoot button,.receive-form button,.authcard button{min-height:44px}
  .phone-orders .gridfoot>span:first-child{margin-right:auto}
  .receive-form{grid-template-columns:1fr}
  .candidate>button{margin-left:0;min-height:44px}
  dialog,dialog.wide{margin:auto;width:min(100vw - 14px,580px);max-height:calc(100dvh - max(14px,env(safe-area-inset-top)) - max(14px,env(safe-area-inset-bottom)))}
  .dialoghead{padding:7px 13px}
  .dialoghead button{min-width:44px;min-height:44px}
  .dialogbody{padding:12px}
  .order-detail{display:flex;flex-direction:column;gap:9px}
  .order-detail .detailbanner{order:-2}
  .order-detail .detail-actions{order:-1;justify-content:flex-start;margin:0}
  .dialogbody .actions button,.phone-upload button{min-height:44px}
  .detailgrid{grid-template-columns:repeat(2,minmax(0,1fr));margin:5px 0}
  .detailgrid .detail-empty{display:none}
  .detailgrid dt{font-size:12px}
  .detailgrid dd{font-size:14px}
  .photogrid{grid-template-columns:minmax(0,1fr)}
  .photoarea{scroll-margin-top:64px}
  .photoarea.photo-empty,.photo-picker{display:none!important}
  .phone-upload{display:flex!important;flex-wrap:wrap;gap:7px}
  #toast{bottom:calc(71px + env(safe-area-inset-bottom))}
  .authpage{grid-template-columns:1fr;grid-template-rows:minmax(145px,auto) 1fr}
  .authbrand{padding:calc(20px + env(safe-area-inset-top)) 20px 20px}
  .authbrand img{width:52px;height:52px;margin:0 0 7px}
  .authbrand p:first-of-type{font-size:23px}
  .authbrand p:last-of-type{font-size:14px}
  .authline{margin:6px 0}
  .pagehead h1{font-size:22px}
  input:not([type=checkbox]),select,textarea{font-size:16px}
}
