.pilot-card{background:#fff;border:1px solid var(--line,#e4e1dc);padding:24px;margin:0 0 20px;border-radius:12px}.pilot-card h2{font-size:18px;margin:0 0 16px}.pilot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.pilot-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.pilot-form{display:grid;gap:16px}.pilot-form label,.pilot-scope label{display:grid;gap:7px;font-size:13px;color:#52504d;min-width:0}.pilot-form input,.pilot-form select,.pilot-form textarea,.pilot-scope input,.pilot-scope select{width:100%;box-sizing:border-box;min-width:0;border:1px solid #d9d5cf;border-radius:6px;padding:11px 12px;background:#fff;font:inherit;font-size:16px;color:#232422}.pilot-form textarea{resize:vertical}.pilot-form button{justify-self:start;min-height:42px}.pilot-scope{display:flex;gap:16px;align-items:end;flex-wrap:wrap;margin:24px 0}.pilot-scope label:first-child{flex:1;min-width:180px}.pilot-message{padding:14px 18px;background:#edf3ed;border:1px solid #c5d7c5;border-radius:8px;margin:16px 0;overflow-wrap:anywhere}.pilot-message.error{background:#fff0ed;border-color:#e5bab3}.auth-card{max-width:460px;margin:32px auto}.smaller{font-size:18px!important;line-height:1.5!important}.table-scroll{overflow-x:auto}.table-scroll table{width:100%;border-collapse:collapse;white-space:nowrap}.table-scroll th,.table-scroll td{padding:14px 16px;text-align:left;border-bottom:1px solid #ece9e4;font-size:13px}.table-scroll th{color:#77736d;background:#faf9f7}.table-scroll td small{display:block;color:#817d77;margin-top:5px}.rule-definitions dt{font-weight:600;margin:20px 0 6px}.rule-definitions dd{margin:0;color:#6d6962;line-height:1.7}.result-box{background:#f5f3ef;border-radius:6px;padding:14px;line-height:1.8;overflow-wrap:anywhere}.item-row{padding:14px 0;border-bottom:1px solid #ece9e4;display:flex;justify-content:space-between;align-items:center;gap:16px}.item-row small{display:block;color:#79736b;margin-top:6px}.positive{color:#21834d}.negative{color:#c63e2e}.empty{padding:30px 20px;color:#777}.pilot-tab[hidden],#content[hidden],#auth[hidden]{display:none}.pilot-tab .metrics{margin-bottom:24px}.pilot-card .eyebrow{margin-top:0}.button:disabled{opacity:.55;cursor:wait}input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible{outline:2px solid #b83722;outline-offset:3px}.pilot-card input:invalid:not(:placeholder-shown){box-shadow:none}
@media(max-width:950px){.pilot-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.topbar{height:auto;min-height:64px;padding-top:10px;padding-bottom:10px}.topbar>div{display:flex;gap:8px;align-items:center;flex-wrap:wrap}}
@media(max-width:650px){.pilot-grid,.pilot-grid.three{grid-template-columns:1fr}.pilot-card{padding:18px}.pilot-scope{gap:12px}.pilot-scope label{flex:1;min-width:130px}.topbar{gap:10px;flex-wrap:wrap}.topbar>div{font-size:12px}.item-row{align-items:start;flex-direction:column}.pilot-scope .button{width:100%}.pilot-tab .metrics{grid-template-columns:1fr 1fr}.pilot-card .button{min-height:44px}.scope-notice{align-items:start}}
.refresh-actions{display:flex;gap:10px;flex-wrap:wrap}.refresh-job{border:1px solid #c9d8ce;background:#f4f8f4;border-radius:10px;padding:18px 20px;margin:0 0 22px;overflow-wrap:anywhere}.refresh-job-heading{display:flex;justify-content:space-between;gap:16px;align-items:center}.refresh-job-heading strong{font-size:15px}.refresh-job-heading span{font-size:13px;font-variant-numeric:tabular-nums;color:#585e58}.refresh-job p{margin:10px 0 0;font-size:13px;line-height:1.7}.refresh-job progress{display:block;width:100%;height:8px;accent-color:#337250;margin-top:14px}.refresh-job.has-error{border-color:#dfbda7;background:#fff8ef}.refresh-job.has-error progress{accent-color:#b66b28}.refresh-job ul{margin:12px 0 0;padding-left:18px;font-size:13px;line-height:1.7}.refresh-job .button{margin-top:14px}.refresh-job[hidden]{display:none}
@media(max-width:650px){.refresh-actions{width:100%}.refresh-actions .button{flex:1;min-width:140px}.refresh-job{padding:16px}.refresh-job-heading{align-items:flex-start}.pilot-form .heading-actions{display:flex;flex-direction:column;align-items:stretch}.pilot-form .heading-actions .button{width:100%;white-space:normal;text-align:center}}

/* Team workspace: silver shell, white report surfaces and Klein blue actions. */
:root {
  --blue: #002fa7;
  --blue-hover: #002581;
  --ink: #161a24;
  --muted: #586275;
  --line: #dce1e9;
  --silver: #f2f4f7;
  --paper: #fff;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--silver);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, select { cursor: pointer; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:where(button, input, select, textarea, a, summary):focus-visible { outline: 3px solid #3365df; outline-offset: 3px; }
main { margin-left: 204px; min-width: 0; }
.rail {
  position: fixed; inset: 0 auto 0 0; width: 204px; padding: 32px 14px 22px;
  display: flex; flex-direction: column; border-right: 1px solid #d5dae3;
  background: linear-gradient(150deg, #fcfdff, #e9edf3 78%, #e3e7ee);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px; color: var(--ink); text-decoration: none; font-size: 23px; font-weight: 700; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.brand-mark {
  position: relative; display: grid; place-items: center; flex: none; width: 41px; height: 41px;
  border-radius: 13px; background: var(--blue); box-shadow: inset 0 1px 2px #ffffff66, 0 3px 7px #18284b25;
}
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 48%; height: 48%; border: 2px solid white; border-radius: 50%; }
.brand-mark::after { width: 16%; height: 16%; transform: translate(56%, -70%); background: white; border-color: var(--blue); }
.rail nav { display: grid; gap: 4px; margin-top: 42px; }
.nav { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; border-radius: 10px; text-align: left; padding: 12px 15px; font-size: 14px; font-weight: 550; color: #454e60; }
.nav::before { content: ""; width: 14px; height: 14px; flex: none; border: 1.5px solid currentColor; border-radius: 3px; }
.nav[data-tab="accounts"]::before { background: linear-gradient(currentColor,currentColor) left 4px top / 1px 100% no-repeat, linear-gradient(currentColor,currentColor) left top 4px / 100% 1px no-repeat; }
.nav[data-tab="projects"]::before { height: 10px; border-radius: 2px 4px 3px 3px; box-shadow: -2px -3px 0 -1px currentColor; }
.nav[data-tab="rules"]::before { border-radius: 50%; background: radial-gradient(circle,currentColor 0 2px,transparent 3px); }
.nav[data-tab="analysis"]::before { border: 0; border-bottom: 1.5px solid; background: linear-gradient(currentColor,currentColor) 1px bottom / 2px 50% no-repeat, linear-gradient(currentColor,currentColor) center bottom / 2px 85% no-repeat, linear-gradient(currentColor,currentColor) right bottom / 2px 66% no-repeat; }
.nav.active { background: var(--blue); color: white; }
.rail-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #cbd2de; padding: 16px 8px 0; font-size: 12px; color: var(--muted); }
.rail-bottom strong, .pill { border-radius: 20px; background: #e8efff; color: #00359b; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.topbar { min-height: 56px; padding: 8px clamp(20px,3vw,44px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; background: #fafbfd; }
.topbar>div, .heading-actions, .refresh-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.workspace { max-width: 1600px; margin: auto; padding: 24px clamp(20px,3vw,44px) 50px; }
.page-heading { margin: 0 0 18px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 2.6vw, 38px); letter-spacing: -.035em; line-height: 1.22; }
h2, .pilot-card h2 { font-size: 18px; letter-spacing: -.025em; }
.muted, .empty, .rule-definitions dd { color: var(--muted); font-size: 13px; line-height: 1.65; }
.pilot-card, .table-panel, .metric { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 5px #101d3b06; }
.pilot-card { padding: 24px; }
.pilot-form { margin-top: 15px; }
.pilot-form label, .pilot-scope label { color: #3f4959; font-size: 13px; font-weight: 550; }
.pilot-form input, .pilot-form select, .pilot-form textarea, .pilot-scope input, .pilot-scope select { border: 1px solid #bac2cf; background: #fff; color: var(--ink); border-radius: 9px; min-height: 42px; font-size: 15px; font-weight: 400; padding: 8px 11px; }
.button { min-height: 40px; padding: 8px 15px; border: 1px solid #c4cbd5; border-radius: 9px; background: white; color: #25334c; font-size: 13px; font-weight: 600; transition: background .14s, transform .14s; }
.button.primary { color: white; background: var(--blue); border-color: var(--blue); }
.button:active:not(:disabled) { transform: scale(.98); }
.button:disabled { cursor: default; }
@media (hover:hover) {
  .button:hover:not(:disabled), .nav:hover:not(.active) { background: #e7ecf5; }
  .button.primary:hover:not(:disabled) { background: var(--blue-hover); }
}
.pilot-scope { margin: 18px 0; gap: 12px; }
.pilot-scope label:first-child { max-width: 380px; }
.pilot-scope .refresh-actions { margin-left: auto; }
.metrics { display: grid; grid-template-columns: 1.25fr 1fr .85fr 1.1fr; gap: 12px; }
.metric { padding: 18px 20px; display: flex; flex-direction: column; }
.metric>span { font-size: 13px; color: var(--muted); font-weight: 550; }
.metric strong { display: block; color: var(--ink); margin: 12px 0; font-size: clamp(26px,2.65vw,42px); font-weight: 580; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric p { margin-top: auto; font-size: 12px; color: var(--muted); line-height: 1.55; }
.metric.featured { position: relative; overflow: hidden; background: var(--blue); border-color: var(--blue); }
.metric.featured::after { content:""; position:absolute; pointer-events:none; width:128px; height:128px; border:1px solid #ffffff22; border-radius:50%; top:-98px; right:-37px; box-shadow:0 0 0 14px #ffffff08,0 0 0 28px #ffffff06; }
.featured strong, .featured>span { color: white; }
.featured p, .featured small { color: #e0e8ff; }
.featured small { margin-left: 5px; font-size: 10px; letter-spacing: .05em; }
.metric .smaller { margin-block: auto; padding-block: 10px; font-size: 17px!important; }
.table-panel { overflow: hidden; }
.table-toolbar { padding: 20px 22px 14px; }
.table-toolbar p { margin-top: 4px; }
.table-scroll { max-width: 100%; overscroll-behavior-x: contain; }
.table-scroll th { font-size: 12px; font-weight: 600; color: #515e70; background: #f4f6fa; }
.table-scroll td { font-size: 14px; color: #202a3b; font-variant-numeric: tabular-nums; }
.table-scroll th, .table-scroll td, .item-row { border-bottom: 1px solid #e6eaf0; }
.table-scroll td small, .item-row small { color: var(--muted); }
.table-scroll tr:last-child td { border: 0; }
#tab-accounts th:nth-child(n+2):nth-child(-n+5), #account-rows td:nth-child(n+2):nth-child(-n+5) { text-align: right; }
#account-rows td:first-child, #account-rows td:last-child { white-space: normal; min-width: 135px; }
#account-rows td:first-child strong { font-weight: 600; }
.refresh-job { padding: 12px 16px; margin-bottom: 16px; border: 1px solid #ccd7e7; border-radius: 12px; background: #f9fbff; color: #25334b; }
.refresh-job-heading strong { font-size: 14px; }
.refresh-job-heading span { color: var(--muted); }
.refresh-job p { margin-top: 5px; }
.refresh-job summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--blue); width: fit-content; padding: 4px 0; }
.refresh-job details[open] .table-scroll { margin-top: 10px; }
.refresh-job progress { accent-color: var(--blue); }
.refresh-job.has-error, .pilot-message.error { background: #fff5ee; border-color: #dbaf91; color: #7c3414; }
.pilot-message, .result-box { background: #eaf0ff; color: #173467; border-color: #c7d6f5; }
.pilot-card .table-scroll { margin-top: 16px; }
.positive { color: #176f43; }
.negative { color: #b03132; }
body:has(#content[hidden]) .rail, body:has(#content[hidden]) .page-heading, body:has(#content[hidden]) .topbar { display: none; }
body:has(#content[hidden]) main { margin-left: 0; }
body:has(#content[hidden]) .workspace { min-height: 100svh; display: grid; align-content: center; justify-items: center; background: radial-gradient(ellipse at 50% 35%, white, #edf0f5 68%, #dce2eb); }
.auth-card { margin: 0; padding: 36px; width: min(100%,420px); box-shadow: 0 18px 60px #26354d16, inset 0 1px white; border-radius: 22px; }
.auth-card h2 { font-size: 25px; margin: 15px 0 6px; }
.auth-card .pilot-form { gap: 16px; margin-top: 24px; }
.auth-card .button { justify-self: stretch; }
.auth-signature { display: flex; align-items: center; gap: 12px; }
.auth-signature::after { content: "巡投"; color: var(--blue); font-size: 20px; font-weight: 650; }
@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rail { width: 172px; } main { margin-left: 172px; }
}
@media (max-width: 760px) {
  .rail { position: static; width: auto; padding: 13px 14px 8px; border: 0; border-bottom: 1px solid #cdd5df; }
  .brand { font-size: 17px; gap: 7px; padding: 0; }
  .brand span:last-child { display: flex; align-items: center; gap: 7px; }
  .brand-mark { width: 28px; height: 28px; border-radius: 9px; }
  .rail nav { display: flex; margin-top: 10px; gap: 3px; }
  .nav { justify-content: center; flex: 1; padding: 8px 2px; min-height: 42px; font-size: 12px; }
  .nav::before, .rail-bottom { display: none; }
  main { margin: 0; }
  .workspace { padding: 18px 14px 32px; }
  .topbar { padding: 5px 14px; min-height: 44px; }
  .topbar .button { padding-inline: 9px; }
  .metrics { gap: 8px; }
  .metric { padding: 14px; border-radius: 12px; }
  .metric .smaller { font-size: 15px!important; }
  .pilot-card { padding: 17px; }
  .pilot-scope { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pilot-scope label, .pilot-scope label:first-child { min-width: 0; max-width:none; }
  .pilot-scope label:first-child, .pilot-scope .refresh-actions { grid-column: 1/-1; width: 100%; }
  .pilot-form input, .pilot-form select, .pilot-form textarea, .pilot-scope input, .pilot-scope select { font-size: 16px; }
  .refresh-job-heading { flex-wrap: wrap; }
  .auth-card { padding: 26px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none!important; } }

#plan-risk .heading-actions, #team-alerts .heading-actions, #tab-materials .heading-actions { margin-block: 12px; }
#plan-risk details, #team-alerts details { margin-block: 8px; }
.pilot-card summary { cursor:pointer; color:var(--blue); padding-block:5px; }
.account-detail-link { font:inherit; font-weight:650; padding:4px 0; color:var(--blue); text-align:left; border:none; background:transparent; cursor:pointer; }
#inventory-dialog { width:min(900px,94vw); max-height:85dvh; padding:24px; border:1px solid var(--line); border-radius:16px; color:var(--ink); background:white; }
#inventory-dialog::backdrop { background:#14243c60; }
#inventory-dialog .heading-actions { justify-content:space-between; }
#inventory-result, #interval-cumulative, #material-coverage { margin-block:14px; }
#interval-metric { margin-left:8px; font:inherit; padding:5px; }
@media(max-width:760px) { .rail nav { display:grid;grid-template-columns:repeat(3,minmax(0,1fr)); } .pilot-scope label:first-child { grid-column:auto; } }
#alert-badge { font-size:12px; line-height:20px; min-width:20px; text-align:center; padding:0 4px; border-radius:20px; color:white; background:#a33713; }
.risk-backfill { margin-bottom:16px; }
#plan-risk h3 { margin-block:18px 7px; }
