
    :root{--bg:#f5f5f7;--surface:#fff;--surface2:#f1f1f3;--text:#171719;--sub:#5f6066;--muted:#64656b;--line:#d5d5da;--accent:#0b725a;--accent2:#e7f4ef;--blue:#1769c2;--red:#a92323;--amber:#76500d;--r:22px;--shadow:0 12px 34px rgba(0,0,0,.07);font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC","Helvetica Neue",Arial,sans-serif;color:var(--text);background:var(--bg)}
    *{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg)}body{padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom);-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(23,105,194,.28);outline-offset:2px}
    .top{position:sticky;top:0;z-index:20;background:rgba(245,245,247,.92);backdrop-filter:saturate(180%) blur(20px);border-bottom:1px solid rgba(0,0,0,.08)}
    .topin{max-width:1220px;margin:auto;padding:13px 20px 10px}.brandrow{display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;align-items:center;gap:11px;min-width:0}.brand-context{border:0;background:transparent;padding:0;color:inherit;text-align:left;cursor:pointer}.brand-context:focus-visible{outline:3px solid rgba(19,119,91,.2);outline-offset:4px;border-radius:13px}.logo{width:40px;height:40px;border-radius:13px;background:#151516;color:#fff;display:grid;place-items:center;font-weight:800;letter-spacing:2px;box-shadow:inset 0 0 0 1px #333}.brand h1{font-size:20px;line-height:1.1;margin:0}.brand p{font-size:12px;color:var(--sub);margin:4px 0 0}.headtools{display:flex;gap:8px;align-items:center}.signal{font-size:12px;color:var(--accent);background:var(--accent2);padding:7px 10px;border-radius:999px;white-space:nowrap}.iconbtn{min-width:48px;height:40px;padding:0 10px;border:1px solid var(--line);background:var(--surface);border-radius:13px;color:var(--text);font-size:12px;font-weight:750}
    .tabs{display:flex;gap:7px;overflow:auto;padding:11px 0 2px;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.tab{flex:0 0 auto;border:0;background:transparent;color:#626269;padding:9px 13px;border-radius:12px;font-size:14px;font-weight:650;min-height:42px}.tab[aria-selected="true"]{color:#fff;background:#171719;box-shadow:0 6px 16px rgba(0,0,0,.14)}.tab .count{font-size:11px;margin-left:4px;padding:2px 5px;border-radius:99px;background:rgba(127,127,127,.14)}
    main{max-width:1220px;margin:auto;padding:24px 20px 90px}.hero{display:grid;grid-template-columns:1.5fr 1fr;gap:16px;margin-bottom:18px}.hero-copy,.formula{border-radius:26px;padding:25px;background:linear-gradient(145deg,#122b25,#0a6e57);color:#fff;min-height:178px;box-shadow:var(--shadow);position:relative;overflow:hidden}.hero-copy:after{content:"";position:absolute;width:230px;height:230px;border-radius:50%;right:-75px;top:-90px;background:rgba(255,255,255,.08)}.eyebrow{font-size:12px;letter-spacing:.12em;opacity:.7;font-weight:700}.hero h2{font-size:30px;line-height:1.12;margin:13px 0 10px;max-width:540px}.hero p{font-size:14px;line-height:1.65;margin:0;color:rgba(255,255,255,.76);max-width:620px}.formula{background:var(--surface);color:var(--text)}.formula h3{margin:0 0 12px;font-size:16px}.formula ol{padding-left:20px;margin:0;color:var(--sub);font-size:13px;line-height:1.8}
    .kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:20px}.kpi{background:var(--surface);border:1px solid rgba(0,0,0,.07);border-radius:18px;padding:15px;min-width:0}.kpi b{font-size:23px;display:block;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpi span{font-size:12px;color:var(--sub);display:block;margin-top:7px}.kpi.danger b{color:var(--red)}.kpi.good b{color:var(--accent)}
    .sectionhead{display:flex;align-items:end;justify-content:space-between;gap:14px;margin:7px 0 14px}.sectionhead h2{font-size:25px;margin:0}.sectionhead p{margin:5px 0 0;color:var(--sub);font-size:13px}.actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.btn{min-height:44px;border-radius:13px;padding:0 15px;border:1px solid var(--line);background:var(--surface);color:var(--text);font-weight:700}.btn.primary{background:#171719;color:white;border-color:#171719}.btn.green{background:var(--accent);color:#fff;border-color:var(--accent)}.btn.danger{color:var(--red);border-color:#efcaca}.btn.small{min-height:38px;padding:0 12px;font-size:13px}.btn:disabled{opacity:.42;cursor:not-allowed}.search{display:flex;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:0 12px;min-width:min(310px,100%)}.search input{width:100%;border:0;background:transparent;min-height:44px;outline:0;color:var(--text)}
    .grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.card{background:var(--surface);border:1px solid rgba(0,0,0,.08);border-radius:var(--r);padding:18px;min-width:0;box-shadow:0 1px 2px rgba(0,0,0,.02)}.cardtop{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.name{font-size:18px;font-weight:760;line-height:1.25}.meta{font-size:12px;color:var(--sub);margin-top:5px;line-height:1.5}.badge{display:inline-flex;align-items:center;min-height:27px;padding:0 9px;border-radius:99px;font-size:12px;font-weight:750;background:var(--surface2);color:#555;white-space:nowrap}.badge.紧急,.badge.过期,.badge.over{background:#fde9e8;color:#a52121}.badge.尽快,.badge.计划,.badge.warn{background:#fff1d7;color:#815009}.badge.充足,.badge.ok{background:var(--accent2);color:var(--accent)}.badge.先消耗{background:#e9effb;color:#275b9b}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:13px 0;margin:14px 0}.metric span{font-size:11px;color:var(--muted);display:block}.metric b{font-size:15px;display:block;margin-top:4px;overflow-wrap:anywhere}.reason{font-size:13px;color:var(--sub);line-height:1.55;min-height:40px}.cardactions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:13px}.check{display:flex;align-items:center;gap:8px;min-height:36px;color:var(--sub);font-size:13px}.check input{width:20px;height:20px;accent-color:var(--accent)}
    .list{display:flex;flex-direction:column;gap:10px}.rowcard{display:grid;grid-template-columns:minmax(190px,1.2fr) repeat(3,minmax(90px,.55fr)) auto;align-items:center;gap:14px;background:var(--surface);border:1px solid rgba(0,0,0,.08);border-radius:18px;padding:15px 17px}.rowcard .value{font-weight:720}.rowcard .label{font-size:12px;color:var(--muted);margin-bottom:4px}.rowbuttons{display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap}
    .dish{padding:0;overflow:hidden}.dishhead{display:flex;align-items:center;gap:12px;padding:17px 18px;border-bottom:1px solid var(--line)}.dishrank{width:44px;height:44px;border-radius:14px;background:var(--accent2);color:var(--accent);display:grid;place-items:center;font-weight:800}.dishlines{padding:4px 18px 14px}.recipe-line{display:grid;grid-template-columns:1fr repeat(3,110px) auto;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--line);font-size:13px}.recipe-line:last-child{border:0}.emptyline{color:var(--muted);font-size:13px;padding:17px 0}.critical{border-color:#ecc1c1;background:#fffafa}.expbar{height:7px;border-radius:99px;background:#e7e7ea;overflow:hidden;margin-top:11px}.expbar i{height:100%;display:block;background:var(--accent);border-radius:99px}.critical .expbar i{background:var(--red)}
    .empty{background:var(--surface);border:1px dashed #cfcfd4;border-radius:22px;text-align:center;padding:58px 20px;color:var(--sub)}.empty b{display:block;color:var(--text);font-size:18px;margin-bottom:6px}.loading{display:grid;place-items:center;min-height:45vh;color:var(--sub)}.spinner{width:28px;height:28px;border:3px solid #ddd;border-top-color:var(--text);border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 12px}@keyframes spin{to{transform:rotate(360deg)}}
    dialog{border:0;padding:0;background:transparent;width:min(620px,calc(100% - 24px));max-height:calc(100dvh - 30px);overflow:visible}dialog::backdrop{background:rgba(0,0,0,.38);backdrop-filter:blur(4px)}.sheet{background:var(--surface);border-radius:28px;box-shadow:0 30px 100px rgba(0,0,0,.28);max-height:calc(100dvh - 30px);overflow:auto;padding:22px}.sheethead{display:flex;align-items:start;justify-content:space-between;gap:10px;margin-bottom:18px}.sheet h2{font-size:23px;margin:0}.sheet .desc{color:var(--sub);font-size:13px;line-height:1.55;margin-top:5px}.close{border:0;background:var(--surface2);border-radius:50%;width:44px;height:44px;font-size:19px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:13px}.field{min-width:0}.field.wide{grid-column:1/-1}.field label{display:block;font-size:12px;font-weight:700;margin:0 0 7px;color:#45454a}.field small{display:block;color:var(--muted);font-size:12px;margin-top:5px;line-height:1.45}.input,.select,.textarea{width:100%;min-height:48px;border:1px solid #c8c8ce;border-radius:13px;background:#fbfbfc;color:var(--text);padding:0 13px;outline:0}.textarea{padding:12px;min-height:80px;resize:vertical}.input[aria-invalid="true"],.select[aria-invalid="true"],.textarea[aria-invalid="true"]{border-color:var(--red);box-shadow:0 0 0 3px rgba(169,35,35,.12)}.formerr{color:var(--red);font-size:13px;min-height:20px;margin:10px 0 0}.sheetfoot{position:sticky;bottom:-22px;background:linear-gradient(transparent,#fff 16px);padding:28px 0 0;display:grid;grid-template-columns:1fr 1.8fr;gap:10px}.sheetfoot .btn{min-height:50px}
    .loginpage{min-height:calc(100dvh - 70px);display:grid;place-items:center;padding:20px}.login{width:min(470px,100%);background:var(--surface);border-radius:30px;padding:30px;box-shadow:var(--shadow);border:1px solid rgba(0,0,0,.08)}.login .logo{width:58px;height:58px;border-radius:18px;font-size:20px}.login h2{font-size:31px;margin:28px 0 8px}.login p{color:var(--sub);line-height:1.6}.login .input{margin-top:18px;height:56px}.login .btn{width:100%;height:54px;margin-top:12px}.notice{padding:13px;border-radius:14px;background:#f2f2f4;color:var(--sub);font-size:12px;line-height:1.5;margin-top:14px}.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));z-index:100;transform:translate(-50%,15px);background:#171719;color:#fff;border-radius:999px;padding:11px 17px;font-size:13px;opacity:0;pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}.sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
    .label-preview{background:#fff;border:1px solid #ddd;border-radius:12px;padding:12px;display:grid;place-items:center;overflow:auto}.label-preview canvas{width:min(100%,480px);height:auto;border:1px solid #eee}.label-setting{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0}.switch{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--surface2);border-radius:14px;padding:12px;font-size:13px}.switch input{width:22px;height:22px;accent-color:var(--accent)}
    .flowgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:24px}.flow{min-height:150px;text-align:left;border:1px solid rgba(0,0,0,.08);background:var(--surface);border-radius:22px;padding:18px;box-shadow:0 4px 16px rgba(0,0,0,.035);color:var(--text)}.flow b{display:block;font-size:19px;margin:18px 0 7px}.flow span{font-size:12px;color:var(--sub);line-height:1.55;display:block}.flowcode{width:40px;height:40px;border-radius:12px;background:var(--accent2);color:var(--accent);display:grid;place-items:center;font-weight:850;letter-spacing:.04em}.flow.primary{background:#171719;color:#fff}.flow.primary span{color:rgba(255,255,255,.65)}.flow.primary .flowcode{background:rgba(255,255,255,.14);color:#fff}.filterbar{display:grid;grid-template-columns:minmax(200px,1.5fr) repeat(3,minmax(130px,.7fr)) auto;gap:9px;margin-bottom:14px}.filterbar .input,.filterbar .select{min-height:44px}.stockrow{display:grid;grid-template-columns:minmax(180px,1.3fr) repeat(5,minmax(90px,.55fr));gap:12px;align-items:center;background:var(--surface);border:1px solid rgba(0,0,0,.08);border-radius:18px;padding:15px 17px}.stockrow .value{font-weight:760}.stockrow .label{font-size:11px;color:var(--muted);margin-bottom:4px}.location-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin-bottom:18px}.location-tile{background:var(--surface);border:1px solid rgba(0,0,0,.08);border-radius:18px;padding:16px}.location-tile b{font-size:20px;display:block}.location-tile span{display:block;color:var(--sub);font-size:12px;margin-top:6px}.timeline{font-size:11px;line-height:1.7;color:var(--muted);white-space:pre-line;margin-top:10px}.req-lines{display:flex;flex-direction:column;gap:8px;margin-top:12px}.req-line{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;background:var(--surface2);padding:11px 12px;border-radius:13px;font-size:13px}.req-status{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.summarygrid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin-bottom:16px}.summarybox{background:var(--surface);border:1px solid rgba(0,0,0,.08);border-radius:16px;padding:14px}.summarybox b{font-size:20px;display:block}.summarybox span{font-size:11px;color:var(--sub);margin-top:5px;display:block}
    .rolebar{display:flex;gap:7px;overflow:auto;scrollbar-width:none;padding:2px 0 15px}.rolebar::-webkit-scrollbar{display:none}.rolechip{border:1px solid var(--line);background:var(--surface);border-radius:999px;min-height:40px;padding:0 16px;color:var(--sub);font-weight:720;white-space:nowrap}.rolechip.active{background:#171719;border-color:#171719;color:#fff}.commandhero{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(260px,.55fr);gap:14px;margin-bottom:18px}.command-main{background:linear-gradient(145deg,#1a1a1c,#313136);border-radius:27px;padding:25px;color:#fff;box-shadow:var(--shadow)}.command-main h2{font-size:30px;line-height:1.18;margin:11px 0 8px}.command-main p{margin:0;color:rgba(255,255,255,.66);font-size:13px;line-height:1.6}.scorecard{background:var(--surface);border:1px solid rgba(0,0,0,.08);border-radius:27px;padding:22px;display:flex;flex-direction:column;justify-content:space-between}.scorecard strong{font-size:44px;line-height:1}.scorecard span{color:var(--sub);font-size:12px}.scorebar{height:8px;background:#e7e7ea;border-radius:99px;overflow:hidden;margin:14px 0 8px}.scorebar i{display:block;height:100%;background:var(--accent);border-radius:99px}.actiongrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:22px}.actioncard{border:1px solid rgba(0,0,0,.08);background:var(--surface);border-radius:19px;padding:16px;text-align:left;color:var(--text);min-height:128px}.actioncard b{display:block;font-size:27px;line-height:1;margin-bottom:12px}.actioncard strong{display:block;font-size:15px}.actioncard span{font-size:12px;color:var(--sub);line-height:1.45;display:block;margin-top:5px}.actioncard.critical{box-shadow:inset 4px 0 #c23b35}.actioncard.warning{box-shadow:inset 4px 0 #b67b1a}.stationgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:22px}.station{background:var(--surface);border:1px solid rgba(0,0,0,.08);border-radius:19px;padding:16px}.stationtop{display:flex;align-items:center;justify-content:space-between;gap:10px}.station b{font-size:18px}.station .load{font-size:28px;font-weight:780;margin:14px 0 3px}.station .loadsub{font-size:12px;color:var(--sub)}.task-toolbar{display:grid;grid-template-columns:minmax(200px,1fr) repeat(2,minmax(140px,.5fr)) auto;gap:9px;margin-bottom:13px}.tasklist{display:flex;flex-direction:column;gap:10px}.taskcard{background:var(--surface);border:1px solid rgba(0,0,0,.08);border-radius:20px;padding:17px}.taskcard.overdue{border-color:#e2a6a3;box-shadow:inset 4px 0 #b52b2b}.taskgrid{display:grid;grid-template-columns:minmax(190px,1.25fr) repeat(3,minmax(90px,.55fr));gap:12px;align-items:center}.taskname{font-size:18px;font-weight:780}.taskmeta{font-size:12px;color:var(--sub);line-height:1.55;margin-top:5px}.taskmetric span{font-size:11px;color:var(--muted);display:block}.taskmetric b{display:block;margin-top:4px;font-size:15px}.taskactions{display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:12px;margin-top:13px}.sla{font-variant-numeric:tabular-nums}.bottomnav{display:none}.dangertext{color:var(--red)!important}.goodtext{color:var(--accent)!important}
    @media(max-width:900px){.flowgrid{grid-template-columns:1fr 1fr}.filterbar{grid-template-columns:1fr 1fr}.stockrow{grid-template-columns:1fr 1fr 1fr}.summarygrid{grid-template-columns:repeat(3,1fr)}.actiongrid,.stationgrid{grid-template-columns:1fr 1fr}.taskgrid{grid-template-columns:1fr 1fr}.task-toolbar{grid-template-columns:1fr 1fr}}
    @media(max-width:900px){.hero{grid-template-columns:1fr}.formula{min-height:0}.kpis{grid-template-columns:repeat(3,1fr)}.grid{grid-template-columns:1fr}.rowcard{grid-template-columns:1fr 1fr}.rowbuttons{grid-column:1/-1}.recipe-line{grid-template-columns:1fr 1fr}.recipe-line .btn{justify-self:end}}
    @media(max-width:560px){.topin{padding-left:14px;padding-right:14px}.brand p{display:none}.brand h1{font-size:18px}.signal{width:10px;height:10px;padding:0;font-size:0}.signal span{display:none}.headtools{gap:7px}main{padding:16px 12px calc(96px + env(safe-area-inset-bottom))}.hero-copy,.formula{border-radius:22px;padding:20px}.hero h2{font-size:25px}.kpis{gap:7px}.kpi{padding:12px 10px;border-radius:15px}.kpi b{font-size:19px}.sectionhead{align-items:flex-start;flex-direction:column}.sectionhead .actions,.search{width:100%}.sectionhead .actions .btn{flex:1}.card{padding:15px;border-radius:19px}.metrics{grid-template-columns:1fr 1fr}.rowcard{gap:10px;padding:14px}.fields{grid-template-columns:1fr}.field.wide{grid-column:auto}.sheet{padding:19px 16px;border-radius:24px}.sheetfoot{bottom:-19px}.label-setting{grid-template-columns:1fr 1fr}.tabs{display:none}.name{font-size:17px}.flowgrid{grid-template-columns:1fr 1fr;gap:8px}.flow{min-height:130px;padding:14px;border-radius:18px}.flow b{font-size:17px;margin-top:13px}.filterbar{grid-template-columns:1fr}.stockrow{grid-template-columns:1.4fr 1fr;padding:14px}.stockrow>div:nth-child(n+4){display:none}.summarygrid{grid-template-columns:1fr 1fr}.req-line{grid-template-columns:1fr auto}.commandhero{grid-template-columns:1fr}.command-main,.scorecard{border-radius:22px;padding:20px}.command-main h2{font-size:25px}.actiongrid,.stationgrid{grid-template-columns:1fr}.task-toolbar{grid-template-columns:1fr}.taskgrid{grid-template-columns:1fr 1fr}.taskgrid>div:first-child{grid-column:1/-1}.bottomnav{position:fixed;display:grid;grid-template-columns:repeat(5,1fr);left:0;right:0;bottom:0;z-index:30;background:rgba(250,250,252,.94);backdrop-filter:saturate(180%) blur(18px);border-top:1px solid rgba(0,0,0,.1);padding:7px 6px calc(7px + env(safe-area-inset-bottom))}.bottomnav button{border:0;background:transparent;color:var(--sub);min-height:52px;border-radius:13px;font-size:11px;font-weight:720}.bottomnav button b{display:block;font-size:17px;line-height:1.25}.bottomnav button.active{color:var(--text);background:#fff}.toast{bottom:calc(78px + env(safe-area-inset-bottom))}}
    @media(max-width:560px){main{padding-bottom:calc(128px + env(safe-area-inset-bottom))}.bottomnav{background:#fafafc;box-shadow:0 -10px 26px rgba(0,0,0,.06)}.toast{bottom:calc(92px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100% - 32px);border-radius:16px;text-align:center;line-height:1.45;box-shadow:0 10px 30px rgba(0,0,0,.2)}}
    @media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
    @media print{.top,.no-print,.toast{display:none!important}body,main{background:#fff;padding:0}.label-preview{border:0;padding:0}.label-preview canvas{width:60mm;height:40mm;border:0}}
  
:root {
  --wb-ink: #111113;
  --wb-text: #111113;
  --wb-sub: #6e6e73;
  --wb-line: rgba(17, 17, 19, 0.09);
  --wb-green: #087b62;
  --wb-green-soft: #e7f6f1;
  --wb-blue: #1769c2;
  --wb-red: #bd2f2b;
  --wb-amber: #9b650b;
  --status-critical: #b42318;
  --status-critical-bg: #fee4e2;
  --status-warning: #b54708;
  --status-warning-bg: #fef0c7;
  --status-awaiting: #175cd3;
  --status-awaiting-bg: #d1e9ff;
  --status-active: #6938ef;
  --status-active-bg: #e9d7fe;
  --status-complete: #067647;
  --status-complete-bg: #dcfae6;
  --status-neutral: #475467;
  --status-neutral-bg: #f2f4f7;
  --status-neutral-border: #d0d5dd;
  --role-accent: #171719;
  --role-accent-soft: #f2f4f7;
  --role-accent-rgb: 23, 23, 25;
  --cat: #24745e;
}

.command-blocked{border-color:#e9c78b;background:#fffbf2}
.purchase-flow>summary{font-size:13px;min-height:44px;display:flex;align-items:center;gap:8px;color:var(--wb-sub);cursor:pointer}
.purchase-flow>summary:before{content:'›';font-size:18px}
.purchase-flow[open]>summary:before{content:'⌄'}
.purchase-card .req-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px}
.purchase-card .req-line>div{min-width:0;grid-column:1;grid-row:1}
.purchase-card .req-line b,.purchase-card .req-line small{display:block;overflow-wrap:anywhere}
.purchase-card .req-line small{color:var(--wb-sub);font-size:12px;margin-top:3px}
.purchase-card .req-line>span:not(.badge){grid-column:1/-1;grid-row:2;white-space:normal;line-height:1.5}
.purchase-card .req-line>.badge,.purchase-card .req-line>button{grid-column:2;grid-row:1}
.command-blocked b{color:#78430e}
.smart-leaf-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:12px;border-top:1px solid var(--wb-line)}
.smart-leaf-pagination button{min-height:44px}
.smart-leaf-pagination span{font-size:13px;font-variant-numeric:tabular-nums}
/* R54: one live configuration center for fast-changing business master data. */
.configuration-object-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0 18px}
.configuration-object-card{min-width:0;min-height:92px;border:1px solid var(--line,#dde1e6);border-radius:18px;background:#fff;padding:16px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:14px;color:inherit;box-shadow:0 8px 24px rgba(18,24,31,.04)}
.configuration-object-card span{display:grid;gap:6px;min-width:0}
.configuration-object-card b{font-size:18px;line-height:1.25}
.configuration-object-card small{color:var(--muted,#687386);font-size:13px;line-height:1.45}
.configuration-object-card em{font-style:normal;font-weight:800;color:#147861;white-space:nowrap}
.configuration-object-card:focus-visible,.configuration-object-card:hover{border-color:#57a992;box-shadow:0 0 0 3px rgba(31,139,111,.12)}
.configuration-safety{display:flex;gap:10px;align-items:flex-start;margin:12px 0 18px;padding:13px 15px;border-radius:14px;background:#eef8f4;color:#155c4b}
.configuration-safety b{white-space:nowrap}.configuration-safety span{color:#3f6259;line-height:1.5}
.configuration-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.configuration-metrics>div{display:grid;gap:4px;padding:12px;border:1px solid var(--line,#dde1e6);border-radius:14px;background:#fff}
.configuration-metrics span{font-size:12px;color:var(--muted,#687386)}.configuration-metrics b{font-size:22px}
.item-category-classes{display:grid;gap:10px;margin-top:14px}
.item-category-class,.item-category-node{border:1px solid var(--line,#dde1e6);border-radius:16px;background:#fff;overflow:hidden}
.item-category-class>summary,.item-category-node>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:11px 14px}
.item-category-class>summary::-webkit-details-marker,.item-category-node>summary::-webkit-details-marker{display:none}
.item-category-class>summary span,.item-category-node>summary span{display:grid;gap:3px;min-width:0}
.item-category-class>summary b{font-size:17px}.item-category-node>summary b{font-size:15px}
.item-category-class>summary small,.item-category-node>summary small{font-size:12px;color:var(--muted,#687386)}
.item-category-class>summary:after,.item-category-node>summary:after{content:'›';font-size:22px;color:#687386;transform:rotate(90deg);transition:transform .16s ease}
.item-category-class:not([open])>summary:after,.item-category-node:not([open])>summary:after{transform:rotate(0)}
.item-category-class-actions,.item-category-node-actions{display:flex;justify-content:flex-end;gap:8px;padding:0 12px 10px}
.item-category-tree{display:grid;gap:8px;padding:0 10px 10px}.item-category-children{display:grid;gap:7px;padding:0 9px 9px 18px}
.item-category-node.level-1{border-left:4px solid #147861}.item-category-node.level-2{border-left:4px solid #81b9aa}.item-category-node.level-3{border-left:4px solid #c8ddd7}
.item-category-node.is-disabled{opacity:.62;background:#f6f7f8}
.configuration-list{display:grid;gap:8px}.configuration-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--line,#dde1e6);border-radius:14px;background:#fff}
.configuration-row>div{display:grid;gap:4px;min-width:0}.configuration-row span{font-size:12px;color:var(--muted,#687386)}
.configuration-groups{display:grid;gap:9px}.configuration-group{border:1px solid var(--line,#dde1e6);border-radius:15px;background:#fff;overflow:hidden}
.configuration-group>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:58px;padding:10px 14px;cursor:pointer;list-style:none}.configuration-group>summary::-webkit-details-marker{display:none}
.configuration-group>summary span{display:grid;gap:3px;min-width:0}.configuration-group>summary b{font-size:15px}.configuration-group>summary small,.configuration-group>summary em{font-size:12px;color:var(--muted,#687386);font-style:normal}.configuration-group>.configuration-list{padding:0 9px 9px;background:#f7f8f9}
.location-branch{border:1px solid var(--line,#dde1e6);border-radius:16px;background:#fff;overflow:hidden}
.location-branch>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;padding:10px 13px}
.location-branch>summary::-webkit-details-marker{display:none}
.location-branch-main{display:flex;align-items:center;gap:10px;min-width:0}.location-branch-main>span{display:grid;gap:3px;min-width:0}.location-branch-main b{font-size:15px}.location-branch-main small{font-size:12px;color:#687386;overflow-wrap:anywhere}
.location-branch-main img{width:44px;height:44px;flex:0 0 44px;object-fit:cover;border-radius:11px}
.location-branch-meta{display:flex;align-items:center;gap:8px;white-space:nowrap}.location-branch-meta>small{font-size:12px;color:#687386}
.location-branch>summary:after{content:'›';font-size:22px;color:#687386;transform:rotate(90deg);transition:transform .16s ease}.location-branch:not([open])>summary:after{transform:rotate(0)}
.location-branch-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 13px 10px}.location-branch-actions>span{font-size:12px;color:#687386;overflow-wrap:anywhere}.location-branch-actions>div{display:flex;gap:8px}
.location-branch-children{display:grid;gap:7px;padding:0 9px 9px 18px}.location-branch.level-0{border-left:4px solid #147861}.location-branch.level-1{border-left:4px solid #81b9aa}.location-branch.level-2,.location-branch.level-3,.location-branch.level-4{border-left:4px solid #c8ddd7}.location-branch.is-disabled{opacity:.62;background:#f6f7f8}
@media(max-width:720px){
  .configuration-object-grid{grid-template-columns:1fr;gap:8px}.configuration-object-card{min-height:76px;padding:13px 14px;border-radius:15px}
  .configuration-object-card b{font-size:16px}.configuration-object-card em{font-size:13px}
  .configuration-safety{display:grid}.configuration-metrics{gap:7px}.configuration-metrics>div{padding:10px}.configuration-metrics b{font-size:18px}
  .item-category-class>summary,.item-category-node>summary{padding:10px 11px}.item-category-children{padding-left:10px}
  .configuration-row{grid-template-columns:minmax(0,1fr) auto}.configuration-row>.btn{grid-column:1/-1;width:100%}
  .location-branch>summary{min-height:58px;padding:9px 10px}.location-branch-meta>.status-chip{display:none}.location-branch-meta>small{font-size:11px}.location-branch-children{padding-left:9px}
  .location-branch-actions{align-items:stretch;flex-direction:column}.location-branch-actions>div{display:grid;grid-template-columns:1fr 1fr}.location-branch-actions .btn{min-height:42px}
}

/* R49 native mobile scanner: camera first, manual entry only as recovery. */
.camera-scan-shell {
  display: grid;
  gap: 12px;
}

.camera-scan-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  border-radius: 18px;
  background: #111113;
}

.camera-scan-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-scan-guide {
  position: absolute;
  inset: 18%;
  border: 2px solid rgba(255, 255, 255, .96);
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .22);
  pointer-events: none;
}

.camera-scan-guide i {
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #51d4ad;
  box-shadow: 0 0 12px rgba(81, 212, 173, .9);
}

.camera-scan-status {
  margin: 0;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--status-neutral);
  background: var(--status-neutral-bg);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}

.camera-scan-status.active { color: var(--status-awaiting); background: var(--status-awaiting-bg); }
.camera-scan-status.success { color: var(--status-complete); background: var(--status-complete-bg); }
.camera-scan-status.error { color: var(--status-critical); background: var(--status-critical-bg); }

.camera-scan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.camera-scan-actions .btn,
.camera-scan-actions label.btn {
  min-height: 48px;
  margin: 0;
}

.camera-scan-fallback {
  border-top: 1px solid var(--wb-line);
  padding-top: 4px;
}

.camera-scan-fallback > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--wb-sub);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.camera-scan-manual {
  display: grid;
  gap: 7px;
  padding-bottom: 4px;
}

.camera-scan-manual > label {
  color: var(--wb-text);
  font-size: 13px;
  font-weight: 800;
}

.camera-scan-manual > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

@media (max-width: 520px) {
  .camera-scan-stage { min-height: 250px; }
  .camera-scan-actions { grid-template-columns: 1fr; }
  .camera-scan-actions .btn,
  .camera-scan-actions label.btn { width: 100%; }
}

/* ========================================================================== */
/* R14 · 2026-08-26 全界面字符级整改                                        */
/* 目标：任务优先、权限可发现、状态可辨认、移动端零横向溢出、弹窗始终可操作。 */
/* ========================================================================== */

:root {
  --signal-critical: #b42318;
  --signal-critical-bg: #fef3f2;
  --signal-warning: #9a6700;
  --signal-warning-bg: #fffaeb;
  --signal-info: #175cd3;
  --signal-info-bg: #eff8ff;
  --signal-success: #067647;
  --signal-success-bg: #ecfdf3;
  --surface-subtle: #f6f7f8;
  --line-strong: #cfd4dc;
}

#app,
#app * {
  min-width: 0;
  box-sizing: border-box;
}

#app :where(h1, h2, h3, h4, p, li, dt, dd, label, button, a, span, strong, small) {
  overflow-wrap: anywhere;
}

#app :where(input, select, textarea, button) {
  max-width: 100%;
}

#app :where(button, .btn) {
  white-space: normal;
  text-wrap: balance;
}

.role-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid #171719;
  border-radius: 12px;
  color: #fff;
  background: #171719;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.role-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workbench-hero.role-intro.compact {
  position: relative;
  min-height: 0;
  margin: 0 0 14px;
  padding: 18px 20px;
  overflow: hidden;
  border: 1px solid #e1e4e8;
  border-left: 5px solid #171719;
  border-radius: 20px;
  color: #171719;
  background: linear-gradient(135deg, #ffffff 0%, #f6f8fb 100%);
  box-shadow: 0 10px 28px rgba(16, 24, 40, .06);
}

.workbench-hero.role-intro.compact::before,
.workbench-hero.role-intro.compact::after {
  display: none;
}

.workbench-hero.role-intro.compact .eyebrow {
  margin-bottom: 6px;
  color: #475467;
}

.workbench-hero.role-intro.compact h1 {
  max-width: none;
  margin: 0 0 7px;
  color: #171719;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

.workbench-hero.role-intro.compact p {
  max-width: 860px;
  margin: 0;
  color: #475467;
  line-height: 1.65;
}

.task-section {
  scroll-margin-top: 120px;
}

.task-card[data-urgency="critical"],
.task-card.critical,
.alert.critical {
  border-color: #f2b8b5;
  background: var(--signal-critical-bg);
}

.task-card[data-urgency="warning"],
.task-card.warning,
.alert.warning {
  border-color: #efd48d;
  background: var(--signal-warning-bg);
}

.task-card[data-urgency="info"],
.task-card.info,
.alert.info {
  border-color: #b2ddff;
  background: var(--signal-info-bg);
}

.task-card[data-urgency="success"],
.task-card.success,
.alert.success {
  border-color: #abefc6;
  background: var(--signal-success-bg);
}

.alert-activation-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 0 20px;
  padding: 18px 20px;
  border: 1px solid #b2ddff;
  border-radius: 18px;
  background: var(--signal-info-bg);
}

.alert-activation-settings h3 {
  margin: 0 0 4px;
  color: #1849a9;
}

.alert-activation-settings p {
  margin: 0;
  color: #344054;
}

.directory-pc-fallback {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #b2ddff;
  border-radius: 16px;
  background: var(--signal-info-bg);
}

.directory-pc-fallback h3,
.directory-pc-fallback p {
  margin: 0;
}

.directory-pc-fallback ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: #344054;
}

.module-menu-list {
  display: grid;
  gap: 10px;
}

.module-menu-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid #e1e4e8;
  border-radius: 16px;
  color: #171719;
  background: #fff;
  text-align: left;
}

.module-menu-item:active,
.module-menu-item:hover {
  border-color: #98a2b3;
  background: #f8fafc;
}

.module-menu-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #344054;
  background: #eef2f6;
  font-size: 16px;
  font-weight: 900;
}

.module-menu-copy {
  display: grid;
  gap: 3px;
}

.module-menu-copy strong {
  font-size: 16px;
  line-height: 1.3;
}

.module-menu-copy small {
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.module-menu-arrow {
  color: #667085;
  font-size: 20px;
}

.bottomnav button {
  display: grid;
  grid-template-rows: 18px auto;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 6px 4px;
}

.bottomnav button > b {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  color: #fff;
  background: #b42318;
  font-size: 10px;
  line-height: 1;
}

.bottomnav button > b:empty {
  visibility: hidden;
}

.bottomnav button > span {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-subnav {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 6px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid #e1e4e8;
  border-radius: 18px;
  background: #eaecf0;
  scrollbar-width: thin;
}

.settings-subnav button {
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #475467;
  background: transparent;
  font-weight: 760;
}

.settings-subnav button.active {
  border-color: #d0d5dd;
  color: #171719;
  background: #fff;
  box-shadow: 0 5px 12px rgba(16, 24, 40, .09);
}

.master-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.master-card,
.master-list {
  border: 1px solid #e1e4e8;
  border-radius: 18px;
  background: #fff;
}

.master-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.master-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.master-card h3,
.master-card p,
.master-card dl {
  margin: 0;
}

.master-card dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 7px 12px;
  color: #475467;
}

.master-card dt {
  color: #667085;
}

.master-card dd {
  color: #171719;
  font-weight: 650;
}

.master-list {
  overflow: hidden;
}

.master-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(120px, .8fr) minmax(130px, .8fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border-bottom: 1px solid #eaecf0;
}

.master-row:last-child {
  border-bottom: 0;
}

.master-row-copy {
  display: grid;
  gap: 3px;
}

.master-row-copy small {
  color: #667085;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #344054;
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 750;
}

.status-chip.success {
  color: var(--signal-success);
  background: var(--signal-success-bg);
}

.status-chip.warning {
  color: var(--signal-warning);
  background: var(--signal-warning-bg);
}

.status-chip.critical {
  color: var(--signal-critical);
  background: var(--signal-critical-bg);
}

dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: 92dvh;
  padding: 0;
  overflow: visible;
}

dialog .sheet {
  width: 100%;
  max-height: 92dvh;
  padding: 22px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

dialog .sheethead {
  position: sticky;
  z-index: 4;
  top: -22px;
  margin: -22px -22px 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #eaecf0;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
}

dialog .sheetfoot {
  position: sticky;
  z-index: 4;
  bottom: -22px;
  margin: 18px -22px -22px;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #eaecf0;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
}

dialog .formgrid,
dialog .form-grid,
dialog .permission-grid {
  min-width: 0;
}

dialog :where(input, select, textarea) {
  min-height: 48px;
}

dialog textarea {
  resize: vertical;
}

.sheet .empty,
.empty-state {
  padding: 28px 18px;
  border: 1px dashed #d0d5dd;
  border-radius: 16px;
  color: #667085;
  background: #f9fafb;
  text-align: center;
}

@media (max-width: 860px) {
  .identitybar {
    gap: 10px;
    padding: 10px 14px;
  }

  .identitybar .brand-copy small,
  .identitybar .version-pill {
    display: none;
  }

  .identitybar .brand-copy strong {
    font-size: 17px;
  }

  .settings-subnav {
    grid-template-columns: repeat(5, minmax(104px, 1fr));
  }

  .master-card-grid {
    grid-template-columns: 1fr;
  }

  .master-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .master-row > :nth-child(2),
  .master-row > :nth-child(3) {
    grid-column: 1;
  }

  .master-row > :last-child {
    grid-column: 2;
    grid-row: 1 / span 3;
  }
}

@media (max-width: 560px) {
  body {
    overflow-x: hidden;
  }

  #app {
    width: 100%;
    overflow-x: clip;
  }

  .identitybar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 66px;
  }

  .identitybar .brand,
  .identitybar .actions {
    min-width: 0;
  }

  .identitybar .actions {
    gap: 6px;
  }

  .identitybar .actions .btn {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .identitybar .actions .btn:nth-of-type(n+3) {
    display: none;
  }

  .role-card,
  .workbench-hero.role-intro.compact,
  .section-card,
  .settings-shell,
  .pulse-card {
    border-radius: 18px;
  }

  .role-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .role-card .role-current,
  .role-card .role-switch {
    justify-self: stretch;
  }

  .role-card .role-current {
    width: 100%;
  }

  .workbench-hero.role-intro.compact {
    margin-bottom: 12px;
    padding: 16px;
    border-left-width: 4px;
  }

  .workbench-hero.role-intro.compact h1 {
    font-size: 25px;
  }

  .workbench-hero.role-intro.compact p {
    font-size: 14px;
    line-height: 1.55;
  }

  .alert-activation-settings {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px;
  }

  .alert-activation-settings .btn {
    width: 100%;
  }

  .settings-subnav {
    grid-template-columns: repeat(5, minmax(92px, 1fr));
    margin-inline: -2px;
  }

  .settings-subnav button {
    min-height: 44px;
    padding: 8px 9px;
    font-size: 13px;
  }

  .master-card {
    padding: 15px;
  }

  .master-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .master-card-head .btn {
    width: 100%;
  }

  .master-card dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .master-card dd {
    margin: 0 0 8px;
  }

  .master-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding: 14px;
  }

  .master-row > :nth-child(n) {
    grid-column: 1;
    grid-row: auto;
  }

  .master-row .btn {
    width: 100%;
  }

  .module-menu-item {
    grid-template-columns: 40px minmax(0, 1fr) 18px;
    min-height: 64px;
    padding: 11px 12px;
  }

  .module-menu-icon {
    width: 40px;
    height: 40px;
  }

  dialog[open] {
    width: calc(100vw - 12px);
    max-height: 94dvh;
    margin: auto 6px max(6px, env(safe-area-inset-bottom));
    border-radius: 24px 24px 18px 18px;
  }

  dialog .sheet {
    max-height: 94dvh;
    padding: 16px;
  }

  dialog .sheethead {
    top: -16px;
    margin: -16px -16px 14px;
    padding: 16px 16px 12px;
  }

  dialog .sheetfoot {
    bottom: -16px;
    grid-template-columns: 1fr;
    margin: 16px -16px -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }

  dialog .sheetfoot .btn,
  dialog .sheetfoot button {
    width: 100%;
  }

  dialog :where(.formgrid, .form-grid, .permission-grid, .split-form, .two-column) {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  dialog :where(input, select, textarea) {
    width: 100%;
    min-height: 50px;
    font-size: 16px;
  }

  dialog input[type="checkbox"],
  dialog input[type="radio"] {
    width: 22px;
    min-height: 22px;
  }

  .bottomnav {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* R50 店长台：小坐经营真值直接进入工作台，短周期优先、异常优先。 */
.manager-live {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  color: #17191c;
}
.manager-live-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 0;
}
.manager-live-head > div:first-child { min-width: 0; }
.manager-eyebrow { display: block; margin-bottom: 3px; color: #176b57; font-size: 12px; font-weight: 850; letter-spacing: .06em; }
.manager-live-head h2 { margin: 0; font-size: clamp(22px,2.6vw,30px); line-height: 1.2; letter-spacing: -.025em; }
.manager-live-head p { margin: 4px 0 0; color: #747981; font-size: 12px; line-height: 1.45; }
.manager-live-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.manager-live-actions .btn { min-height: 40px; padding: 0 14px; }
.manager-source { display: inline-flex; min-height: 36px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #dfe4e2; border-radius: 999px; background: #fff; color: #59615e; font-size: 12px; font-weight: 800; white-space: nowrap; }
.manager-source i { width: 8px; height: 8px; border-radius: 50%; background: #87918e; }
.manager-source.live { border-color: #cce7dd; background: #eff9f5; color: #176b57; }
.manager-source.live i { background: #18a579; box-shadow: 0 0 0 4px rgba(24,165,121,.1); }
.manager-source.stale { border-color: #f0d9ab; background: #fff9e9; color: #91600b; }
.manager-source.stale i { background: #c98611; }
.manager-source.blocked { border-color: #efd0cd; background: #fff4f3; color: #a5362f; }
.manager-source.blocked i { background: #c4473f; }
.manager-hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(132px,.35fr);
  gap: 12px;
  overflow: hidden;
  padding: clamp(20px,3vw,32px);
  border-radius: 24px;
  background: linear-gradient(135deg,#0f3b30 0%,#176b57 60%,#248b70 100%);
  color: #fff;
  box-shadow: 0 18px 50px rgba(19,92,73,.16);
}
.manager-hero-main { display: grid; align-content: center; gap: 5px; min-width: 0; }
.manager-hero-main > small { color: rgba(255,255,255,.72); font-size: 13px; font-weight: 760; }
.manager-hero-main > b { font-variant-numeric: tabular-nums; font-size: clamp(38px,6vw,58px); line-height: 1; letter-spacing: -.055em; white-space: nowrap; }
.manager-hero-main > span { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.82); font-size: 12px; }
.manager-hero-order { display: grid; align-content: center; justify-items: end; gap: 1px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.19); text-align: right; }
.manager-hero-order > b { font-size: clamp(30px,4vw,42px); line-height: 1; font-variant-numeric: tabular-nums; }
.manager-hero-order > span { color: rgba(255,255,255,.9); font-size: 13px; font-weight: 760; }
.manager-hero-order > small { margin-top: 7px; color: rgba(255,255,255,.67); font-size: 11px; }
.manager-change { display: inline-flex; align-items: center; border-radius: 999px; font-size: 11px; font-weight: 850; font-style: normal; white-space: nowrap; }
.manager-change.up { color: #087b62; }
.manager-change.down { color: #bd2f2b; }
.manager-change.neutral { color: #7a8088; }
.manager-hero .manager-change { padding: 3px 7px; background: rgba(255,255,255,.15); color: #fff; }
.manager-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  overflow: hidden;
  border: 1px solid #e3e6e5;
  border-radius: 18px;
  background: #fff;
}
.manager-kpis > div { display: grid; align-content: center; min-width: 0; min-height: 86px; padding: 13px 16px; border-right: 1px solid #eceeed; }
.manager-kpis > div:last-child { border-right: 0; }
.manager-kpis span { color: #72787f; font-size: 11px; font-weight: 730; }
.manager-kpis b { overflow: hidden; margin-top: 4px; font-size: 21px; line-height: 1.2; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.manager-kpis small { margin-top: 4px; color: #888e94; font-size: 10px; line-height: 1.3; }
.manager-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.manager-section-title > span { font-size: 17px; font-weight: 860; }
.manager-section-title > small { color: #858a90; font-size: 11px; }
.manager-tips,
.manager-panel,
.manager-secondary,
.manager-tasks,
.manager-task-clear,
.manager-clear { border: 1px solid #e2e6e4; border-radius: 18px; background: #fff; }
.manager-tips,
.manager-panel { padding: 15px 16px; }
.manager-tip,
.manager-clear,
.manager-task-clear { display: flex; min-width: 0; align-items: center; gap: 10px; }
.manager-tip { min-height: 48px; padding: 8px 0; border-top: 1px solid #edf0ef; }
.manager-tip:nth-child(2) { border-top: 0; }
.manager-tip > i,
.manager-clear > i,
.manager-task-clear > i { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #2a8b70; box-shadow: 0 0 0 5px rgba(42,139,112,.1); }
.manager-tip.warning > i { background: #c78313; box-shadow: 0 0 0 5px rgba(199,131,19,.1); }
.manager-tip.danger > i { background: #c4433c; box-shadow: 0 0 0 5px rgba(196,67,60,.1); }
.manager-tip > span,
.manager-clear > span,
.manager-task-clear > span { display: grid; min-width: 0; gap: 2px; }
.manager-tip b,
.manager-clear b,
.manager-task-clear b { font-size: 13px; line-height: 1.4; }
.manager-tip small,
.manager-clear small,
.manager-task-clear small { color: #777e83; font-size: 11px; line-height: 1.4; }
.manager-clear,
.manager-task-clear { min-height: 58px; padding: 10px 16px; }
.manager-category-list { display: grid; }
.manager-category-row { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 57px; border-top: 1px solid #edf0ef; }
.manager-category-row:first-child { border-top: 0; }
.manager-category-row > i,
.manager-products-group summary i { width: 7px; height: 28px; border-radius: 99px; background: var(--cat,#24745e); }
.manager-category-row > span { display: grid; min-width: 0; gap: 2px; }
.manager-category-row > span b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.manager-category-row small { color: #858a90; font-size: 10px; }
.manager-category-row > em { display: grid; justify-items: end; gap: 2px; font-style: normal; }
.manager-category-row > em b { font-size: 14px; font-variant-numeric: tabular-nums; }
.manager-trend-bars,
.manager-hour-bars { display: flex; height: 150px; align-items: end; justify-content: stretch; gap: 8px; padding: 18px 2px 0; }
.manager-trend-bars > div,
.manager-hour-bars > div { display: grid; flex: 1 1 0; height: 100%; align-items: end; justify-items: center; grid-template-rows: 18px 1fr 20px; min-width: 0; }
.manager-trend-bars i,
.manager-hour-bars i { display: block; width: min(34px,72%); align-self: end; border-radius: 2px 2px 0 0; background: #24745e; min-height: 0; }
.manager-signed-values { display: grid; grid-template-columns: repeat(auto-fit,minmax(86px,1fr)); gap: 12px; font-variant-numeric: tabular-nums; }
.manager-signed-values dd { margin: 4px 0 0; font-weight: 700; }
.manager-reconcile { padding: 12px 14px; background: #fff5e9; border: 1px solid #eed0a6; border-radius: 12px; }
.manager-reconcile p { margin: 5px 0; overflow-wrap: anywhere; }
.manager-reconcile { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; }
.manager-reconcile > div { min-width: 0; }
.manager-reconcile small { color: #76501e; line-height: 1.5; }
.manager-reconcile > details { grid-column: 1 / -1; }
.manager-reconcile summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 650; }
.manager-reconcile .btn { min-height: 44px; white-space: normal; }
.manager-kpis.manager-kpis-primary { grid-template-columns: repeat(2,minmax(0,1fr)); }
.manager-setup { margin-top: 12px; }
@media (max-width: 600px) {
  .manager-reconcile { grid-template-columns: minmax(0,1fr); }
  .manager-reconcile .btn { width: 100%; }
  .label-summary > div { min-width: 0; padding: 10px 8px; }
  .label-summary span { font-size: 11px; overflow-wrap: anywhere; }
}
.manager-bar-value { color: #66706d; font-size: 9px; font-weight: 750; font-variant-numeric: tabular-nums; }
.manager-trend-bars small,
.manager-hour-bars small { color: #8a9095; font-size: 9px; white-space: nowrap; }
.manager-hour-bars { height: 116px; gap: 3px; }
.manager-hour-bars > div { grid-template-rows: 1fr 18px; }
.manager-hour-bars i { width: 74%; background: #78aa9b; }
.manager-products-group { border-top: 1px solid #edf0ef; }
.manager-products-group:first-of-type { border-top: 0; }
.manager-products-group > summary,
.manager-secondary > summary,
.manager-tasks > summary { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.manager-products-group > summary::-webkit-details-marker,
.manager-secondary > summary::-webkit-details-marker,
.manager-tasks > summary::-webkit-details-marker { display: none; }
.manager-products-group summary > span { display: grid; grid-template-columns: 7px minmax(0,1fr); min-width: 0; align-items: center; gap: 2px 11px; }
.manager-products-group summary i { grid-row: 1 / 3; }
.manager-products-group summary b { font-size: 13px; }
.manager-products-group summary small { color: #858a90; font-size: 10px; }
.manager-products-group summary em { font-size: 13px; font-style: normal; font-weight: 850; }
.manager-product-list { margin-bottom: 8px; padding-left: 18px; border-left: 2px solid #eef1ef; }
.manager-product-list > div { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #f0f2f1; }
.manager-product-list > div:first-child { border-top: 0; }
.manager-product-list span,
.manager-product-list em { display: grid; gap: 1px; min-width: 0; }
.manager-product-list b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.manager-product-list small { color: #8a9095; font-size: 9px; }
.manager-product-list em { justify-items: end; font-size: 12px; font-style: normal; font-weight: 800; }
.manager-empty-compact { min-height: 52px; display: grid; place-items: center; color: #838a8d; font-size: 12px; }
.manager-secondary,
.manager-tasks { padding: 0 16px; }
.manager-secondary > summary > span,
.manager-tasks > summary > span { display: grid; gap: 2px; }
.manager-secondary > summary b,
.manager-tasks > summary b { font-size: 14px; }
.manager-secondary > summary small,
.manager-tasks > summary small { color: #858a90; font-size: 11px; }
.manager-secondary > summary em,
.manager-tasks > summary em { color: #176b57; font-size: 11px; font-style: normal; font-weight: 800; }
.manager-week-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 0 0 12px; }
.manager-week-grid > div { display: grid; gap: 3px; padding: 12px; border-radius: 13px; background: #f4f7f6; }
.manager-week-grid span { color: #737a7f; font-size: 10px; }
.manager-week-grid b { font-size: 17px; }
.manager-payments { padding: 12px 0; border-top: 1px solid #edf0ef; }
.manager-payments h3 { margin: 0 0 6px; font-size: 13px; }
.manager-payments > div { display: flex; min-height: 34px; align-items: center; justify-content: space-between; border-top: 1px solid #f0f2f1; font-size: 11px; }
.manager-payments > div:first-of-type { border-top: 0; }
.manager-source-note { margin: 0 0 14px; color: #858a90; font-size: 10px; line-height: 1.5; }
.manager-tasks { margin-bottom: 14px; }
.manager-tasks .command-shell { padding: 0 0 12px; }
.manager-unavailable { padding: 18px; border: 1px solid #efd0cd; border-radius: 18px; background: #fff5f4; }
.manager-unavailable h2 { margin: 2px 0; font-size: 18px; }
.manager-unavailable p { margin: 0; color: #7b6968; font-size: 12px; }

@media (max-width: 700px) {
  .manager-live { gap: 9px; }
  .manager-live-head { align-items: center; padding: 0 2px; }
  .manager-live-head h2 { font-size: 19px; }
  .manager-live-head p { font-size: 10px; }
  .manager-eyebrow { font-size: 10px; }
  .manager-source { min-height: 32px; padding: 0 9px; font-size: 10px; }
  .manager-live-actions .btn { min-height: 36px; padding: 0 11px; font-size: 12px; }
  .manager-hero { grid-template-columns: minmax(0,1fr) 92px; gap: 8px; padding: 18px; border-radius: 20px; }
  .manager-hero-main > b { font-size: 37px; }
  .manager-hero-order { padding-left: 10px; }
  .manager-hero-order > b { font-size: 27px; }
  .manager-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); border-radius: 16px; }
  .manager-kpis > div { min-height: 70px; padding: 10px 12px; }
  .manager-kpis > div:nth-child(2) { border-right: 0; }
  .manager-kpis > div:nth-child(n+3) { border-top: 1px solid #eceeed; }
  .manager-kpis b { font-size: 17px; }
  .manager-tips,
  .manager-panel { padding: 12px 13px; border-radius: 16px; }
  .manager-section-title > span { font-size: 15px; }
  .manager-trend-bars { height: 126px; gap: 4px; }
  .manager-hour-bars { height: 100px; }
}

@media (max-width: 380px) {
  .manager-live-head { align-items: flex-start; }
  .manager-live-head p { max-width: 210px; }
  .manager-source { display: none; }
  .manager-hero { grid-template-columns: minmax(0,1fr) 78px; padding: 16px 14px; }
  .manager-hero-main > b { font-size: 33px; }
  .manager-hero-order > b { font-size: 24px; }
  .manager-kpis b { font-size: 16px; }
  .manager-week-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #app *,
  #app *::before,
  #app *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* R39 · 配方科学性与无障碍门禁。
   厨房输入使用克/毫升，服务端仍存标准单位；操作条不再覆盖照片和字段。 */
.recipe-guide li.complete {
  border-color: #b7d7ca;
  color: #176a56;
  background: #f3faf7;
}

.recipe-guide li.complete b {
  color: #067647;
  background: #dcfae6;
}

.recipe-guide li.active {
  outline: 2px solid rgba(8, 123, 98, .12);
  outline-offset: 1px;
}

.recipe-editor-form {
  padding-bottom: 4px;
}

dialog .recipe-editor-foot {
  position: relative;
  bottom: auto;
  z-index: 1;
  margin-top: 24px;
}

.recipe-editor-toolbar,
.recipe-editor-line,
.recipe-photo-quick {
  scroll-margin-top: 112px;
  scroll-margin-bottom: 24px;
}

.recipe-photo-preview {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 10px;
  background: #f5f7f8;
}

.recipe-photo-preview img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  background: #fff;
}

.recipe-qty-input + small {
  margin-top: 7px;
  color: #526071;
}

@media (max-width: 700px) {
  .recipe-guide {
    position: sticky;
    top: 82px;
    z-index: 3;
    margin: 0 -16px 14px;
    padding: 9px 16px;
    border-bottom: 1px solid #e4e7ec;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(14px);
  }

  .recipe-guide li {
    min-height: 42px;
  }

  .recipe-editor-toolbar {
    margin-top: 18px;
  }

  .recipe-editor-foot {
    grid-template-columns: 1fr;
  }

  .recipe-editor-foot > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recipe-photo-actions {
    grid-template-columns: 1fr;
  }
}

/* R41 independent menu-category master. */
.settings-subnav {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.menu-category-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.menu-category-metrics > div {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 16px;
  border: 1px solid #dfe3e8;
  border-radius: 16px;
  background: #fff;
}

.menu-category-metrics span,
.menu-category-copy p,
.menu-category-copy small {
  color: #667085;
}

.menu-category-metrics b {
  color: #171719;
  font-size: 24px;
}

.menu-category-metrics .warning {
  border-color: #f1c26d;
  background: #fffaeb;
}

.menu-category-guidance {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid #b7d7ca;
  border-radius: 15px;
  color: #176a56;
  background: #f3faf7;
}

.menu-category-guidance span {
  min-width: 0;
  color: #475467;
  overflow-wrap: anywhere;
}

.menu-category-list {
  display: grid;
  gap: 10px;
}

.menu-category-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  min-width: 0;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid #dfe3e8;
  border-radius: 17px;
  background: #fff;
}

.menu-category-card.is-disabled {
  background: #f7f8fa;
}

.menu-category-order {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  color: #176a56;
  background: #e5f4ef;
  font-weight: 850;
}

.menu-category-copy,
.menu-category-title {
  min-width: 0;
}

.menu-category-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-category-title h3,
.menu-category-copy p {
  margin: 0;
}

.menu-category-title h3,
.menu-category-copy small {
  overflow-wrap: anywhere;
}

.menu-category-copy {
  display: grid;
  gap: 4px;
}

@media (max-width: 1100px) {
  .settings-subnav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .settings-subnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-subnav button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .menu-category-metrics {
    grid-template-columns: 1fr;
  }

  .menu-category-guidance {
    align-items: flex-start;
    flex-direction: column;
  }

  .menu-category-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 11px;
    padding: 13px;
  }

  .menu-category-order {
    width: 40px;
    height: 40px;
  }

  .menu-category-card > .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 360px) {
  .settings-subnav {
    grid-template-columns: 1fr;
  }

  .settings-subnav button:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* ========================================================================== */
/* R37 · 整菜 BOM、逐料工艺证据、层级位置与配送路线                         */
/* ========================================================================== */

.recipe-principle,
.location-principle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 14px;
  align-items: center;
  margin: 0 0 20px;
  padding: 15px 17px;
  border: 1px solid #b8dfd2;
  border-radius: 16px;
  background: #effaf6;
  color: #175b4c;
}

.recipe-principle b,
.location-principle b {
  font-size: 14px;
  font-weight: 850;
}

.recipe-principle span,
.location-principle span {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.recipe-principle small {
  grid-column: 2;
  color: #48675f;
  font-size: 12px;
  line-height: 1.5;
}

.dish-summary {
  flex: 1 1 auto;
  min-width: 0;
}

.recipe-line.r37 {
  grid-template-columns: minmax(220px, 1.45fr) minmax(90px, .55fr) minmax(90px, .55fr) minmax(130px, .8fr) minmax(160px, 1fr) auto;
  align-items: center;
}

.recipe-line-name {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.recipe-line-name img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
}

.recipe-line-name div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.recipe-line-name small {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

dialog:has(.recipe-editor-form) {
  width: min(1180px, calc(100vw - 32px));
  max-width: min(1180px, calc(100vw - 32px));
  max-height: calc(100dvh - 28px);
}

dialog:has(.recipe-editor-form) .sheet {
  width: 100%;
  max-width: none;
  max-height: calc(100dvh - 28px);
}

.recipe-editor-form {
  display: block;
}

.recipe-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.recipe-guide li {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e1e4e8;
  border-radius: 12px;
  background: #f8fafb;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.recipe-guide li b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #e7eaee;
  color: #344054;
}

.recipe-guide li.active {
  border-color: #9fd3c4;
  background: #effaf6;
  color: #08624f;
}

.recipe-guide li.active b {
  color: #fff;
  background: var(--wb-green);
}

.recipe-editor-basics,
.recipe-line-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.recipe-editor-basics {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  background: #f8fafb;
}

.recipe-template-quick > label span,
.recipe-basic-advanced summary small,
.recipe-line-advanced summary small {
  color: #667085;
  font-size: 12px;
  font-weight: 600;
}

.recipe-template-quick > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.recipe-basic-advanced {
  padding: 12px 14px;
  border: 1px dashed #d0d5dd;
  border-radius: 13px;
  background: #fff;
}

.recipe-basic-advanced > summary,
.recipe-line-advanced > summary {
  cursor: pointer;
  font-weight: 850;
}

.recipe-basic-advanced > .fields {
  margin-top: 13px;
}

.recipe-editor-basics .wide,
.recipe-line-fields .wide {
  grid-column: 1 / -1;
}

.template-action {
  justify-content: flex-end;
}

.template-action .btn {
  width: 100%;
}

.template-missing {
  display: grid;
  gap: 5px;
  margin: 14px 0 0;
  padding: 13px 15px;
  border: 1px solid #f2c275;
  border-radius: 14px;
  background: #fff9ed;
  color: #714d11;
}

.template-missing span { font-weight: 800; }
.template-missing small { color: #805f2a; }

.recipe-editor-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 12px;
}

.recipe-editor-toolbar > div {
  display: grid;
  gap: 3px;
}

.recipe-editor-toolbar b { font-size: 19px; }
.recipe-editor-toolbar span { color: #667085; font-size: 13px; }

.recipe-editor-lines {
  display: grid;
  gap: 13px;
}

.recipe-editor-line {
  overflow: hidden;
  border: 1px solid #dfe3e8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(16, 24, 40, .035);
}

.recipe-editor-line.complete {
  border-color: #9fd3c4;
}

.recipe-editor-line.has-error {
  border-color: #ef8f88;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .08);
}

.recipe-line-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #f8fafb;
}

.recipe-line-heading > div:nth-child(2) {
  display: grid;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}

.recipe-line-heading b { font-size: 16px; }
.recipe-line-heading small { color: #667085; font-size: 12px; }

.recipe-ready-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.recipe-ready-chip {
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.recipe-ready-chip.ready {
  color: #067647;
  background: #dcfae6;
}

.recipe-ready-chip.pending {
  color: #9a6700;
  background: #fef0c7;
}

.recipe-line-index {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  background: #dff2eb;
  color: #176a56;
  font-weight: 900;
}

.recipe-editor-line details {
  border-top: 1px solid #e4e7ec;
}

.recipe-editor-line summary {
  padding: 12px 16px;
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.recipe-line-fields {
  padding: 16px;
  border-top: 1px solid #eef0f3;
}

.recipe-line-quick {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, .7fr);
  gap: 14px;
  padding: 16px;
  border-top: 1px solid #eef0f3;
}

.recipe-line-quick .wide {
  grid-column: 1 / -1;
}

.recipe-qty-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid #cfd4dc;
  border-radius: 12px;
  background: #fff;
}

.recipe-qty-input .input {
  border: 0;
  box-shadow: none;
}

.recipe-qty-input span {
  padding: 0 13px;
  color: #475467;
  font-weight: 800;
}

.recipe-next-hint {
  padding: 12px 14px;
  border: 1px dashed #cfd4dc;
  border-radius: 12px;
  color: #667085;
  background: #f9fafb;
  font-size: 13px;
}

.checkbox-field {
  align-content: center;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #f9fafb;
}

.checkbox-field label,
.location-capabilities label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 750;
}

.checkbox-field input,
.location-capabilities input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.triple-input,
.recipe-dimensions > div,
.split-field > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.recipe-dimensions > div {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.split-field > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.process-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid #cddaf0;
  border-radius: 13px;
  background: #f3f7fd;
}

.process-presets b {
  margin-right: 4px;
  color: #294c79;
  font-size: 13px;
}

.process-presets button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #b5c6df;
  border-radius: 9px;
  background: #fff;
  color: #294c79;
  cursor: pointer;
  font-weight: 750;
}

.process-presets button:hover,
.process-presets button:focus-visible {
  border-color: var(--wb-green);
  color: #08624f;
  background: #effaf6;
}

.recipe-photo-quick {
  padding: 14px;
  border: 1px solid #e0e4e9;
  border-radius: 16px;
  background: #fbfcfd;
}

.recipe-photo-quick.ready {
  border-color: #9fd3c4;
  background: #f5fcf9;
}

.recipe-photo-quick[aria-invalid="true"],
.recipe-photo-quick:focus {
  border-color: #d92d20;
  outline: 3px solid rgba(217, 45, 32, .12);
}

.recipe-photo-title,
.recipe-photo-layout {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.recipe-photo-title > div {
  display: grid;
  gap: 3px;
}

.recipe-photo-title span {
  color: #667085;
  font-size: 12px;
}

.recipe-photo-layout {
  align-items: stretch;
  margin-top: 11px;
}

.recipe-photo-preview {
  display: grid;
  min-height: 132px;
  flex: 1 1 52%;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dce1e7;
  border-radius: 13px;
  background: #fff;
}

.recipe-photo-empty {
  display: grid;
  gap: 5px;
  padding: 18px;
  text-align: center;
}

.recipe-photo-empty span,
.recipe-photo-actions small {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.recipe-photo-actions {
  display: grid;
  flex: 1 1 48%;
  gap: 8px;
  align-content: center;
}

.recipe-photo-actions .btn {
  width: 100%;
  text-align: center;
}

/* Keep the native file control keyboard-accessible without inheriting full-width fields. */
.recipe-photo-actions > input.recipe-photo-input {
  width: 1px;
  min-width: 1px;
  max-width: 1px;
  height: 1px;
  min-height: 1px;
  max-height: 1px;
  padding: 0;
}
.recipe-photo-actions > input.recipe-photo-input:focus-visible ~ label {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.recipe-photo-caption {
  display: grid;
  gap: 6px;
  margin-top: 11px;
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.recipe-photo-preview img,
.location-photo-preview img {
  width: min(280px, 100%);
  max-height: 210px;
  object-fit: cover;
  border-radius: 14px;
}

.recipe-editor-foot {
  grid-template-columns: minmax(130px, .55fr) minmax(0, 1.45fr);
}

.recipe-editor-foot > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.location-form-intro {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid #cddaf0;
  border-radius: 12px;
  background: #f4f7fb;
}

.location-form-intro span {
  color: #475467;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.location-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 13px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 13px;
}

.location-capabilities legend {
  padding: 0 6px;
  color: #344054;
  font-weight: 800;
}

.location-tree,
.route-list {
  display: grid;
  gap: 9px;
}

.location-tree-row {
  display: grid;
  grid-template-columns: 8px minmax(240px, 1.2fr) minmax(260px, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid #e0e4e9;
  border-radius: 15px;
  background: #fff;
}

.location-tree-row.level-1 { margin-left: 22px; }
.location-tree-row.level-2 { margin-left: 44px; }
.location-tree-row.level-3 { margin-left: 66px; }
.location-tree-row.level-4 { margin-left: 88px; }

.location-tree-marker {
  width: 5px;
  height: 40px;
  border-radius: 999px;
  background: #9fd6c5;
}

.location-tree-row.level-2 .location-tree-marker,
.location-tree-row.level-3 .location-tree-marker,
.location-tree-row.level-4 .location-tree-marker { background: #b8c9e3; }

.location-tree-main {
  display: flex;
  gap: 11px;
  align-items: center;
}

.location-tree-main img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: cover;
  border-radius: 12px;
}

.location-tree-main > div,
.route-row > div {
  display: grid;
  gap: 3px;
}

.location-tree-main span,
.location-tree-main small,
.route-row span {
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.location-tree-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.location-tree-facts span {
  padding: 5px 8px;
  border-radius: 8px;
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.route-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e0e4e9;
  border-radius: 14px;
  background: #fff;
}

@media (max-width: 980px) {
  .recipe-line.r37 {
    grid-template-columns: minmax(200px, 1fr) repeat(2, minmax(90px, .55fr));
  }
  .recipe-line.r37 > :nth-child(n+4) { grid-column: span 1; }
  .location-tree-row {
    grid-template-columns: 8px minmax(0, 1fr) auto;
  }
  .location-tree-facts { grid-column: 2 / -1; }
}

@media (max-width: 700px) {
  .recipe-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .recipe-guide li {
    padding: 8px 9px;
  }
  .recipe-principle,
  .location-principle {
    grid-template-columns: 1fr;
  }
  .recipe-principle small { grid-column: auto; }
  .recipe-line.r37 { grid-template-columns: 1fr; }
  .recipe-line.r37 > * { width: 100%; }
  .recipe-editor-basics,
  .recipe-line-fields,
  .recipe-line-quick { grid-template-columns: 1fr; }
  .recipe-editor-basics .wide,
  .recipe-line-fields .wide,
  .recipe-line-quick .wide { grid-column: auto; }
  .recipe-template-quick > div,
  .recipe-photo-layout { grid-template-columns: 1fr; }
  .recipe-photo-layout { display: grid; }
  .recipe-photo-preview { min-height: 168px; }
  .recipe-photo-title { align-items: flex-start; }
  .recipe-editor-toolbar,
  .recipe-line-heading { align-items: stretch; flex-direction: column; }
  .recipe-line-heading .rowbuttons,
  .recipe-editor-toolbar .btn { width: 100%; }
  .recipe-line-heading .rowbuttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .triple-input { grid-template-columns: 1fr; }
  .recipe-dimensions > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-presets { align-items: stretch; flex-direction: column; }
  .process-presets button { width: 100%; }
  .recipe-editor-foot,
  .recipe-editor-foot > div { grid-template-columns: 1fr; }
  .location-form-intro { align-items: flex-start; flex-direction: column; }
  .location-tree-row,
  .route-row { grid-template-columns: 1fr; }
  .location-tree-row.level-1,
  .location-tree-row.level-2,
  .location-tree-row.level-3,
  .location-tree-row.level-4 { margin-left: 0; }
  .location-tree-marker { width: 44px; height: 5px; }
  .location-tree-facts { grid-column: auto; }
  .location-tree-row .rowbuttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .location-tree-row .status-chip { grid-column: 1 / -1; }
}

/* R36 procurement receipt evidence: arrival, independent sign-off and stock
   release are visually separated so a first-time operator cannot confuse them. */
.receiving-identity {
  padding: 14px;
  border: 1px solid #b7d7ca;
  border-radius: 15px;
  background: #f2fbf7;
}
.receiving-identity > div {
  display: grid;
  gap: 4px;
}
.receiving-identity b {
  color: #075e49;
  font-size: 15px;
}
.receiving-identity span {
  color: #52665f;
  font-size: 12px;
  line-height: 1.5;
}
.inspection-media {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.inspection-photo {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--wb-line);
  border-radius: 15px;
  background: #f7f8f8;
}
.inspection-photo b,
.inspection-photo span {
  display: block;
  margin-bottom: 8px;
  color: var(--wb-sub);
  font-size: 12px;
}
.inspection-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 11px;
  background: #fff;
}
.prep-upload-preview small {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 7px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #067647;
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 700px) {
  .inspection-media {
    grid-template-columns: 1fr;
  }
}

/* R35 · Requisition evidence and separation-of-duty clarity. */
.requisition-participants {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.requisition-participants span {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface2);
  color: var(--sub);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.requisition-participants b {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-size: 11px;
}

.audit-trail {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.audit-trail summary {
  width: fit-content;
  min-height: 40px;
  display: flex;
  align-items: center;
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.action-blocked {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #efcaca;
  border-radius: 12px;
  background: #fff5f4;
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
}

.notice.dangertext b,
.notice.dangertext span {
  display: block;
}

.notice.dangertext span { margin-top: 3px; }

@media (max-width: 760px) {
  .requisition-participants {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.readiness-governance {
  margin: 18px 0 22px;
  padding: 22px;
  border: 1px solid #e5b8af;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff9f7, #fff);
  box-shadow: 0 12px 34px rgba(118, 48, 31, .06);
}

.readiness-governance > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.readiness-governance h3 {
  margin: 10px 0 6px;
  font-size: clamp(21px, 2.4vw, 30px);
  line-height: 1.2;
}

.readiness-governance p {
  max-width: 760px;
  margin: 0;
  color: var(--sub);
  line-height: 1.65;
}

.readiness-score {
  flex: 0 0 auto;
  min-width: 126px;
  text-align: right;
}

.readiness-score b {
  display: block;
  color: var(--red);
  font-size: 30px;
  line-height: 1;
}

.readiness-score span {
  display: block;
  margin-top: 7px;
  color: var(--sub);
  font-size: 12px;
}

.readiness-progress {
  height: 8px;
  margin: 18px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #eedfdc;
}

.readiness-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.governance-next {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.governance-next b,
.governance-next span,
.governance-next small { display: block; }
.governance-next b { font-size: 12px; }
.governance-next span { margin-top: 4px; line-height: 1.5; }
.governance-next small { margin-top: 5px; color: var(--sub); }

.governance-more {
  margin-top: 15px;
  border-top: 1px solid #ead8d4;
  padding-top: 10px;
}

.governance-more summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  color: var(--sub);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.governance-more ol { margin: 4px 0 0; padding: 0; list-style: none; }
.governance-more li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(0, 0, 0, .06);
}
.governance-more li span,
.governance-more li b,
.governance-more li small { display: block; }
.governance-more li small { margin-top: 3px; color: var(--sub); }
.governance-more li em { color: var(--sub); font-style: normal; font-variant-numeric: tabular-nums; }
.source-quality dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 0; }
.source-quality dl div { min-width: 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .68); }
.source-quality dt { color: var(--sub); font-size: 12px; }
.source-quality dd { margin: 4px 0 0; color: var(--wb-text); font-size: 13px; font-weight: 760; overflow-wrap: anywhere; }

@media (max-width: 620px) {
  .readiness-governance { padding: 18px; }
  .readiness-governance > header { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .readiness-score { min-width: 72px; }
  .readiness-score span { max-width: 72px; }
  .governance-next { grid-template-columns: 1fr; }
  .governance-next .btn { width: 100%; }
  .source-quality dl { grid-template-columns: 1fr 1fr; }
}

/* R34 governed master data and mobile legibility hardening. */
.loginpage {
  min-height: 100dvh;
  padding: clamp(20px, 6vw, 64px);
  background:
    radial-gradient(circle at 12% 16%, rgba(31, 95, 80, .11), transparent 32%),
    linear-gradient(180deg, #f8faf9, #f3f5f4);
}

.login {
  width: min(680px, 100%);
  padding: clamp(28px, 5vw, 52px);
  border-radius: clamp(24px, 4vw, 36px);
}

.login h2 {
  max-width: 12em;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
}

.login p,
.login .notice,
.config-alert {
  overflow-wrap: anywhere;
}

.task-alert-actions button {
  min-height: 44px;
}

.smart-stock-group,
.smart-group-body,
.smart-stock-list,
.smart-stock-row,
.smart-stock-main,
.master-card,
.master-row,
.settings-section {
  min-width: 0;
  max-width: 100%;
}

.smart-stock-l3 > summary {
  border-left: 3px solid rgba(31, 95, 80, .3);
}

.smart-stock-row :where(.name, .meta),
.master-card :where(b, span, dd),
.master-row :where(b, span, dd) {
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .loginpage {
    display: grid;
    place-items: start stretch;
    padding: max(16px, env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  }

  .login {
    width: 100%;
    margin-top: clamp(18px, 8vh, 72px);
    padding: 28px 22px;
  }

  .login .logo {
    width: 64px;
    height: 64px;
  }

  .login .btn {
    min-height: 52px;
  }

  #app {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .settings-section,
  .smart-stock-groups {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .bottomnav {
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }

  .smart-stock-row {
    overflow: hidden;
  }

  .smart-stock-row .rowbuttons {
    width: 100%;
  }

  .smart-stock-row .rowbuttons .btn {
    min-height: 44px;
  }

  .sectionhead .master-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .sectionhead .master-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    white-space: normal;
  }

  .sectionhead .master-actions .btn:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* R33 restaurant master data + visual prep standard closed loop. */
.prep-plan {
  margin: 0 0 20px;
  overflow: hidden;
  border: 1px solid #b7d7ca;
  border-radius: 20px;
  background: linear-gradient(155deg, #fff 0%, #f0fdf7 100%);
}
.prep-plan > summary {
  min-height: 72px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}
.prep-plan > summary::-webkit-details-marker { display: none; }
.prep-plan > summary span { min-width: 0; display: grid; gap: 4px; }
.prep-plan > summary b { font-size: 18px; }
.prep-plan > summary small { color: #52665f; line-height: 1.45; }
.prep-plan > summary strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #d9f4e8;
  color: #067647;
  font-size: 12px;
}
.prep-plan-body { padding: 0 18px 18px; border-top: 1px solid #d6e9e1; }
.prep-plan-actions { padding: 14px 0 10px; display: flex; align-items: center; gap: 12px; }
.prep-plan-actions span,
.prep-plan-note { color: #52665f; font-size: 12px; line-height: 1.5; }
.prep-plan-list { display: grid; gap: 8px; }
.prep-plan-row {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d5e5de;
  border-radius: 14px;
  background: #fff;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(86px, auto) minmax(86px, auto);
  align-items: center;
  gap: 12px;
}
.prep-plan-row.blocked { background: #f7f8f8; border-color: #e4e7ec; }
.prep-plan-row input { width: 21px; height: 21px; accent-color: #067647; }
.prep-plan-row span { min-width: 0; display: grid; gap: 3px; }
.prep-plan-row small { color: #667085; line-height: 1.45; overflow-wrap: anywhere; }
.prep-plan-row > strong { text-align: right; font-variant-numeric: tabular-nums; }
.prep-plan-row em { color: #067647; font-size: 12px; font-style: normal; text-align: right; }
.prep-plan-row.blocked em { color: #667085; }
.prep-plan-empty { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.prep-plan-empty span { color: #667085; }

.task-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.task-identity > div { min-width: 0; }
.prep-thumb,
.prep-master-thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid #d0d5dd;
  background: #fff;
}
.task-specline { margin-top: 5px; color: #344054; font-size: 12px; line-height: 1.45; }
.prep-master-row { grid-template-columns: auto minmax(180px, 1.2fr) minmax(360px, 2fr) auto; }
.prep-master-row > div:first-of-type { display: grid; gap: 6px; }
.prep-master-row .badge { width: fit-content; }

.prep-upload-preview { margin-top: 9px; }
.prep-upload-preview:empty { display: none; }
.prep-upload-preview img {
  display: block;
  width: min(100%, 360px);
  max-height: 260px;
  object-fit: contain;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  background: #f9fafb;
}
.file-input { padding: 9px 11px; }
.textarea.tall { min-height: 138px; }
.prep-standard-card { display: grid; gap: 16px; }
.prep-standard-card figure { margin: 0; display: grid; gap: 7px; }
.prep-standard-card figure img {
  width: 100%;
  max-height: 420px;
  border-radius: 17px;
  object-fit: contain;
  background: #f2f4f7;
}
.prep-standard-card figcaption { color: #667085; font-size: 12px; line-height: 1.5; }
.prep-standard-card section { padding: 14px; border: 1px solid #e4e7ec; border-radius: 15px; background: #fff; }
.prep-standard-card h3 { margin: 0 0 7px; font-size: 14px; }
.prep-standard-card p { margin: 0; color: #475467; line-height: 1.65; }
.prep-standard-mini { padding: 14px; border: 1px solid #cddbd5; border-radius: 15px; background: #f7fbf9; }
.prep-standard-mini > b { color: #075e49; font-size: 14px; }
.prep-standard-mini > p { margin: 7px 0 12px; color: #344054; line-height: 1.65; }
.prep-standard-mini dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.prep-standard-mini dl div { min-width: 0; padding: 9px; border-radius: 10px; background: #fff; }
.prep-standard-mini dt { color: #667085; font-size: 11px; }
.prep-standard-mini dd { margin: 4px 0 0; color: #101828; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.prep-compare { margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.prep-compare > div { min-width: 0; display: grid; gap: 7px; }
.prep-compare img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border: 1px solid #d0d5dd; border-radius: 14px; background: #f9fafb; }
.prep-no-image { padding: 14px; border: 1px dashed #d0d5dd; border-radius: 12px; color: #667085; font-size: 12px; line-height: 1.5; }

.menu-source-summary {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.menu-source-summary > div { padding: 13px 14px; border: 1px solid #e4e7ec; border-radius: 15px; background: #fff; display: grid; gap: 4px; }
.menu-source-summary b { font-size: 22px; }
.menu-source-summary span { color: #667085; font-size: 12px; }
.menu-source-summary .warn { border-color: #fedf89; background: #fffaeb; }
.dish-tags { margin: 7px 0 4px; display: flex; flex-wrap: wrap; gap: 5px; }
.menu-category-filter { width: auto; min-width: 150px; }

@media (max-width: 900px) {
  .prep-master-row { grid-template-columns: auto minmax(0, 1fr); }
  .prep-master-row dl,
  .prep-master-row .rowbuttons { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .prep-plan > summary { align-items: flex-start; }
  .prep-plan-body { padding: 0 12px 12px; }
  .prep-plan-actions { align-items: stretch; flex-direction: column; }
  .prep-plan-actions .btn { width: 100%; }
  .prep-plan-row { grid-template-columns: auto minmax(0, 1fr); }
  .prep-plan-row > strong,
  .prep-plan-row em { grid-column: 2; text-align: left; }
  .prep-thumb { width: 60px; height: 60px; flex-basis: 60px; }
  .prep-master-row { grid-template-columns: 1fr; }
  .prep-master-thumb { width: 100%; height: auto; max-height: 220px; object-fit: contain; }
  .prep-master-row dl,
  .prep-master-row .rowbuttons { grid-column: auto; }
  .prep-standard-mini dl,
  .prep-compare,
  .menu-source-summary { grid-template-columns: 1fr 1fr; }
  .menu-category-filter { width: 100%; }
}
@media (max-width: 380px) {
  .prep-standard-mini dl,
  .prep-compare,
  .menu-source-summary { grid-template-columns: 1fr; }
}

/* R25 final authority: department rosters are compact by default and remain
   readable at every supported viewport, regardless of earlier legacy rules. */
.role-department-group {
  display: block;
  min-width: 0;
  overflow: clip;
}

.role-department-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  cursor: pointer;
  list-style: none;
}

.role-department-head::-webkit-details-marker {
  display: none;
}

.role-department-group .role-admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  min-width: 0;
}

.role-department-group .role-person,
.role-department-group .role-person-head,
.role-department-group .role-person-title,
.role-department-group .role-scope-summary {
  min-width: 0;
}

.role-department-group .role-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  min-width: 0;
}

.role-department-group .role-checks label {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .role-department-head {
    padding: 13px 14px;
  }

  .role-department-group .role-admin-grid {
    grid-template-columns: 1fr;
    padding: 0 10px 10px;
  }

  .role-department-group .role-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-department-group .cardactions .btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .role-department-group .role-checks {
    grid-template-columns: 1fr;
  }
}

/* R19 personnel directory: department hierarchy, same-name clarity and
   narrow-screen containment.  These final rules intentionally override
   legacy card sizing without changing any business state. */
.role-admin,
.role-directory-groups,
.role-department-group,
.role-admin-grid,
.role-person,
.role-person-head,
.role-person-title,
.role-scope-summary {
  min-width: 0;
  max-width: 100%;
}

.role-department-filters {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  padding: 4px 2px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.role-department-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: min(360px, 78vw);
  padding: 0 14px;
  white-space: nowrap;
}

.role-department-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 14px;
}

.role-person {
  overflow: hidden;
}

.role-person-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.role-person-title,
.role-person-title b,
.role-person-title span,
.role-person-department,
.role-person-identity span,
.role-scope-summary span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.role-person-title {
  display: grid;
  gap: 4px;
}

.role-person-state {
  color: var(--muted, #6e6e73);
  font-size: 13px;
  line-height: 1.45;
}

.role-person-department {
  max-width: min(240px, 42vw);
  text-align: right;
}

.role-person-identity {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  color: var(--muted, #6e6e73);
  font-size: 12px;
  line-height: 1.5;
}

.role-person-identity code {
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f1f3;
  color: #515157;
  font: inherit;
}

.role-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 8px;
}

.role-checks label {
  min-width: 0;
  overflow: hidden;
}

.role-checks label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-search input {
  min-width: 0;
  width: 100%;
}

@media (max-width: 700px) {
  .role-admin-grid {
    grid-template-columns: 1fr;
  }

  .role-department-head,
  .role-person-head,
  .role-scope-summary {
    align-items: start;
  }

  .role-person-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .role-person-department {
    max-width: 100%;
    text-align: left;
  }

  .role-checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .role-person .cardactions,
  .role-person .cardactions .btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .role-checks {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================== */
/* R17 · 多岗位工作台 + 钉钉部门通讯录                                         */
/* 岗位权限不是徽章：每一个已授权岗位都必须是可发现、可切换的工作台入口。       */
/* ========================================================================== */

.role-workspace-control {
  display: grid;
  gap: 7px;
  min-width: min(100%, 620px);
  max-width: 100%;
}

.role-workspace-label {
  color: #667085;
  font-size: 11px;
  font-weight: 740;
  line-height: 1.35;
}

.role-workspace-tabs {
  display: flex;
  gap: 7px;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.role-workspace-trigger {
  display: none;
}

.role-workspace-tabs::-webkit-scrollbar,
.role-department-filters::-webkit-scrollbar {
  display: none;
}

.role-workspace-tab {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  color: #344054;
  font-size: 13px;
  font-weight: 790;
  line-height: 1.15;
  cursor: pointer;
}

.role-workspace-tab:hover {
  border-color: #98a2b3;
  background: #f9fafb;
}

.role-workspace-tab.active {
  border-color: var(--role-accent);
  background: var(--role-accent);
  color: #fff;
  box-shadow: 0 7px 18px rgba(var(--role-accent-rgb), .18);
}

.role-department-filters {
  display: flex;
  gap: 7px;
  margin: 0 0 14px;
  padding: 2px 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.role-department-chip {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.role-department-chip:hover {
  border-color: #98a2b3;
  background: #f9fafb;
}

.role-department-chip.active {
  border-color: #171719;
  background: #171719;
  color: #fff;
}

.role-directory-groups {
  display: grid;
  gap: 22px;
}

.role-department-group {
  display: block;
  min-width: 0;
  overflow: clip;
  border: 1px solid #e3e6eb;
  border-radius: 20px;
  background: #fff;
}

.role-department-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.role-department-head::-webkit-details-marker {
  display: none;
}

.role-department-group .role-admin-grid {
  padding: 0 14px 14px;
}

.role-department-head h3 {
  margin: 0;
  color: #171719;
  font-size: 17px;
  line-height: 1.3;
}

.role-department-head > div > span {
  flex: 0 0 auto;
  color: #667085;
  font-size: 12px;
}

.role-department-toggle {
  flex: 0 0 auto;
  min-width: 52px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-size: 12px;
  font-weight: 760;
  text-align: center;
}

.role-department-toggle .when-open {
  display: none;
}

.role-department-group[open] .role-department-toggle .when-open {
  display: inline;
}

.role-department-group[open] .role-department-toggle .when-closed {
  display: none;
}

.role-person-department {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff8ff;
  color: #175cd3;
  font-size: 11px;
  font-style: normal;
  font-weight: 720;
  line-height: 1.3;
}

@media (max-width: 700px) {
  .identitybar.identity-compact {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .identitybar.identity-compact .identity-main {
    width: 100%;
  }

  .identitybar.identity-compact .role-workspace-control {
    width: 100%;
    min-width: 0;
  }

  .role-workspace-tabs { display: none; }

  .role-workspace-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid color-mix(in srgb, var(--role-accent) 24%, #d0d5dd);
    border-radius: 14px;
    background: var(--role-accent-soft);
    color: var(--role-accent);
    text-align: left;
    cursor: pointer;
  }

  .role-workspace-trigger span { font-size: 13px; font-weight: 820; }
  .role-workspace-trigger b { flex: 0 0 auto; font-size: 12px; }

  .role-workspace-tab {
    min-height: 44px;
  }

  .role-department-filters {
    margin-right: -15px;
    padding-right: 15px;
  }

  .role-admin-grid {
    grid-template-columns: 1fr;
  }

  .role-person {
    padding: 14px;
  }

  .role-checks label {
    min-height: 40px;
    padding: 0 10px;
  }
}

/* Every workspace keeps the same interaction model, but has a stable accent
   so a multi-role operator can recognise context before acting. */
:root[data-role="店长"] {
  --role-accent: #171719;
  --role-accent-soft: #f2f4f7;
  --role-accent-rgb: 23, 23, 25;
}
:root[data-role="仓库"] {
  --role-accent: #175cd3;
  --role-accent-soft: #eff8ff;
  --role-accent-rgb: 23, 92, 211;
}
:root[data-role="厨房"] {
  --role-accent: #b54708;
  --role-accent-soft: #fff7ed;
  --role-accent-rgb: 181, 71, 8;
}
:root[data-role="采购"] {
  --role-accent: #6938ef;
  --role-accent-soft: #f4f3ff;
  --role-accent-rgb: 105, 56, 239;
}
:root[data-role="备菜"] {
  --role-accent: #087a5b;
  --role-accent-soft: #ecfdf3;
  --role-accent-rgb: 8, 122, 91;
}
:root[data-role="财务"] {
  --role-accent: #3538cd;
  --role-accent-soft: #eef4ff;
  --role-accent-rgb: 53, 56, 205;
}

/* Explainable replenishment: urgency is encoded by text, shape and color so
   operators can scan the queue without relying on hue alone. */
.truth-gates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}
.truth-gate {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #d9dce2;
  border-radius: 16px;
  background: #f7f7f8;
  display: grid;
  gap: 4px;
}
.truth-gate span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}
.truth-gate b {
  color: #344054;
  font-size: 14px;
}
.truth-gate.verified,
.truth-gate.zero {
  border-color: #a6f4c5;
  background: #ecfdf3;
}
.truth-gate.verified b,
.truth-gate.zero b { color: #067647; }
.truth-gate.stale,
.truth-gate.missing,
.truth-gate.unknown {
  border-color: #fedf89;
  background: #fffaeb;
}
.truth-gate.stale b,
.truth-gate.missing b,
.truth-gate.unknown b { color: #b54708; }
.truth-gate.error {
  border-color: #fecdca;
  background: #fef3f2;
}
.truth-gate.error b { color: #b42318; }
.decision-gate {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: 17px;
  display: grid;
  gap: 4px;
}
.decision-gate b { font-size: 15px; }
.decision-gate span { color: #475467; line-height: 1.5; }
.decision-gate.ready {
  border-color: #a6f4c5;
  background: #ecfdf3;
}
.decision-gate.ready b { color: #067647; }
.decision-gate.blocked {
  border-color: #fedf89;
  background: #fffaeb;
}
.decision-gate.blocked b { color: #b54708; }
.suggestion-grid { align-items: stretch; }
.suggestion-card {
  position: relative;
  overflow: hidden;
  border-top-width: 4px;
}
.suggestion-card.critical { border-top-color: #b42318; }
.suggestion-card.warning { border-top-color: #b54708; }
.suggestion-card.attention { border-top-color: #175cd3; }
.suggestion-card.stable { border-top-color: #067647; }
.suggestion-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #475467;
  font-size: 12px;
}
.suggestion-status b { color: #101828; font-size: 13px; }
.urgency-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #667085;
  box-shadow: 0 0 0 4px #f2f4f7;
}
.critical .urgency-dot { background: #b42318; box-shadow: 0 0 0 4px #fee4e2; }
.warning .urgency-dot { background: #b54708; box-shadow: 0 0 0 4px #fef0c7; }
.attention .urgency-dot { background: #175cd3; box-shadow: 0 0 0 4px #d1e9ff; }
.stable .urgency-dot { background: #067647; box-shadow: 0 0 0 4px #dcfae6; }
.confidence-chip {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 11px;
  font-weight: 750;
}
.suggestion-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
}
.suggestion-metrics > div {
  min-width: 0;
  padding: 9px 10px;
  border-left: 1px solid #eaecf0;
}
.suggestion-metrics > div:first-child { border-left: 0; }
.suggestion-metrics span {
  display: block;
  color: #667085;
  font-size: 11px;
}
.suggestion-metrics b {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.suggestion-metrics .primary {
  border-radius: 11px;
  background: #eff6ff;
}
.suggestion-metrics .primary b { color: #175cd3; }
.formula-compact {
  padding: 12px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #f9fafb;
  display: grid;
  gap: 5px;
}
.formula-compact b { font-size: 13px; }
.formula-compact span { color: #344054; line-height: 1.45; }
.formula-compact small { color: #667085; line-height: 1.45; }
.suggestion-blocked {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fffaeb;
  color: #93370d;
  font-size: 12px;
  line-height: 1.5;
}
.calculation-sheet { display: grid; gap: 16px; }
.calculation-result {
  padding: 18px;
  border: 1px solid #d9dce2;
  border-radius: 18px;
  background: #f8f9fb;
  display: grid;
  gap: 5px;
}
.calculation-result span,
.calculation-result small { color: #667085; }
.calculation-result b { font-size: 30px; letter-spacing: -.03em; }
.calculation-result.critical { border-color: #fecdca; background: #fef3f2; }
.calculation-result.warning { border-color: #fedf89; background: #fffaeb; }
.calculation-result.attention { border-color: #b2ddff; background: #eff8ff; }
.calculation-result.stable { border-color: #a6f4c5; background: #ecfdf3; }
.calculation-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: calc-step;
  display: grid;
  gap: 9px;
}
.calculation-steps li {
  counter-increment: calc-step;
  padding: 12px 14px 12px 48px;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  position: relative;
  display: grid;
  gap: 4px;
}
.calculation-steps li::before {
  content: counter(calc-step);
  position: absolute;
  left: 13px;
  top: 13px;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #101828;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}
.calculation-steps span { color: #475467; line-height: 1.5; }
.calculation-evidence {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  background: #eaecf0;
}
.calculation-evidence div { padding: 11px 13px; background: #fff; }
.calculation-evidence dt { color: #667085; font-size: 11px; }
.calculation-evidence dd { margin: 4px 0 0; color: #101828; font-weight: 700; }

@media (max-width: 720px) {
  .truth-gates { grid-template-columns: 1fr 1fr; gap: 7px; }
  .truth-gate { padding: 10px 11px; border-radius: 13px; }
  .suggestion-metrics { grid-template-columns: 1fr 1fr; gap: 0; }
  .suggestion-metrics > div { border-left: 0; border-top: 1px solid #eaecf0; }
  .suggestion-metrics > div:nth-child(-n+2) { border-top: 0; }
  .suggestion-metrics > div:nth-child(even) { border-left: 1px solid #eaecf0; }
  .calculation-evidence { grid-template-columns: 1fr; }
  .suggestion-card .cardtop { align-items: flex-start; gap: 9px; }
  .confidence-chip { max-width: 42%; text-align: center; }
}

/* V14 truth states: service availability and business readiness are separate. */
.signal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.signal small {
  color: #667085;
  font-size: 11px;
  font-weight: 650;
}
.signal.business-blocked small {
  color: #a15c00;
}
.signal.degraded > span,
.signal.unknown > span {
  color: #d97706;
}
.pulse.unverified {
  background: #f7f7f8;
  border-color: #d9dce2;
  box-shadow: none;
}
.pulse.unverified b {
  color: #596273;
}
.pulse[data-truth-state="error"] {
  background: #fff4f2;
  border-color: #f6b7af;
}
.pulse[data-truth-state="stale"],
.pulse[data-truth-state="blocked"] {
  background: #fff8eb;
  border-color: #f0cc8c;
}
.truth-empty {
  margin: 12px 0 24px;
  padding: 24px;
  border: 1px solid #d9dce2;
  border-radius: 20px;
  background: #f7f7f8;
  display: grid;
  gap: 8px;
}
.truth-empty b {
  font-size: 18px;
}
.truth-empty p {
  margin: 0;
  color: #667085;
  line-height: 1.55;
}
.truth-state {
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8ebf0;
  color: #475467;
  font-size: 12px;
  font-weight: 760;
}
.truth-empty.error {
  background: #fff4f2;
  border-color: #f6b7af;
}
.truth-empty.error .truth-state {
  background: #fee4e2;
  color: #b42318;
}
.truth-empty.stale,
.truth-empty.blocked {
  background: #fff8eb;
  border-color: #f0cc8c;
}
.truth-empty.stale .truth-state,
.truth-empty.blocked .truth-state {
  background: #fef0c7;
  color: #93370d;
}
.decision-actions {
  align-items: center;
  justify-content: flex-start;
}
.link-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: #175cd3;
  min-height: 44px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.link-action:focus-visible {
  outline: 3px solid rgba(23, 92, 211, .24);
  outline-offset: 2px;
  border-radius: 10px;
}
.role-scope-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  color: #667085;
  font-size: 12px;
}
.role-person.expired {
  border-color: #f6b7af;
  background: #fff8f7;
}
.scope-fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #d9dce2;
  border-radius: 16px;
}
.scope-fieldset legend {
  padding: 0 5px;
  font-weight: 760;
}
.scope-fieldset p {
  margin: 0 0 10px;
  color: #667085;
  font-size: 12px;
}
.scope-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.scope-checks label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid #d9dce2;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}
.selection-summary {
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 12px;
  background: #f2f4f7;
  color: #344054;
  font-weight: 700;
}

/* High-frequency request flow: four essential choices first, exceptions second. */
.form-step {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 7px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #175cd3;
  font-size: 12px;
  font-weight: 780;
}
.req-essential {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  padding: 16px;
  border: 1px solid #e0e3e8;
  border-radius: 20px;
  background: #f8f9fb;
}
.req-essential .wide {
  grid-column: 1 / -1;
}
.req-quantity-row {
  display: grid;
  grid-template-columns: minmax(96px, .55fr) 1fr;
  gap: 9px;
}
.qty-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}
.qty-presets button {
  min-width: 52px;
  min-height: 40px;
  border: 1px solid #d5d9e0;
  border-radius: 11px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}
.qty-presets button:hover {
  border-color: #175cd3;
  color: #175cd3;
}
.auto-rule-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #cce9df;
  border-radius: 16px;
  background: #edf8f4;
  color: #176c58;
}
.auto-rule-note b { white-space: nowrap; }
.auto-rule-note span { color: #3f645b; line-height: 1.5; }
.req-draft-empty {
  min-height: 64px;
  display: grid;
  place-items: center;
  border: 1px dashed #ccd1d9;
  border-radius: 15px;
  background: #fcfcfd;
}
.req-empty-hint {
  color: #667085;
  font-size: 13px;
}
.form-advanced {
  margin-top: 14px;
  border: 1px solid #e0e3e8;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}
.form-advanced summary {
  min-height: 48px;
  padding: 13px 15px;
  cursor: pointer;
  color: #344054;
  font-weight: 760;
}
.form-advanced summary small {
  margin-left: 5px;
  color: #98a2b3;
  font-weight: 650;
}
.form-advanced[open] .fields {
  padding: 0 15px 15px;
}

@media (max-width: 560px) {
  .req-essential {
    grid-template-columns: 1fr;
    padding: 13px;
  }
  .req-essential .wide {
    grid-column: auto;
  }
  .req-quantity-row {
    grid-template-columns: 1fr;
  }
  .req-quantity-row .btn {
    min-height: 50px;
  }
}

:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(23, 105, 194, 0.46);
  outline-offset: 2px;
}

:where(button, [role="button"]) {
  touch-action: manipulation;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: linear-gradient(180deg, #f7f7f9 0, #f3f3f5 42%, #f5f5f7 100%);
}
.top {
  background: rgba(250, 250, 252, 0.88);
  border-bottom-color: rgba(17, 17, 19, 0.06);
}
.topin {
  padding-top: 11px;
}
.brandrow {
  min-height: 48px;
}
.brand p {
  letter-spacing: 0.01em;
}
.signal {
  background: #edf8f4;
  color: #087b62;
  font-weight: 680;
}
.iconbtn {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(17, 17, 19, 0.09);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
}

.identitybar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: 13px 15px;
  border: 1px solid var(--wb-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.035);
}
.identity-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.identity-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--role-accent-soft);
  color: var(--role-accent);
  font-weight: 830;
  font-size: 14px;
}
.identity-copy {
  min-width: 0;
}
.identity-copy b {
  display: block;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.identity-copy span {
  display: block;
  margin-top: 3px;
  color: var(--wb-sub);
  font-size: 11px;
}
.role-switch {
  display: flex;
  gap: 5px;
  overflow: auto;
  scrollbar-width: none;
}
.role-switch::-webkit-scrollbar {
  display: none;
}
.role-switch button {
  border: 0;
  background: transparent;
  color: var(--wb-sub);
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}
.role-switch button.active {
  background: var(--role-accent);
  color: #fff;
}

.workbench-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  margin-bottom: 15px;
  padding: 27px;
  border: 1px solid rgba(17, 17, 19, 0.06);
  border-radius: 28px;
  background: linear-gradient(145deg, #ffffff 0%, #fafafa 54%, #f0f6f3 100%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.055);
}
.workbench-hero.role-intro {
  grid-template-columns: 1fr;
  padding: 22px 24px;
}
.workbench-hero:after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -125px;
  top: -155px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(var(--role-accent-rgb), 0.15),
    rgba(var(--role-accent-rgb), 0) 70%
  );
  pointer-events: none;
}
.workbench-copy {
  position: relative;
  z-index: 1;
}
.workbench-kicker {
  font-size: 11px;
  letter-spacing: 0.13em;
  color: var(--role-accent);
  font-weight: 790;
}
.workbench-copy h2 {
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 10px 0 9px;
}
.workbench-copy p {
  max-width: 650px;
  margin: 0;
  color: var(--wb-sub);
  font-size: 14px;
  line-height: 1.65;
}
.hero-action {
  position: relative;
  z-index: 1;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-radius: 20px;
  background: #171719;
  color: #fff;
}
.hero-action small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}
.hero-action strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
  line-height: 1.18;
}
.hero-action .btn {
  border-color: #fff;
  background: #fff;
  color: #111;
}
.hero-action p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.45;
}
.hero-action.critical {
  background: linear-gradient(145deg, #3c1716, #201616);
}

.pulsegrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 24px;
}
.pulse {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--wb-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}
.pulse span {
  display: block;
  font-size: 11px;
  color: var(--wb-sub);
}
.pulse b {
  display: block;
  margin-top: 9px;
  font-size: 24px;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pulse em {
  display: block;
  margin-top: 6px;
  color: #8b8b90;
  font-size: 11px;
  font-style: normal;
}
.pulse.danger b {
  color: var(--wb-red);
}
.pulse.good b {
  color: var(--wb-green);
}

.queue {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 24px;
}
.queueitem {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--wb-line);
  border-radius: 18px;
  background: #fff;
  text-align: left;
  color: var(--wb-ink);
}
.queueitem .qstate {
  align-self: start;
  display: inline-flex;
  justify-content: center;
  min-height: 28px;
  padding: 6px 8px;
  border-radius: 9px;
  background: #eef1f5;
  color: #4f5967;
  font-size: 11px;
  font-weight: 760;
}
.queueitem.critical {
  border-color: rgba(189, 47, 43, 0.22);
  box-shadow: inset 4px 0 var(--wb-red);
}
.queueitem.critical .qstate {
  background: #fce9e8;
  color: #a52522;
}
.queueitem.warning {
  box-shadow: inset 4px 0 #c48519;
}
.queueitem.warning .qstate {
  background: #fff1d7;
  color: #80520b;
}
.queuecopy {
  min-width: 0;
}
.queuecopy b {
  display: block;
  font-size: 16px;
  line-height: 1.3;
}
.queuecopy span {
  display: block;
  color: var(--wb-sub);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 4px;
}
.queuego {
  font-size: 12px;
  font-weight: 760;
  color: var(--wb-blue);
  white-space: nowrap;
}

.taskfilters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 13px;
  padding: 5px;
  border: 1px solid var(--wb-line);
  border-radius: 16px;
  background: #ececef;
}
.taskfilters button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #626268;
  font-size: 13px;
  font-weight: 720;
}
.taskfilters button b {
  min-width: 22px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(17, 17, 19, 0.07);
  font-size: 11px;
}
.taskfilters button.active {
  background: #fff;
  color: #111;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
}
.taskfilters button.active b {
  background: #171719;
  color: #fff;
}
.command-task {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--wb-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.025);
}
.command-task.critical {
  border-color: rgba(180, 35, 24, 0.32);
}
.command-task.warning {
  border-color: rgba(181, 71, 8, 0.28);
}
.command-task.awaiting {
  border-color: rgba(23, 92, 211, 0.25);
}
.command-task.active {
  border-color: rgba(105, 56, 239, 0.24);
}
.command-task.complete {
  border-color: rgba(6, 118, 71, 0.24);
}
.command-task.alert-critical {
  border-color: #d92d20;
  box-shadow: inset 5px 0 #d92d20, 0 0 0 0 rgba(217, 45, 32, 0.28);
  animation: none; /* Stable during polling; severity remains visible in border and text. */
}
.command-task.alert-warning {
  border-color: #dc6803;
  box-shadow: inset 5px 0 #dc6803, 0 0 0 0 rgba(220, 104, 3, 0.2);
  animation: none; /* Stable during polling; severity remains visible in border and text. */
}
.command-task.alert-unclaimed {
  border-color: #175cd3;
  box-shadow: inset 5px 0 #175cd3;
}
@keyframes task-alert-critical {
  0%, 100% { box-shadow: inset 5px 0 #d92d20, 0 0 0 0 rgba(217, 45, 32, 0); }
  50% { box-shadow: inset 5px 0 #d92d20, 0 0 0 7px rgba(217, 45, 32, 0.14); }
}
@keyframes task-alert-warning {
  0%, 100% { box-shadow: inset 5px 0 #dc6803, 0 0 0 0 rgba(220, 104, 3, 0); }
  50% { box-shadow: inset 5px 0 #dc6803, 0 0 0 5px rgba(220, 104, 3, 0.1); }
}
.task-state {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 15px;
  background: var(--status-neutral-bg);
  color: var(--status-neutral);
}
.command-task.critical .task-state {
  background: var(--status-critical-bg);
  color: var(--status-critical);
}
.command-task.warning .task-state {
  background: var(--status-warning-bg);
  color: var(--status-warning);
}
.command-task.awaiting .task-state {
  background: var(--status-awaiting-bg);
  color: var(--status-awaiting);
}
.command-task.active .task-state {
  background: var(--status-active-bg);
  color: var(--status-active);
}
.command-task.complete .task-state {
  background: var(--status-complete-bg);
  color: var(--status-complete);
}
.task-state span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}
.task-state span i {
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}
.task-state b {
  font-size: 11px;
  line-height: 1.35;
}
.task-main {
  min-width: 0;
  padding: 17px 18px;
}
.task-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.task-title small {
  display: block;
  color: var(--wb-green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
}
.task-title h3 {
  margin: 4px 0 2px;
  font-size: 18px;
  line-height: 1.25;
}
.task-title p {
  margin: 0;
  color: var(--wb-sub);
  font-size: 11px;
}
.task-owner {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  background: #f2f2f4;
  color: #6e6e73;
  font-size: 11px;
  font-weight: 730;
}
.task-owner.mine {
  background: var(--status-complete-bg);
  color: var(--status-complete);
}
.task-owner-stack {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.task-alert-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.task-alert-badge.critical { background: #fee4e2; color: #b42318; }
.task-alert-badge.warning { background: #fef0c7; color: #93370d; }
.task-alert-badge.unclaimed { background: #eaf2ff; color: #175cd3; }
.task-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) minmax(100px, 0.6fr);
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: #f7f7f8;
}
.task-route span {
  min-width: 0;
}
.task-route small {
  display: block;
  color: var(--wb-sub);
  font-size: 10px;
}
.task-route b {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-route i {
  text-align: center;
  color: #a0a0a5;
  font-style: normal;
}
.task-detail {
  margin: 11px 0 0;
  color: var(--wb-sub);
  font-size: 12px;
  line-height: 1.5;
}
.task-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 13px;
}
.task-primary {
  min-width: 136px;
}
.task-detail-sheet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.task-detail-sheet div {
  padding: 13px;
  border-radius: 13px;
  background: #f5f5f7;
}
.task-detail-sheet span {
  display: block;
  color: var(--wb-sub);
  font-size: 11px;
}
.task-detail-sheet b {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.45;
}
.task-detail-sheet div:last-child {
  grid-column: 1/-1;
}
.tasklist-priority {
  margin-bottom: 22px;
}
.access-page {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
  padding: 24px;
}
.access-card {
  width: min(520px, 100%);
  padding: 34px;
  border: 1px solid var(--wb-line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 17, 19, 0.08);
  text-align: center;
}
.access-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #171719;
  color: #fff;
  font-weight: 830;
  letter-spacing: 0.12em;
}
.status-chip {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
}
.status-chip.awaiting {
  background: var(--status-awaiting-bg);
  color: var(--status-awaiting);
}
.access-card h2 {
  margin: 14px 0 8px;
  font-size: 28px;
}
.access-card > p {
  margin: 0;
  color: var(--wb-sub);
  line-height: 1.65;
}
.access-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 22px 0;
  text-align: left;
}
.access-card dl div {
  padding: 12px;
  border-radius: 14px;
  background: var(--status-neutral-bg);
}
.access-card dt {
  font-size: 11px;
  color: var(--wb-sub);
}
.access-card dd {
  margin: 5px 0 0;
  font-weight: 730;
}
.access-card > .btn {
  width: 100%;
}
.access-card > small {
  display: block;
  margin-top: 14px;
  color: var(--wb-sub);
  line-height: 1.5;
}
.stationgrid-active {
  margin-bottom: 10px;
}
.station-active {
  border-left: 5px solid var(--status-active);
}
.station-idle-summary {
  width: 100%;
  margin: 0 0 22px;
  padding: 15px 17px;
  border: 1px solid var(--wb-line);
  border-radius: 17px;
  background: #fff;
  color: var(--wb-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}
.station-idle-summary span {
  min-width: 0;
}
.station-idle-summary b,
.station-idle-summary small {
  display: block;
}
.station-idle-summary small {
  margin-top: 4px;
  color: var(--wb-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.station-idle-summary em {
  color: var(--status-awaiting);
  font-style: normal;
  font-weight: 760;
  white-space: nowrap;
}
.purchase-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 13px 0;
}
.purchase-steps span {
  padding: 8px;
  border-radius: 9px;
  background: #f2f2f4;
  color: #8b8b90;
  text-align: center;
  font-size: 11px;
  font-weight: 720;
}
.purchase-steps span.active {
  background: #fff0d7;
  color: #80520b;
}
.purchase-steps span.done {
  background: var(--wb-green-soft);
  color: var(--wb-green);
}

.decisioncard {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(230px, 0.8fr);
  gap: 16px;
  margin-bottom: 24px;
  padding: 19px;
  border: 1px solid var(--wb-line);
  border-radius: 22px;
  background: #fff;
}
.decisioncard h3 {
  font-size: 19px;
  margin: 0 0 7px;
}
.decisioncard p {
  color: var(--wb-sub);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
.decision-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.decision-metrics div {
  padding: 12px;
  border-radius: 14px;
  background: #f6f6f8;
}
.decision-metrics span {
  font-size: 11px;
  color: var(--wb-sub);
}
.decision-metrics b {
  display: block;
  margin-top: 6px;
  font-size: 19px;
}
.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 24px;
}
.weekday-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 10px;
  color: var(--wb-sub);
  font-size: 12px;
}
.weekday-summary b {
  color: var(--wb-ink);
  font-size: 13px;
}
.weekday-factor {
  padding: 13px 8px;
  border: 1px solid var(--wb-line);
  border-radius: 15px;
  background: #fff;
  text-align: center;
}
.weekday-factor span {
  display: block;
  color: var(--wb-sub);
  font-size: 11px;
}
.weekday-factor b {
  display: block;
  margin-top: 5px;
  font-size: 16px;
}
.weekday-factor.adjusted {
  border-color: #add4c4;
  background: var(--wb-green-soft);
  color: var(--wb-green);
}

.saleslist {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--wb-line);
  border-radius: 22px;
  padding: 0 17px;
  margin-bottom: 24px;
}
.salesrow {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto minmax(170px, 0.7fr);
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--wb-line);
}
.salesrow:last-child {
  border-bottom: 0;
}
.salesrank {
  font-size: 18px;
  font-weight: 800;
}
.salesname b {
  display: block;
  font-size: 15px;
}
.salesname span,
.salesmetric span {
  display: block;
  color: var(--wb-sub);
  font-size: 11px;
  margin-top: 3px;
}
.salesmetric {
  text-align: right;
}
.salesmetric b {
  font-size: 15px;
}
.forecast-note {
  color: var(--wb-sub);
  font-size: 11px;
  line-height: 1.4;
}

.role-admin {
  margin-top: 0;
}
.directory-sync-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid #b9d5f7;
  border-radius: 16px;
  background: #eef6ff;
  color: #174f8b;
  overflow-wrap: anywhere;
}
.directory-sync-status b { font-size: 13px; }
.directory-sync-status span { min-width: 0; line-height: 1.5; }
.directory-sync-status small {
  grid-column: 1 / -1;
  color: #49647e;
  line-height: 1.5;
}
.directory-sync-status.loading { border-color: #8eb8f2; background: #edf5ff; }
.directory-sync-status.ok { border-color: var(--status-complete); background: var(--status-complete-bg); color: var(--status-complete); }
.directory-sync-status.warn { border-color: var(--status-warning); background: var(--status-warning-bg); color: #6b4a0a; }
.directory-sync-status.bad { border-color: var(--status-critical); background: var(--status-critical-bg); color: var(--status-critical); }
.permission-lock-panel {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--status-warning);
  border-radius: 18px;
  background: var(--status-warning-bg);
}
.permission-lock-mark {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  min-height: 42px;
  border-radius: 13px;
  background: var(--status-warning);
  color: #fff;
  font-size: 13px;
  font-weight: 820;
}
.permission-lock-panel h3 {
  margin: 1px 0 5px;
  font-size: 17px;
}
.permission-lock-panel p {
  margin: 0;
  color: #6b4a0a;
  line-height: 1.6;
}
.role-search {
  margin-bottom: 8px;
}
.role-search-summary {
  margin: 0 0 12px;
  color: var(--wb-sub);
  font-size: 12px;
}
.role-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.role-person {
  padding: 15px;
  border: 1px solid var(--wb-line);
  border-radius: 18px;
  background: #fff;
}
.role-person-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.role-person-head b {
  font-size: 15px;
}
.role-person-head span {
  font-size: 11px;
  color: var(--wb-sub);
}
.role-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.role-checks label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 10px;
  background: #f4f4f6;
  color: #525258;
  font-size: 12px;
}
.role-checks input {
  width: 17px;
  height: 17px;
  accent-color: var(--wb-green);
}

.config-alert {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #efcac7;
  border-radius: 14px;
  background: #fff7f6;
  color: #9c2824;
  font-size: 13px;
  line-height: 1.55;
}
.identity-status {
  margin: 13px 0 0;
  padding: 12px;
  border-radius: 13px;
  background: #f3f3f5;
  font-size: 12px;
  color: var(--wb-sub);
  line-height: 1.5;
}
.identity-status.ok {
  background: var(--wb-green-soft);
  color: var(--wb-green);
}
.data-readiness {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 16px;
  padding: 18px 20px;
  border: 1px solid var(--wb-line);
  border-radius: 20px;
  background: #fff;
}
.data-readiness small {
  display: block;
  color: #77756f;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.data-readiness h3 {
  margin: 4px 0 2px;
  font-size: 20px;
}
.data-readiness p {
  margin: 0;
  color: #66645f;
  line-height: 1.5;
}
.data-readiness.ready {
  border-color: #b9dacc;
  background: #f4fbf7;
}
.data-readiness.blocked {
  border-color: #e7c3b8;
  background: #fff7f4;
}
.data-readiness.blocked h3 {
  color: #9c382c;
}
.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.maintenance-grid .flow {
  text-align: left;
  min-height: 112px;
}
.maintenance-groups {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.maintenance-group {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--wb-line);
  border-top: 4px solid var(--status-neutral);
  border-radius: 20px;
  background: #fff;
}
.maintenance-group.permission {
  border-top-color: var(--status-awaiting);
  background: linear-gradient(145deg, #fff 0%, #f4f8ff 100%);
}
.maintenance-group.data { border-top-color: var(--status-complete); }
.maintenance-group.operations { border-top-color: var(--status-warning); }
.maintenance-group-kicker {
  color: var(--wb-sub);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.12em;
}
.maintenance-group h3 {
  margin: 7px 0 6px;
  color: var(--wb-ink);
  font-size: 19px;
}
.maintenance-group > p {
  min-height: 3.2em;
  margin: 0 0 12px;
  color: var(--wb-sub);
  font-size: 12px;
  line-height: 1.6;
}
.maintenance-group-status {
  margin: 0 0 14px;
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--status-awaiting-bg);
  color: var(--status-awaiting);
  font-size: 12px;
  font-weight: 760;
}
.maintenance-group .btn { width: 100%; }
.maintenance-links {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.maintenance-links button,
.maintenance-link-readonly {
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--wb-line);
  border-radius: 13px;
  background: #f8f8f9;
  color: var(--wb-ink);
  text-align: left;
}
.maintenance-links button {
  cursor: pointer;
}
.maintenance-links button:hover {
  border-color: rgba(var(--role-accent-rgb), 0.28);
  background: var(--role-accent-soft);
}
.maintenance-links b,
.maintenance-links span {
  display: block;
  overflow-wrap: anywhere;
}
.maintenance-links b { font-size: 13px; }
.maintenance-links span {
  margin-top: 3px;
  color: var(--wb-sub);
  font-size: 11px;
  line-height: 1.45;
}
.settings-shell {
  margin: 0 0 20px;
  padding: 20px;
  border: 1px solid var(--wb-line);
  border-radius: 24px;
  background: #fff;
}
.settings-heading small {
  display: block;
  color: var(--wb-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.settings-heading h2 {
  margin: 4px 0 5px;
  font-size: 25px;
}
.settings-heading p {
  margin: 0;
  color: var(--wb-sub);
  font-size: 13px;
  line-height: 1.55;
}
.settings-subnav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 18px;
  padding: 5px;
  border-radius: 16px;
  background: #f0efec;
}
.settings-subnav button {
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #66645f;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
  cursor: pointer;
}
.settings-subnav button:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--wb-ink);
}
.settings-subnav button.active {
  background: var(--wb-ink);
  color: #fff;
  box-shadow: 0 6px 16px rgba(17, 17, 19, 0.16);
}
.settings-subnav button:focus-visible {
  outline: 3px solid rgba(26, 115, 232, 0.28);
  outline-offset: 2px;
}
.settings-section > :first-child {
  margin-top: 0;
}

/* R55 go-live truth, compact settings and weekly menu lifecycle. */
.manager-truth-blocked {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 0;
  padding: 15px 16px;
  border: 1px solid #f0c36b;
  border-radius: 16px;
  background: #fffaeb;
  color: #7a2e0e;
}

.manager-truth-blocked > i {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: #dc6803;
}

.manager-truth-blocked span,
.manager-truth-blocked b,
.manager-truth-blocked small {
  display: block;
}

.manager-truth-blocked small {
  margin-top: 4px;
  color: #93370d;
  line-height: 1.5;
}

.settings-shell {
  display: grid;
  grid-template-columns: minmax(150px, .34fr) minmax(0, 1fr);
  align-items: end;
  gap: 16px;
  padding: 15px 16px;
}

.settings-heading h2 {
  margin: 2px 0 3px;
  font-size: clamp(20px, 2vw, 25px);
}

.settings-heading p {
  font-size: 13px;
  line-height: 1.4;
}

.settings-subnav {
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 4px;
  margin-top: 0;
  padding: 4px;
}

.settings-subnav button {
  min-height: 38px;
  padding: 7px 8px;
  font-size: 12px;
}

.settings-select,
.settings-select-label {
  display: none;
}

.menu-lifecycle-row > div > small {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
}

.menu-location-scope {
  padding: 14px;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
}

.menu-location-scope legend {
  padding: 0 5px;
  font-weight: 800;
}

.menu-all-locations {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-weight: 760;
}

.compact-advanced {
  padding: 12px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #f9fafb;
}

.compact-advanced > summary {
  min-height: 32px;
  font-weight: 760;
  cursor: pointer;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.split-field > div > label {
  display: grid;
  gap: 5px;
}

.split-field > div > label > span {
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .settings-shell {
    display: block;
    margin: 8px 12px 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .settings-heading {
    display: none;
  }

  .settings-select-label {
    display: block;
    margin-bottom: 6px;
    color: #475467;
    font-size: 12px;
    font-weight: 760;
  }

  .settings-select {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #fff;
    color: #171719;
    font: inherit;
    font-weight: 760;
  }

  .settings-subnav {
    display: none;
  }

  .advanced-grid {
    grid-template-columns: 1fr;
  }

  .menu-lifecycle-row {
    align-items: flex-start;
  }
}
.decisioncard.blocked {
  border-color: #e7c3b8;
  background: linear-gradient(135deg, #fff 0%, #fff7f4 100%);
}
.system-health {
  margin: 0 0 28px;
  padding: 20px;
  border: 1px solid var(--wb-line);
  border-radius: 22px;
  background: #fff;
}
.health-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.health-head small {
  color: var(--wb-sub);
  font-weight: 720;
  letter-spacing: 0.07em;
}
.health-head h3 {
  margin: 5px 0 4px;
  font-size: 20px;
}
.health-head p {
  margin: 0;
  color: var(--wb-sub);
  font-size: 12px;
}
.health-state {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff2d8;
  color: #80520b;
  font-size: 11px;
  font-weight: 760;
  border: 1px solid rgba(128, 82, 11, 0.18);
}
.health-state::before {
  content: "●";
  margin-right: 6px;
}
.health-state.ok {
  background: var(--wb-green-soft);
  color: var(--wb-green);
  border-color: rgba(8, 123, 98, 0.18);
}
.health-state.degraded {
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border-color: rgba(161, 98, 7, 0.22);
}
.health-state.unknown {
  background: var(--status-neutral-bg);
  color: var(--status-neutral);
  border-color: var(--status-neutral-border);
}
.health-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.health-footnote {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f5f5f7;
  color: var(--wb-sub);
  font-size: 12px;
  line-height: 1.55;
}
.health-metrics div {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: #f6f6f8;
}
.health-metrics span {
  display: block;
  color: var(--wb-sub);
  font-size: 11px;
}
.health-metrics b {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.health-metrics .health-risk { border-color: #efb7b0; background: #fff3f1; }
.health-metrics .health-risk b { color: #b42318; }
.audit-list {
  margin-top: 17px;
  border-top: 1px solid var(--wb-line);
}
.audit-list h4 {
  margin: 15px 0 7px;
  font-size: 13px;
}
.audit-row {
  display: grid;
  grid-template-columns: 80px minmax(100px, 0.8fr) minmax(90px, 0.6fr) minmax(
      0,
      1fr
    );
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid rgba(17, 17, 19, 0.055);
  font-size: 12px;
}
.audit-row:first-of-type {
  border-top: 0;
}
.audit-row span,
.audit-row em,
.audit-row small {
  color: var(--wb-sub);
  font-style: normal;
}
.audit-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* V13 safety workflow: color communicates state, while text, border and icon
   preserve the same meaning without relying on color alone. */
.btn,
.iconbtn,
.close,
.role-switch button,
.taskfilters button {
  min-height: 44px;
}
.purchase-steps-six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.purchase-card.critical,
.batch-v13.critical,
.stockrow-v13.critical {
  border-color: rgba(180, 35, 24, 0.44);
  box-shadow: inset 5px 0 var(--status-critical);
}
.batch-v13.warning,
.location-tile.warning {
  border-color: rgba(181, 71, 8, 0.38);
  box-shadow: inset 5px 0 var(--status-warning);
}
.badge.bad {
  background: var(--status-critical-bg);
  color: var(--status-critical);
}
.badge.info {
  background: var(--status-awaiting-bg);
  color: var(--status-awaiting);
}
.movement-alerts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: -8px 0 24px;
}
.movement-alerts .location-tile {
  min-height: 82px;
  color: var(--wb-ink);
  text-align: left;
}
.movement-alerts .location-tile b {
  font-size: 16px;
}
.inspection-evidence {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid var(--wb-line);
  border-radius: 16px;
  background: #f7f7f9;
}
.inspection-evidence dl,
.approval-summary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.inspection-evidence dl > div,
.approval-summary dl > div {
  min-width: 0;
}
.inspection-evidence dt,
.approval-summary dt {
  color: var(--wb-sub);
  font-size: 12px;
}
.inspection-evidence dd,
.approval-summary dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-weight: 720;
}
.approval-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.approval-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 16px;
  border: 1px solid var(--wb-line);
  border-radius: 18px;
  background: #fff;
}
.approval-card.critical {
  border-color: rgba(180, 35, 24, 0.35);
  box-shadow: inset 5px 0 var(--status-critical);
}
.approval-card p {
  grid-column: 1;
  margin: 0;
  color: var(--wb-sub);
  font-size: 13px;
  line-height: 1.5;
}
.approval-card .btn {
  grid-column: 2;
  grid-row: 1 / span 3;
}
.approval-kind {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--status-warning-bg);
  color: var(--status-warning);
  font-size: 12px;
  font-weight: 760;
}
.stockrow-v13 .label,
.batch-v13 .metric span {
  font-size: 12px;
}
.stockrow-v13 .value {
  overflow-wrap: anywhere;
}
.notice.dangertext {
  border-color: rgba(180, 35, 24, 0.28);
  background: var(--status-critical-bg);
  color: var(--status-critical) !important;
}

@media (max-width: 900px) {
  .workbench-hero,
  .decisioncard {
    grid-template-columns: 1fr;
  }
  .pulsegrid {
    grid-template-columns: 1fr 1fr;
  }
  .role-admin-grid {
    grid-template-columns: 1fr;
  }
  .maintenance-groups {
    grid-template-columns: 1fr;
  }
  .maintenance-group > p {
    min-height: 0;
  }
}
@media (max-width: 560px) {
  .brandrow {
    min-width: 0;
  }
  .brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }
  .brand > div:last-child {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
  }
  .brand h1 {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .headtools {
    flex: 0 0 auto;
    min-width: 0;
  }
  .signal {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    min-width: 10px;
    padding: 0;
    overflow: hidden;
    border-radius: 999px;
  }
  .signal > span,
  .signal small {
    display: none !important;
  }
  .close {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
  }
  .identitybar {
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 12px;
  }
  .identity-main {
    padding-top: 3px;
  }
  .role-switch {
    width: 100%;
    max-width: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }
  .role-switch button {
    min-width: 0;
    padding: 8px 6px;
  }
  .identitybar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .workbench-hero {
    padding: 20px;
    border-radius: 23px;
    gap: 14px;
  }
  .workbench-copy h2 {
    font-size: 26px;
  }
  .hero-action {
    padding: 15px;
    border-radius: 18px;
    gap: 13px;
  }
  .hero-action strong {
    font-size: 19px;
  }
  .pulsegrid {
    gap: 7px;
    margin-bottom: 20px;
  }
  .pulse {
    padding: 13px 11px;
    border-radius: 16px;
  }
  .pulse b {
    font-size: 20px;
  }
  .pulse em {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .queueitem {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    padding: 13px;
  }
  .queuego {
    grid-column: 2;
  }
  .queuecopy b {
    font-size: 15px;
  }
  .taskfilters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  .taskfilters button {
    min-width: 0;
    padding: 0 8px;
  }
  .command-task {
    grid-template-columns: 1fr;
    border-radius: 19px;
  }
  .task-state {
    flex-direction: row;
    padding: 10px 13px;
  }
  .task-main {
    padding: 14px;
  }
  .task-title {
    gap: 8px;
  }
  .task-title h3 {
    font-size: 16px;
  }
  .task-owner {
    max-width: 34%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .task-route {
    grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr);
  }
  .task-route span:last-child {
    grid-column: 1/-1;
  }
  .task-actions .btn {
    flex: 1;
    min-width: 0;
  }
  .task-detail-sheet {
    grid-template-columns: 1fr;
  }
  .task-detail-sheet div:last-child {
    grid-column: auto;
  }
  .decisioncard {
    padding: 16px;
    border-radius: 19px;
  }
  .saleslist {
    border-radius: 19px;
    padding: 0 13px;
  }
  .salesrow {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }
  .salesrow .salesmetric:nth-of-type(2),
  .forecast-note {
    display: none;
  }
  .weekday-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }
  .weekday-factor {
    min-width: 0;
  }
  .weekday-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
  .loginpage {
    padding: 14px;
  }
  .login {
    padding: 24px 20px;
    border-radius: 26px;
  }
  .login h2 {
    font-size: 27px;
  }
  .login p {
    font-size: 14px;
  }
  .data-readiness {
    align-items: flex-start;
    flex-direction: column;
  }
  .data-readiness .btn {
    width: 100%;
  }
  .maintenance-grid {
    grid-template-columns: 1fr;
  }
  .settings-shell {
    padding: 16px;
    border-radius: 20px;
  }
  .settings-subnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }
  .settings-subnav button {
    min-width: 0;
    padding: 0 8px;
    white-space: normal;
  }
  .role-admin-grid {
    grid-template-columns: 1fr;
  }
  .purchase-steps-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .movement-alerts,
  .approval-grid,
  .inspection-evidence dl,
  .approval-summary dl {
    grid-template-columns: 1fr;
  }
  .approval-card {
    grid-template-columns: 1fr;
  }
  .approval-card .btn {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
  }
  .health-head {
    flex-direction: column;
  }
  .health-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .audit-row {
    grid-template-columns: 70px minmax(0, 1fr) auto;
  }
  .audit-row small {
    display: none;
  }
}

@media (max-width: 360px) {
  .topin {
    padding-left: 10px;
    padding-right: 10px;
  }
  .brand h1 {
    max-width: 148px;
    font-size: 17px;
  }
  .headtools {
    gap: 5px;
  }
  .iconbtn {
    min-width: 44px;
    padding-inline: 8px;
  }
}

/* Task alert center: persistent visual status is available without permission;
   speech and vibration are opt-in because browsers require a user gesture. */
.alert-control {
  position: relative;
}
.alert-control.has-alert {
  border-color: #8fb7ee;
  background: #eff6ff;
  color: #175cd3;
}
.alert-control.critical {
  border-color: #f6b7af;
  background: #fff1f0;
  color: #b42318;
}
#alertCount {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #175cd3;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
.alert-control.critical #alertCount { background: #d92d20; }
.task-alert-rail {
  position: sticky;
  z-index: 19;
  top: 82px;
  max-width: 1220px;
  margin: 10px auto 0;
  padding: 12px 14px;
  border: 1px solid #b7cef1;
  border-radius: 16px;
  background: #f5f9ff;
  box-shadow: 0 10px 30px rgba(23, 92, 211, .12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.task-alert-rail[hidden] { display: none; }
.task-alert-rail.warning {
  border-color: #f1c26d;
  background: #fffaeb;
  box-shadow: 0 10px 30px rgba(181, 119, 0, .14);
}
.task-alert-rail.critical {
  border-color: #ee9b92;
  background: #fff1f0;
  box-shadow: 0 10px 30px rgba(180, 35, 24, .18);
  animation: none; /* Stable during polling; severity remains visible in border and text. */
}
.task-alert-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.task-alert-copy > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.task-alert-copy b,
.task-alert-copy small {
  overflow-wrap: anywhere;
}
.task-alert-copy small { color: #475467; }
.task-alert-symbol {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 10px;
  background: #175cd3;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.task-alert-rail.warning .task-alert-symbol { background: #b54708; }
.task-alert-rail.critical .task-alert-symbol { background: #d92d20; }
.task-alert-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-alert-actions button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #c9d8ec;
  border-radius: 11px;
  background: #fff;
  color: #243b5a;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.task-alert-actions button:first-child {
  border-color: #175cd3;
  background: #175cd3;
  color: #fff;
}
.task-alert-rail.critical .task-alert-actions button:first-child {
  border-color: #b42318;
  background: #b42318;
}
.alert-activation {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #b7cef1;
  border-radius: 17px;
  background: linear-gradient(135deg, #f5f9ff, #eef5ff);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.alert-activation > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.alert-activation b { color: #163a6b; }
.alert-activation span { color: #475467; font-size: 13px; line-height: 1.45; }
.alert-settings { display: grid; gap: 12px; }
.alert-settings-summary {
  padding: 14px;
  border: 1px solid #d0d5dd;
  border-radius: 15px;
  background: #f9fafb;
  display: grid;
  gap: 4px;
}
.alert-settings-summary.warning { border-color: #f1c26d; background: #fffaeb; }
.alert-settings-summary.critical { border-color: #ee9b92; background: #fff1f0; color: #8d1912; }
.alert-settings-summary.unclaimed { border-color: #b7cef1; background: #f5f9ff; }
.alert-settings-summary span,
.alert-switch small,
.alert-privacy { color: #667085; font-size: 12px; line-height: 1.5; }
.alert-switch {
  min-height: 64px;
  padding: 10px 13px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.alert-switch > span { display: grid; gap: 2px; }
.alert-switch input { width: 22px; height: 22px; accent-color: #175cd3; }
.alert-setting-actions { display: flex; gap: 9px; }
.alert-setting-actions .btn { flex: 1; }
@keyframes alertRailPulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(180, 35, 24, .12); }
  50% { box-shadow: 0 10px 34px rgba(180, 35, 24, .30); }
}
@media (max-width: 700px) {
  .task-alert-rail {
    top: 72px;
    margin: 8px 12px 0;
    align-items: stretch;
    flex-direction: column;
  }
  .task-alert-actions { width: 100%; }
  .task-alert-actions button { flex: 1; }
  .alert-activation { align-items: stretch; flex-direction: column; }
  .alert-activation .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .task-alert-rail.critical { animation: none !important; }
}

/* Recipe consumption -> outlet distribution decision layer. */
.distribution-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: -2px 0 14px;
}
.distribution-summary > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  background: #fff;
  display: grid;
  gap: 4px;
}
.distribution-summary span { color: #667085; font-size: 12px; }
.distribution-summary b { font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.distribution-list { display: grid; gap: 10px; margin-bottom: 12px; }
.distribution-row {
  min-width: 0;
  padding: 14px;
  border: 1px solid #d8ddd9;
  border-left: 5px solid #2f6e5d;
  border-radius: 17px;
  background: #fff;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(140px, auto);
  align-items: center;
  gap: 13px;
}
.distribution-row.warning { border-left-color: #d97706; background: #fffbeb; }
.distribution-row.critical { border-left-color: #b42318; background: #fff7f6; }
.distribution-row.blocked { border-left-color: #667085; background: #f9fafb; }
.distribution-check input { width: 22px; height: 22px; accent-color: #171715; }
.distribution-check > span {
  width: 24px; height: 24px; border-radius: 50%; background: #667085; color: #fff;
  display: inline-grid; place-items: center; font-weight: 850;
}
.distribution-main { min-width: 0; display: grid; gap: 5px; }
.distribution-main > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.distribution-main b { font-size: 16px; }
.distribution-main span,
.distribution-main small,
.distribution-main em { color: #667085; font-size: 12px; font-style: normal; line-height: 1.45; overflow-wrap: anywhere; }
.distribution-main em { color: #344054; font-weight: 700; }
.distribution-qty { min-width: 0; text-align: right; display: grid; gap: 3px; }
.distribution-qty span,
.distribution-qty small { color: #667085; font-size: 12px; }
.distribution-qty b { font-size: 18px; font-variant-numeric: tabular-nums; }
.distribution-footnote {
  margin: 8px 0 20px;
  padding: 11px 13px;
  border-radius: 13px;
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  line-height: 1.55;
}
.distribution-empty-compact {
  margin: -6px 0 14px;
  padding: 12px 14px;
  border: 1px solid #d0d5dd;
  border-left: 4px solid #667085;
  border-radius: 14px;
  background: #fff;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.distribution-empty-compact b { flex: 0 0 auto; font-size: 14px; color: #344054; }
.distribution-empty-compact span { min-width: 0; color: #667085; font-size: 12px; line-height: 1.45; }
.auto-save-state {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  background: #ecfdf3;
  color: #067647;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
}
.order-confirm-truth { display: grid; gap: 5px; padding: 13px 14px; border: 1px solid #ead38f; border-radius: 14px; background: #fff9e9; color: #5d470f; }
.order-confirm-truth b { font-size: 14px; }
.order-confirm-truth span { font-size: 12px; color: #79662f; }
.supplier-duplicate-hint { display: grid; gap: 7px; margin-top: 9px; padding: 12px; border: 1px solid #e2b977; border-radius: 13px; background: #fff8e8; }
.supplier-duplicate-hint > b { font-size: 13px; color: #68420b; }
.supplier-duplicate-hint > span { font-size: 12px; color: #7a684b; }
.supplier-duplicate-hint > button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 9px 11px; border: 1px solid #ead7b7; border-radius: 11px; background: #fff; color: #2d271e; text-align: left; }
.supplier-duplicate-hint > button strong { font-size: 13px; }
.supplier-duplicate-hint > button small { margin: 0; color: #765b31; text-align: right; }
@media (max-width: 700px) {
  .distribution-empty-compact { align-items: flex-start; flex-direction: column; gap: 3px; }
  .distribution-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .distribution-row { grid-template-columns: auto minmax(0, 1fr); }
  .distribution-qty { grid-column: 2; text-align: left; }
}

/* Confidential recipe vault: explicit classification, timed lock and audit watermark. */
.recipe-lock {
  max-width: 760px;
  margin: clamp(18px, 4vh, 42px) auto;
  padding: 20px 22px;
  border: 1px solid #d0d5dd;
  border-left: 5px solid #7a271a;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .08);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 18px;
}
.recipe-lock-copy { min-width: 0; display: flex; align-items: flex-start; gap: 12px; }
.recipe-lock-copy > div { min-width: 0; display: grid; gap: 3px; }
.recipe-lock h2 { margin: 0; color: #101828; font-size: clamp(18px, 2.2vw, 24px); line-height: 1.25; }
.recipe-lock p,
.recipe-lock small { margin: 0; color: #667085; line-height: 1.5; }
.recipe-lock p { font-size: 14px; }
.recipe-lock small { grid-column: 1 / -1; padding-left: 96px; font-size: 12px; }
.recipe-lock .btn { width: fit-content; min-width: 180px; }
.recipe-classification {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid #f0a39b;
  border-radius: 999px;
  background: #fff1f0;
  color: #912018;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
}
.recipe-vault { position: relative; isolation: isolate; min-height: 60vh; }
.recipe-vault-content { position: relative; z-index: 1; }
.recipe-vault-head {
  position: sticky;
  top: 72px;
  z-index: 7;
  margin: 0 0 14px;
  padding: 10px 13px;
  border: 1px solid #e6b4ae;
  border-radius: 14px;
  background: rgba(255, 241, 240, .96);
  color: #912018;
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
}
.recipe-watermark {
  position: fixed;
  inset: 130px 20px 60px;
  z-index: 6;
  overflow: hidden;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  align-content: space-around;
  gap: 64px 28px;
  opacity: .065;
  transform: rotate(-12deg) scale(1.08);
  transform-origin: center;
}
.recipe-watermark span {
  color: #7a271a;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
  text-align: center;
}
.flow-readonly {
  cursor: default;
  border-style: dashed;
  background: #f9fafb;
}
@media (max-width: 700px) {
  .recipe-lock { margin: 14px 10px; padding: 16px; grid-template-columns: 1fr; gap: 12px; }
  .recipe-lock-copy { gap: 9px; }
  .recipe-lock-copy { flex-direction: column; }
  .recipe-lock small { padding-left: 0; }
  .recipe-lock .btn { width: 100%; }
  .recipe-vault-head { top: 66px; align-items: stretch; flex-direction: column; }
  .recipe-vault-head .btn { width: 100%; }
  .recipe-watermark { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

/* ========================================================================== */
/* R14.1 final cascade guard                                                   */
/* This block intentionally stays last. Legacy component rules above must not */
/* be able to reintroduce low contrast, horizontal overflow or unusable sheets. */
/* ========================================================================== */

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

#app,
#app *,
dialog,
dialog * {
  min-width: 0;
  box-sizing: border-box;
}

#app :where(h1, h2, h3, h4, p, li, dt, dd, label, button, a, span, strong, small),
dialog :where(h1, h2, h3, h4, p, li, dt, dd, label, button, a, span, strong, small) {
  overflow-wrap: anywhere;
}

#app :where(input, select, textarea, button),
dialog :where(input, select, textarea, button) {
  max-width: 100%;
}

.identitybar.settings-identity {
  margin-bottom: 12px;
  border-color: #dfe3e8;
  background: #fff;
  box-shadow: 0 6px 22px rgba(16, 24, 40, .045);
}

.identitybar.identity-compact {
  align-items: center;
}

.identitybar.identity-compact .settings-role-control {
  flex: 0 0 auto;
}

.identitybar.identity-compact .role-current {
  border: 1px solid color-mix(in srgb, var(--role-accent) 22%, #d0d5dd);
  background: var(--role-accent-soft);
  color: var(--role-accent);
}

.settings-section h2[tabindex="-1"]:focus {
  outline: 0;
}

.settings-role-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.settings-role-control .role-current {
  min-height: 40px;
}

.role-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.role-choice {
  min-height: 72px;
  padding: 13px 14px;
  border: 1px solid #dfe3e8;
  border-radius: 16px;
  background: #fff;
  color: #171719;
  text-align: left;
  cursor: pointer;
}

.role-choice span,
.role-choice small {
  display: block;
}

.role-choice span {
  font-size: 16px;
  font-weight: 820;
}

.role-choice small {
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
}

.role-choice.active {
  border-color: #171719;
  background: #171719;
  color: #fff;
  box-shadow: 0 8px 20px rgba(17, 17, 19, .14);
}

.role-choice.active small {
  color: rgba(255, 255, 255, .72);
}

.dialog-intro {
  margin: -4px 0 14px;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

.settings-shell {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #dfe3e8;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(16, 24, 40, .045);
}

.settings-heading h2 {
  margin: 5px 0 6px;
  color: #171719;
  font-size: clamp(23px, 2.4vw, 31px);
  line-height: 1.18;
  letter-spacing: -.025em;
}

.settings-heading p {
  max-width: 760px;
  color: #667085;
}

.settings-subnav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 18px;
  padding: 5px;
  overflow: visible;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  background: #f2f4f7;
}

.settings-subnav button {
  min-width: 0;
  min-height: 46px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #475467;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
  white-space: normal;
  cursor: pointer;
}

.settings-subnav button:hover {
  border-color: #d0d5dd;
  background: #fff;
  color: #171719;
}

.settings-subnav button.active,
.settings-subnav button[aria-current="page"] {
  border-color: #171719;
  background: #171719;
  color: #fff;
  box-shadow: 0 7px 18px rgba(17, 17, 19, .16);
}

.settings-section > :first-child {
  margin-top: 0;
}

.maintenance-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.maintenance-group {
  position: relative;
  min-height: 100%;
  padding: 20px;
  border: 1px solid #dfe3e8;
  border-top: 5px solid #175cd3;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .045);
}

.maintenance-group.permission {
  border-top-color: #6938ef;
  background: linear-gradient(155deg, #fff 0%, #f9f5ff 100%);
}

.maintenance-group.data {
  border-top-color: #067647;
  background: linear-gradient(155deg, #fff 0%, #f0fdf4 100%);
}

.maintenance-group.operations {
  border-top-color: #b54708;
  background: linear-gradient(155deg, #fff 0%, #fffaeb 100%);
}

.maintenance-group > p {
  min-height: 3.1em;
}

.maintenance-group-status {
  border: 1px solid #d6bbfb;
  background: #f4ebff;
  color: #5925dc;
}

.maintenance-links button,
.maintenance-link-readonly {
  border-color: #dfe3e8;
  background: rgba(255, 255, 255, .82);
}

.maintenance-links button:hover {
  border-color: #98a2b3;
  background: #fff;
}

.module-menu-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.module-menu-item {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 68px;
  border-color: #dfe3e8;
}

.module-menu-copy b {
  font-size: 16px;
  line-height: 1.3;
}

.module-menu-copy small {
  color: #667085;
}

dialog {
  max-width: min(720px, calc(100vw - 28px));
  max-height: min(900px, calc(100dvh - 28px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(16, 24, 40, .24);
}

dialog::backdrop {
  background: rgba(16, 24, 40, .52);
  backdrop-filter: blur(5px);
}

dialog .sheet {
  width: min(720px, calc(100vw - 28px));
  --sheet-inset: 22px;
  padding: var(--sheet-inset);
  max-width: 100%;
  max-height: min(900px, calc(100dvh - 28px));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
}

dialog .sheethead {
  position: sticky;
  top: calc(-1 * var(--sheet-inset));
  z-index: 4;
  margin: calc(-1 * var(--sheet-inset)) calc(-1 * var(--sheet-inset)) 14px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #e4e7ec;
  background: #fff;
}

dialog .sheethead h2 {
  margin: 0;
  color: #171719;
  font-size: 24px;
  line-height: 1.2;
}

dialog .sheethead .desc {
  margin-top: 6px;
  color: #667085;
  font-size: 13px;
  line-height: 1.55;
}

dialog .sheet > form,
dialog .sheet > .info-body,
dialog .sheet > .dialog-body {
  padding-left: 0;
  padding-right: 0;
}

dialog .sheetfoot {
  position: sticky;
  bottom: calc(-1 * var(--sheet-inset));
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.5fr);
  gap: 10px;
  margin: 18px calc(-1 * var(--sheet-inset)) calc(-1 * var(--sheet-inset));
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #e4e7ec;
  background: #fff;
}

dialog .sheetfoot .btn,
dialog .sheetfoot button {
  width: 100%;
  min-height: 50px;
}

.fields,
.req-essential {
  max-width: 100%;
}

.field :where(input, select, textarea),
.input,
.select,
.textarea {
  width: 100%;
  max-width: 100%;
}

.task-alert-rail[hidden] {
  display: none !important;
}

.bottomnav {
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid #e4e7ec;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px);
}

.bottomnav button {
  min-width: 0;
  color: #667085;
}

.bottomnav button.active {
  color: #171719;
  background: #f2f4f7;
}

/* R36 · 多人同岗接单与派单。层级顺序：人员状态 → 队列 → 任务 → 动作。 */
.dispatch-presence-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid #b8dfd4;
  border-radius: 20px;
  background: linear-gradient(135deg, #f0fbf7 0%, #f7fcfa 100%);
  box-shadow: 0 8px 28px rgba(24, 121, 91, .07);
}
.dispatch-presence-strip > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.dispatch-presence-strip > div > div { min-width: 0; }
.dispatch-presence-strip small,
.dispatch-presence-strip b,
.dispatch-presence-strip p { display: block; overflow-wrap: anywhere; }
.dispatch-presence-strip small { color: #477568; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.dispatch-presence-strip b { margin-top: 2px; color: #0d513e; font-size: 18px; line-height: 1.3; }
.dispatch-presence-strip p { margin: 3px 0 0; color: #58706a; font-size: 12px; line-height: 1.45; }
.dispatch-presence-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 3px solid #d8f1e9;
  border-radius: 50%;
  background: #0b8b67;
  box-shadow: 0 0 0 4px rgba(11, 139, 103, .1);
}
.dispatch-presence-strip.away { border-color: #f1cf8b; background: #fffbf1; }
.dispatch-presence-strip.away .dispatch-presence-dot { border-color: #fae8b7; background: #b77900; box-shadow: 0 0 0 4px rgba(183, 121, 0, .1); }
.dispatch-presence-strip.away b { color: #704d09; }
.dispatch-presence-strip.stopped { border-color: #e1e4e9; background: #f7f8fa; box-shadow: none; }
.dispatch-presence-strip.stopped .dispatch-presence-dot { border-color: #e5e7eb; background: #667085; box-shadow: none; }
.dispatch-presence-strip.stopped b { color: #344054; }

.task-dispatch-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  color: #667085;
  font-size: 11px;
  line-height: 1.45;
}
.task-dispatch-line > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.dispatch-queue-chip {
  display: inline-flex;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid #c9d8ec;
  border-radius: 999px;
  background: #f5f9ff;
  color: #24496f;
  white-space: nowrap;
}
.dispatch-queue-chip b { max-width: 180px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.dispatch-queue-chip small { color: #5e7691; font-size: 10px; }

.settings-subnav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dispatch-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, .8fr);
  gap: 24px;
  margin-bottom: 22px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid #1a5446;
  border-radius: 26px;
  background: radial-gradient(circle at 100% 0%, rgba(94, 178, 151, .28), transparent 34%), linear-gradient(135deg, #113f34, #1c6755);
  color: #fff;
  box-shadow: 0 18px 48px rgba(17, 63, 52, .18);
}
.dispatch-intro small { color: #a9d6c8; font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.dispatch-intro h2 { margin: 8px 0 7px; color: #fff; font-size: clamp(28px, 3vw, 42px); line-height: 1.12; letter-spacing: -.025em; }
.dispatch-intro p { max-width: 760px; margin: 0; color: #d3e8e1; font-size: 14px; line-height: 1.75; }
.dispatch-intro-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: stretch;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
}
.dispatch-intro-metrics > div { display: grid; place-content: center; min-width: 0; padding: 16px 9px; text-align: center; }
.dispatch-intro-metrics > div + div { border-left: 1px solid rgba(255, 255, 255, .14); }
.dispatch-intro-metrics b { font-size: 26px; line-height: 1.1; }
.dispatch-intro-metrics span { margin-top: 5px; color: #c4ded6; font-size: 11px; }
.dispatch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dispatch-card {
  min-width: 0;
  padding: 19px;
  border: 1px solid #dde3e8;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(24, 35, 31, .045);
}
.dispatch-card.inactive { opacity: .68; background: #f8f9fa; box-shadow: none; }
.dispatch-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dispatch-card-head > div { min-width: 0; }
.dispatch-card-head span { color: #397463; font-size: 10px; font-weight: 820; letter-spacing: .08em; }
.dispatch-card-head h3 { margin: 5px 0 0; font-size: 19px; line-height: 1.28; overflow-wrap: anywhere; }
.dispatch-statuses { display: flex; flex-wrap: wrap; gap: 5px; min-height: 28px; margin: 14px 0; }
.dispatch-statuses span { padding: 5px 8px; border-radius: 999px; background: #edf4f1; color: #365e53; font-size: 10px; font-weight: 720; }
.dispatch-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.dispatch-metrics > div { min-width: 0; padding: 10px; border-radius: 12px; background: #f7f8f8; }
.dispatch-metrics dt { color: #7a8087; font-size: 10px; }
.dispatch-metrics dd { margin: 4px 0 0; color: #242927; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.dispatch-scope { margin: 12px 0; color: #667085; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.dispatch-members { display: grid; min-height: 55px; gap: 3px; margin-bottom: 13px; padding-top: 12px; border-top: 1px solid #edf0f2; }
.dispatch-members b { font-size: 12px; }
.dispatch-members span { color: #667085; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.dispatch-card > .btn { width: 100%; }
.dispatch-fieldset { min-width: 0; margin: 0; padding: 13px; border: 1px solid #d0d5dd; border-radius: 15px; }
.dispatch-fieldset legend { padding: 0 5px; color: #344054; font-size: 13px; font-weight: 800; }
.dispatch-fieldset legend small { color: #667085; font-weight: 500; }
.dispatch-check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-height: 190px; overflow: auto; }
.dispatch-check-grid.scroll { max-height: 150px; }
.dispatch-check { display: flex; min-width: 0; min-height: 42px; align-items: center; gap: 7px; padding: 8px; border-radius: 11px; background: #f5f6f7; color: #344054; font-size: 12px; }
.dispatch-check input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: #126c55; }
.dispatch-check[hidden] { display: none; }
.chef-ingredient-requests { margin: 12px 0; min-width: 0; }
.chef-ingredient-requests > summary { min-height: 44px; display: list-item; cursor: pointer; }
.ingredient-request-detail { min-width: 0; overflow-wrap: anywhere; }
.ingredient-request-detail > img { max-width: 100%; max-height: 220px; object-fit: contain; }
.dispatch-member-search { margin-bottom: 9px; }
.dispatch-member-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 280px; overflow: auto; overscroll-behavior: contain; }
.dispatch-member-option { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 9px; align-items: center; min-width: 0; padding: 10px; border: 1px solid #e4e7ec; border-radius: 12px; background: #fff; }
.dispatch-member-option[hidden] { display: none; }
.dispatch-member-option input { width: 18px; height: 18px; accent-color: #126c55; }
.dispatch-member-option span { min-width: 0; display: grid; gap: 2px; }
.dispatch-member-option b,
.dispatch-member-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dispatch-member-option b { font-size: 12px; }
.dispatch-member-option small { color: #667085; font-size: 10px; }

@media (max-width: 900px) {
  .maintenance-groups {
    grid-template-columns: 1fr;
  }

  .dispatch-intro { grid-template-columns: 1fr; }
  .dispatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .maintenance-group > p {
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .identitybar.identity-compact,
  .identitybar.settings-identity {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
  }

  .settings-role-control {
    justify-content: flex-end;
    padding-top: 0;
    border-top: 0;
  }

  .settings-role-control .btn {
    width: auto;
  }

  .settings-shell {
    padding: 15px;
    border-radius: 19px;
  }

  .settings-subnav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-subnav button:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .maintenance-group {
    padding: 17px;
    border-radius: 18px;
  }

  .role-choice-list {
    grid-template-columns: 1fr;
  }

  dialog[open] {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 22px;
  }

  dialog .sheet {
    width: 100%;
    --sheet-inset: 16px;
    max-height: calc(100dvh - 16px);
  }

  dialog .sheethead {
    padding: 17px 16px 13px;
  }

  dialog .sheethead h2 {
    padding-right: 46px;
    font-size: 22px;
  }

  dialog .sheet > form,
  dialog .sheet > .info-body,
  dialog .sheet > .dialog-body {
    padding-left: 0;
    padding-right: 0;
  }

  dialog .sheetfoot {
    grid-template-columns: 1fr;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .fields,
  .req-essential {
    grid-template-columns: 1fr;
  }

  .field.wide,
  .req-essential .wide {
    grid-column: auto;
  }

  .dispatch-presence-strip { align-items: stretch; padding: 14px; }
  .dispatch-presence-strip > .btn { flex: 0 0 auto; }
  .dispatch-intro { gap: 18px; padding: 20px; border-radius: 21px; }
  .dispatch-intro-metrics { min-width: 0; }
  .dispatch-grid { grid-template-columns: 1fr; }
  .dispatch-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-member-list { grid-template-columns: 1fr; }

  .module-menu-item {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding: 11px 12px;
  }

  .module-menu-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 360px) {
  .settings-subnav {
    grid-template-columns: 1fr;
  }

  .settings-subnav button:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .identitybar.identity-compact .identity-copy span {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dispatch-presence-strip { display: grid; }
  .dispatch-presence-strip > .btn { width: 100%; }
  .dispatch-intro-metrics { grid-template-columns: 1fr; }
  .dispatch-intro-metrics > div + div { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
  .dispatch-check-grid { grid-template-columns: 1fr; }
  .task-dispatch-line { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* R39 final cascade guard: this block must stay last. */
dialog .recipe-editor-foot {
  position: relative;
  bottom: auto;
  z-index: 1;
  margin-top: 24px;
}

.recipe-guide li.complete {
  border-color: #b7d7ca;
  color: #176a56;
  background: #f3faf7;
}

.recipe-guide li.complete b {
  color: #067647;
  background: #dcfae6;
}

.recipe-photo-preview img {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  background: #fff;
}

@media (max-width: 700px) {
  .recipe-editor-foot {
    grid-template-columns: 1fr;
  }

  .recipe-editor-foot > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* R42 closure: terminal work leaves the operating queue automatically while
   remaining one tap away for audit and review. */
.completed-task-archive {
  margin-top: 16px;
  border: 1px solid var(--wb-line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  overflow: hidden;
}
.completed-task-archive > summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 0 17px;
  cursor: pointer;
  color: var(--wb-sub);
  font-weight: 760;
}
.completed-task-archive[open] > summary { border-bottom: 1px solid var(--wb-line); }
.completed-task-archive > .list,
.completed-task-archive > .grid,
.completed-task-archive > .tasklist { padding: 12px; }
.issue-scan-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 15px;
  background: #f1f7f5;
}
.issue-scan-strip small { color: var(--wb-sub); line-height: 1.45; }
.wechat-order-pack { display: grid; gap: 10px; }
.wechat-order-pack > div { display: grid; gap: 3px; }
.wechat-order-pack > div span { color: var(--wb-sub); font-size: 12px; overflow-wrap: anywhere; }
.wechat-order-pack textarea { min-height: 210px; white-space: pre-wrap; }
.purchase-card .meta { overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .purchase-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .issue-scan-strip { align-items: stretch; flex-direction: column; }
  .issue-scan-strip .btn { width: 100%; }
  .completed-task-archive > .list,
  .completed-task-archive > .grid,
  .completed-task-archive > .tasklist { padding: 8px; }
}

/* R43: batch-level traceability, printer bindings and anomaly closure. */
.batch-identity,
.trace-identity,
.scan-result,
.alert-evidence {
  display: grid;
  gap: 5px;
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px solid #cbd8d3;
  border-radius: 14px;
  background: #f5faf8;
  min-width: 0;
}
.batch-identity span,
.trace-identity span,
.scan-result > span,
.alert-evidence > span { color: var(--wb-sub); font-size: 12px; font-weight: 730; }
.batch-identity b,
.trace-identity b,
.scan-result > b,
.alert-evidence > b {
  color: #163e35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.batch-identity small,
.trace-identity small,
.scan-result small,
.alert-evidence small { color: var(--wb-sub); line-height: 1.45; }
.scan-result dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 8px 0 0; }
.scan-result dl div { display: grid; gap: 2px; padding: 9px; border-radius: 10px; background: #fff; min-width: 0; }
.scan-result dt { color: var(--wb-sub); font-size: 11px; }
.scan-result dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.trace-timeline { display: grid; gap: 0; margin-top: 14px; }
.trace-step { display: grid; grid-template-columns: 112px minmax(0,1fr) auto; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--wb-line); }
.trace-step:last-child { border-bottom: 0; }
.trace-step time { color: var(--wb-sub); font-size: 12px; font-weight: 700; }
.trace-step > div { display: grid; gap: 3px; min-width: 0; }
.trace-step b { font-size: 15px; }
.trace-step span,.trace-step small,.trace-step p { color: var(--wb-sub); overflow-wrap: anywhere; }
.trace-step p { margin: 2px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.printer-profile-list { display: grid; gap: 10px; }
.printer-profile { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 15px; border: 1px solid var(--wb-line); border-radius: 15px; background: #fff; }
.printer-profile > div:first-child { display: grid; gap: 4px; min-width: 0; }
.printer-profile h3,.printer-profile p { margin: 0; }
.printer-profile p,.printer-profile small { color: var(--wb-sub); overflow-wrap: anywhere; }
.printer-profile-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.printer-profile-actions > span { color: var(--wb-sub); font-size: 12px; font-weight: 700; }
.printer-checks { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.printer-checks label { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--wb-line); border-radius: 11px; background: #fff; min-width: 0; }
.printer-checks span { overflow-wrap: anywhere; }
.label-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 12px 0; }
.label-summary > div { display: grid; gap: 4px; padding: 13px 15px; border: 1px solid var(--wb-line); border-radius: 13px; background: #fff; }
.label-summary span { color: var(--wb-sub); font-size: 12px; }
.label-summary b { font-size: 22px; }
.label-summary .warning { border-color: #efc46b; background: #fff9eb; }
.rule-group-title { margin-top: 6px; padding: 12px 14px; border-radius: 13px; background: #f3f7f6; }
.rule-group-title b,.rule-group-title small { display: block; }
.rule-group-title small { margin-top: 3px; color: var(--wb-sub); }

@media (max-width: 700px) {
  .trace-step { grid-template-columns: 1fr; gap: 5px; }
  .trace-step .status-chip { justify-self: start; }
  .printer-profile { grid-template-columns: 1fr; }
  .printer-profile-actions { justify-content: flex-start; }
  .printer-profile-actions .btn { flex: 1 1 120px; }
  .printer-checks { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .label-summary { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .scan-result dl { grid-template-columns: 1fr; }
  .label-row { grid-template-columns: 1fr; }
}

/* R45: one-next-action experience operating system. */
.next-action-card {
  --next-accent: #176b57;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 28px;
  align-items: end;
  margin: 14px 0;
  padding: 28px;
  border: 1px solid color-mix(in srgb, var(--next-accent) 22%, #d9d9de);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(20, 24, 32, 0.08), inset 0 1px rgba(255,255,255,.84);
  animation: none; /* Stable during polling; severity remains visible in border and text. */
}
.next-action-card.critical { --next-accent: #b42318; }
.next-action-card.warning { --next-accent: #9a5b08; }
.next-action-card.active { --next-accent: #176b57; }
.next-action-card.calm { --next-accent: #176b57; }
.next-action-route {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 17px 19px;
  border-radius: 17px;
  background: var(--next-accent);
  color: #fff;
}
.next-action-route span { display: grid; gap: 2px; min-width: 0; }
.next-action-route small { color: rgba(255,255,255,.76); font-size: 10px; font-weight: 780; letter-spacing: .08em; }
.next-action-route b { overflow-wrap: anywhere; font-size: clamp(20px,2.7vw,31px); line-height: 1.18; }
.next-action-route p { margin: 0; color: rgba(255,255,255,.86); font-size: 13px; font-weight: 680; text-align: right; }
.next-action-route i { padding: 0 5px; font-style: normal; }
.next-action-copy { min-width: 0; }
.next-action-kicker {
  display: block;
  margin-bottom: 9px;
  color: var(--next-accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: .04em;
}
.next-action-card h2 {
  max-width: 760px;
  margin: 0;
  color: #111114;
  font-size: clamp(25px, 3.2vw, 40px);
  line-height: 1.12;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.next-action-card p {
  max-width: 780px;
  margin: 11px 0 0;
  color: #5f626a;
  font-size: 14px;
  line-height: 1.6;
}
.next-action-card .next-action-route p { max-width: none; margin: 0; color: rgba(255,255,255,.86); font-size: 13px; font-weight: 680; line-height: 1.45; text-align: right; }
.next-action-object {
  display: grid;
  grid-template-columns: 142px minmax(0,1fr);
  gap: 15px;
  align-items: stretch;
  max-width: 720px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(19,23,31,.08);
  border-radius: 17px;
  background: #f6f8f7;
}
.next-action-object.text-only { grid-template-columns: 1fr; }
.next-action-object figure { position: relative; min-height: 112px; margin: 0; overflow: hidden; border-radius: 12px; background: #fff; }
.next-action-object img { width: 100%; height: 100%; min-height: 112px; object-fit: cover; display: block; }
.next-action-object figcaption { position: absolute; left: 7px; bottom: 7px; max-width: calc(100% - 14px); padding: 4px 7px; border-radius: 999px; background: rgba(17,17,20,.74); color: #fff; font-size: 9px; font-weight: 760; }
.next-action-object-copy { display: grid; align-content: center; gap: 5px; min-width: 0; padding: 5px 4px; }
.next-action-object-copy small { color: #757980; font-size: 10px; font-weight: 760; }
.next-action-object-copy strong { color: var(--next-accent); font-size: clamp(24px,3vw,34px); line-height: 1.08; overflow-wrap: anywhere; }
.next-action-object-copy span { color: #42464d; font-size: 12px; line-height: 1.48; overflow-wrap: anywhere; }
.next-action-why { max-width: 780px; margin-top: 12px; border-top: 1px solid #e6e8ea; }
.next-action-why > summary { display: flex; align-items: center; min-height: 43px; color: #555961; font-size: 12px; font-weight: 760; cursor: pointer; list-style: none; }
.next-action-why > summary::-webkit-details-marker { display: none; }
.next-action-why > summary::after { content: "展开"; margin-left: auto; color: #8a8e95; font-size: 10px; }
.next-action-why[open] > summary::after { content: "收起"; }
.next-action-detail-link { min-height: 40px; margin: 5px 0 2px; padding: 7px 11px; border: 1px solid #dfe2e5; border-radius: 10px; background: #fff; color: #4d5158; font-size: 12px; font-weight: 760; }
.next-action-evidence {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(180px, 1fr) minmax(110px, .55fr);
  gap: 9px;
  margin-top: 0;
  padding-bottom: 2px;
}
.next-action-evidence span {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(19,23,31,.075);
  border-radius: 13px;
  background: rgba(255,255,255,.66);
  backdrop-filter: blur(14px) saturate(125%);
  -webkit-backdrop-filter: blur(14px) saturate(125%);
}
.next-action-evidence small,
.next-action-evidence b { display: block; }
.next-action-evidence small { margin-bottom: 4px; color: #7a7d84; font-size: 10px; font-weight: 750; }
.next-action-evidence b { color: #30333a; font-size: 12px; line-height: 1.45; }
.next-action-controls { display: grid; gap: 9px; position: relative; z-index: 1; }
.next-action-controls .btn { width: 100%; min-height: 50px; }
.btn.quiet { border-color: transparent; background: rgba(244,244,247,.84); box-shadow: none; color: #4a4c53; }
.btn.quiet:hover { background: #ececf0; color: #111114; }
.btn,
.taskfilters button,
.next-action-card,
.command-task,
.insight-drawer { transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease, background-color .18s ease, border-color .18s ease; }
.btn:active,
.taskfilters button:active { transform: scale(.975); }

.command-task.compact {
  grid-template-columns: 118px minmax(0,1fr);
  border-radius: 18px;
  box-shadow: 0 5px 18px rgba(20,24,32,.035);
}
.command-task.compact .task-main { padding: 15px 16px; }
.command-task.compact .task-title h3 { font-size: 16px; }
.command-task.compact .task-title p { max-width: 780px; margin-top: 3px; line-height: 1.45; }
.command-task.compact .task-actions { margin-top: 10px; }
.task-thumb { width: 62px; height: 62px; flex: 0 0 62px; border-radius: 12px; object-fit: cover; background: #f3f5f4; }
.command-task.compact .task-title > div:not(.task-owner-stack) { flex: 1 1 auto; min-width: 0; }
.task-disclosure { margin-top: 10px; border-top: 1px solid #ededf0; }
.task-disclosure > summary,
.task-queue-more > summary,
.insight-drawer > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.task-disclosure > summary::-webkit-details-marker,
.task-queue-more > summary::-webkit-details-marker,
.insight-drawer > summary::-webkit-details-marker { display: none; }
.task-disclosure > summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  color: #666970;
  font-size: 12px;
  font-weight: 720;
}
.task-disclosure > summary::after { content: "展开"; margin-left: auto; color: #8b8e95; font-size: 11px; }
.task-disclosure[open] > summary::after { content: "收起"; }
.task-disclosure[open] { animation: r45-detail-in .18s ease both; }
.task-queue-more {
  margin-top: 10px;
  border: 1px solid var(--wb-line);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}
.task-queue-more > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  color: #4d5057;
  font-size: 13px;
  font-weight: 760;
}
.task-queue-more > .tasklist { padding: 0 10px 10px; }

/* R53 scale-safe command surfaces: no unbounded operational lists. */
.list-segments {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid var(--wb-line, #e2e4e7);
  border-radius: 15px;
  background: rgba(245,246,248,.92);
  scrollbar-width: none;
}
.list-segments::-webkit-scrollbar { display: none; }
.list-segments button {
  display: inline-flex;
  flex: 1 0 auto;
  min-width: 112px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #63676f;
  font: inherit;
  font-size: 13px;
  font-weight: 740;
  cursor: pointer;
}
.list-segments button b {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(25,28,33,.07);
  color: inherit;
  font-size: 11px;
}
.list-segments button.active {
  background: #fff;
  color: #176b54;
  box-shadow: 0 2px 9px rgba(20,24,32,.08);
}
.list-segments button.active b { background: #e5f4ed; }
.list-scope-note {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 14px;
  padding: 10px 13px;
  border-radius: 12px;
  background: #f4f7f6;
  color: #62676e;
  font-size: 12px;
  line-height: 1.45;
}
.list-scope-note b { color: #22262b; }
.list-scope-note span { min-width: 0; overflow-wrap: anywhere; text-align: right; }
.list-more {
  display: grid;
  width: 100%;
  min-height: 52px;
  place-items: center;
  gap: 2px;
  margin: 12px 0 22px;
  padding: 8px 14px;
  border: 1px solid #d9dde0;
  border-radius: 14px;
  background: #fff;
  color: #30343a;
  font: inherit;
  cursor: pointer;
}
.list-more b { font-size: 13px; }
.list-more span { color: #84888f; font-size: 11px; }
.suggestion-card.suggestion-compact { padding: 15px; }
.suggestion-compact-main {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
}
.suggestion-compact-copy { min-width: 0; }
.suggestion-compact-copy .name { margin-top: 6px; }
.suggestion-primary-number { min-width: 112px; text-align: right; }
.suggestion-primary-number span,
.suggestion-primary-number small { display: block; color: #7b7f86; font-size: 10px; }
.suggestion-primary-number b { display: block; margin: 2px 0; color: #096d52; font-size: 22px; line-height: 1.1; white-space: nowrap; }
.suggestion-proof { margin-top: 10px; border-top: 1px solid #eceef0; }
.suggestion-proof > summary { display: flex; min-height: 42px; align-items: center; color: #5f646b; font-size: 12px; font-weight: 740; cursor: pointer; }
.suggestion-proof > div { display: grid; gap: 4px; padding: 0 0 10px; color: #555a61; font-size: 12px; line-height: 1.5; }
.suggestion-proof small { color: #858990; }
.suggestion-quiet { color: #898d94; font-size: 12px; }

@media (max-width: 700px) {
  .list-segments { margin-inline: 0; }
  .list-segments button { min-width: 104px; }
  .list-scope-note { align-items: flex-start; flex-direction: column; gap: 3px; }
  .list-scope-note span { text-align: left; }
  .suggestion-card.suggestion-compact { padding: 13px; border-radius: 17px; }
  .suggestion-primary-number { min-width: 96px; }
  .suggestion-primary-number b { font-size: 19px; }
  .suggestion-card.suggestion-compact .cardactions { margin-top: 8px; }
}

.insight-drawer {
  margin: 16px 0 36px;
  border: 1px solid var(--wb-line);
  border-radius: 22px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 8px 28px rgba(20,24,32,.04);
}
.insight-drawer > summary {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px;
}
.insight-drawer > summary span { display: grid; gap: 3px; }
.insight-drawer > summary b { color: #202228; font-size: 16px; }
.insight-drawer > summary small { color: var(--wb-sub); font-size: 12px; }
.insight-drawer > summary em { color: #6d7078; font-size: 12px; font-style: normal; font-weight: 720; }
.insight-drawer > summary em::after { content: " · 展开"; }
.insight-drawer[open] > summary em::after { content: " · 收起"; }
.insight-drawer-body { padding: 0 16px 16px; animation: r45-detail-in .2s ease both; }

@keyframes r45-surface-in { from { opacity: 0; transform: translateY(7px) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes r45-detail-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .next-action-card { grid-template-columns: 1fr; gap: 16px; padding: 14px; border-radius: 22px; }
  .next-action-route { padding: 15px 16px; }
  .next-action-route p { max-width: 48%; }
  .next-action-card h2 { font-size: 27px; }
  .next-action-evidence { grid-template-columns: 1fr 1fr; }
  .next-action-evidence span:first-child { grid-column: 1 / -1; }
  .next-action-controls { grid-template-columns: 1fr 1fr; }
  .command-task.compact { grid-template-columns: 1fr; }
  .command-task.compact .task-state { padding: 9px 12px; }
  .task-disclosure > summary { min-height: 44px; }
  .insight-drawer > summary { min-height: 66px; }
}

@media (max-width: 430px) {
  .identitybar.identity-compact {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
  }
  .identitybar.identity-compact .identity-main { width: auto; min-width: 0; padding: 0; }
  .identitybar.identity-compact .identity-avatar { width: 34px; height: 34px; flex-basis: 34px; border-radius: 10px; font-size: 12px; }
  .identitybar.identity-compact .identity-copy span,
  .identitybar.identity-compact .role-workspace-label { display: none; }
  .identitybar.identity-compact .identity-copy b { font-size: 14px; }
  .identitybar.identity-compact .role-workspace-control { width: auto; min-width: 0; }
  .identitybar.identity-compact .role-workspace-trigger { width: auto; min-width: 146px; min-height: 42px; padding: 8px 10px; gap: 7px; border-radius: 12px; }
  .identitybar.identity-compact .role-workspace-trigger span { max-width: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
  .identitybar.identity-compact .role-workspace-trigger b { font-size: 11px; }
  .workbench-hero.role-intro.compact { display: none; }
  .task-stage-tabs { grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0 0 10px; padding: 3px; gap: 2px; border: 1px solid #e3e5e8; border-radius: 14px; background: #f1f2f4; }
  .task-stage-tabs button { min-height: 43px; padding: 5px 4px; border: 0; border-radius: 11px; background: transparent; box-shadow: none; }
  .task-stage-tabs button.active { background: #fff; color: #176b57; box-shadow: 0 1px 5px rgba(20,24,32,.09); }
  .task-stage-tabs button span { font-size: 11px; }
  .task-stage-tabs button b { font-size: 12px; }
  .next-action-card { padding: 12px; gap: 13px; border-radius: 20px; }
  .next-action-route { align-items: center; flex-direction: row; gap: 9px; padding: 11px 13px; border-radius: 14px; }
  .next-action-route span { gap: 0; }
  .next-action-route small { font-size: 9px; }
  .next-action-route b { font-size: 20px; }
  .next-action-card .next-action-route p { max-width: 44%; text-align: right; font-size: 10px; }
  .next-action-kicker { margin-bottom: 4px; font-size: 10px; }
  .next-action-card h2 { font-size: 22px; }
  .next-action-card > .next-action-copy > p { display: none; }
  .next-action-object { grid-template-columns: 88px minmax(0,1fr); gap: 9px; margin-top: 10px; padding: 8px; border-radius: 13px; }
  .next-action-object figure,
  .next-action-object img { min-height: 88px; }
  .next-action-object-copy strong { font-size: 22px; }
  .next-action-object-copy span { font-size: 11px; }
  .next-action-why { margin-top: 7px; }
  .next-action-why > summary { min-height: 36px; }
  .next-action-evidence { grid-template-columns: 1fr; }
  .next-action-evidence span:first-child { grid-column: auto; }
  .next-action-controls { grid-template-columns: 1fr; }
  .next-action-controls .btn { min-height: 50px; }
  .command-task.compact .task-title { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; }
  .command-task.compact .task-owner-stack { grid-column: 1 / -1; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .task-thumb { width: 58px; height: 58px; }
  .task-owner { max-width: 100%; }
  .task-actions { display: grid; grid-template-columns: minmax(92px,.65fr) minmax(150px,1.35fr); }
  .task-actions .btn { width: 100%; min-height: 46px; }
  .insight-drawer > summary { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .next-action-card,
  .task-disclosure[open],
  .insight-drawer-body { animation: none !important; }
  .btn,
  .taskfilters button,
  .command-task,
  .insight-drawer { transition: none !important; }
}

/* R61: three-minute onboarding and explicit post-action closure. */
.novice-guide { display: grid; gap: 13px; }
.novice-goal { display: grid; gap: 4px; padding: 13px 14px; border-radius: 14px; background: #edf7f3; color: #165e4c; }
.novice-goal span { font-size: 11px; font-weight: 760; }
.novice-goal b { font-size: 16px; line-height: 1.4; }
.novice-guide ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.novice-guide li { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; align-items: start; padding: 10px 11px; border: 1px solid #e3e6e5; border-radius: 13px; }
.novice-guide li > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #171719; color: #fff; font-size: 13px; font-weight: 850; }
.novice-guide li div { display: grid; gap: 3px; min-width: 0; }
.novice-guide li b { font-size: 14px; }
.novice-guide li small { color: #676d72; font-size: 12px; line-height: 1.45; }
.novice-rule,.task-closure-note { padding: 11px 12px; border-left: 4px solid #188368; border-radius: 10px; background: #f3f8f6; color: #4f5d58; font-size: 12px; line-height: 1.5; }
.task-closure-note { margin-top: 12px; }
.novice-control { color: #165e4c; }
@media(max-width:430px){
  .novice-guide { gap: 9px; }
  .novice-guide li { padding: 9px; }
  .novice-guide .sheetfoot { padding-top: 16px; }
}

/* R45 compact execution surface: one glance, one task, one primary action. */
.mobile-role-control { display: none; }

/* R46 command surface: identity, availability and work are one compact hierarchy. */
.work-context-bar {
  display: flex;
  min-height: 54px;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  padding: 5px;
  border: 1px solid #dfe3e2;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 4px 16px rgba(20,24,32,.035);
}
.work-context-bar button { min-width: 0; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: #202329; cursor: pointer; }
.work-context-identity,
.work-context-presence { display: flex; align-items: center; gap: 9px; padding: 5px 9px; text-align: left; }
.work-context-identity { flex: 1 1 auto; }
.work-context-presence { flex: 0 1 auto; justify-content: flex-end; }
.work-context-bar button:hover { background: #f4f6f5; }
.work-context-bar button:focus-visible { outline: 3px solid rgba(19,119,91,.2); outline-offset: 1px; }
.work-context-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: #edf7f3; color: #126b55; font-size: 12px; font-weight: 850; }
.work-context-bar button > span:last-child { display: grid; min-width: 0; gap: 1px; }
.work-context-bar b { overflow: hidden; font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.work-context-bar small { overflow: hidden; color: #747981; font-size: 10px; font-weight: 680; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.work-context-presence i { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #198d6d; box-shadow: 0 0 0 4px rgba(25,141,109,.1); }
.work-context-bar.away .work-context-presence i { background: #b77900; box-shadow: 0 0 0 4px rgba(183,121,0,.1); }
.work-context-bar.stopped .work-context-presence i { background: #737984; box-shadow: 0 0 0 4px rgba(115,121,132,.1); }
.command-shell { margin: 0; }
.command-deck {
  display: grid;
  grid-template-columns: minmax(310px,.78fr) minmax(390px,1.22fr);
  gap: 12px;
  align-items: start;
}
.command-now,
.command-queue { min-width: 0; }
.command-now .next-action-card.execution-card { margin-top: 0; }
.command-queue {
  padding: 0 10px 10px;
  border: 1px solid #e0e3e6;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
}
.command-queue .queue-heading { margin-top: 0; }
.command-queue .tasklist { gap: 7px; }
.command-queue .command-task.compact { border-radius: 14px; box-shadow: none; }
.command-queue .command-task.compact .task-state { min-height: 30px; padding: 5px 9px; }
.command-queue .command-task.compact .task-main { padding: 9px; }
.command-queue .command-task.compact .task-title { grid-template-columns: 46px minmax(0,1fr) auto; gap: 8px; }
.command-queue .command-task.compact .task-title:has(> div:first-child:last-child) { grid-template-columns: minmax(0,1fr) auto; }
.command-queue .task-thumb { width: 46px; height: 46px; border-radius: 9px; }
.command-queue .command-task.compact .task-title h3 { font-size: 14px; line-height: 1.25; }
.command-queue .command-task.compact .task-title p { display: none; }
.command-queue .command-task.compact .task-title small,
.command-queue .command-task.compact .task-owner { font-size: 9px; }
.command-queue .command-task.compact .task-disclosure { display: none; }
.command-queue .command-task.compact .task-actions { grid-template-columns: 72px minmax(0,1fr); gap: 6px; margin: 0; padding: 0 9px 9px; border-top: 0; }
.command-queue .command-task.compact .task-actions .btn { min-height: 40px; font-size: 11px; }
.command-queue .task-queue-more { margin-top: 7px; }
.command-queue .task-queue-more > summary { min-height: 42px; }
.queue-heading {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  margin: 10px 2px 6px;
}
.queue-heading h2 { margin: 0; color: #191b20; font-size: 17px; line-height: 1.2; letter-spacing: -.015em; }
.queue-heading span { color: #777b83; font-size: 12px; font-weight: 720; }
.queue-empty {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid #e2e4e7;
  border-radius: 13px;
  background: rgba(255,255,255,.72);
  color: #555a61;
}
.queue-empty > span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; background: #e9f6f1; color: #176b57; font-size: 11px; font-weight: 850; }
.queue-empty b { font-size: 12px; }
.queue-empty small { margin-left: auto; color: #858991; font-size: 10px; }
.next-action-card.execution-card {
  display: block;
  margin: 10px 0;
  padding: 0;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--next-accent) 26%, #d9dce0);
  border-radius: 18px;
  box-shadow: 0 8px 26px rgba(20,24,32,.065);
}
.execution-status {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 13px;
  background: color-mix(in srgb, var(--next-accent) 10%, #fff);
  border-bottom: 1px solid color-mix(in srgb, var(--next-accent) 18%, #e7e8eb);
  color: var(--next-accent);
}
.execution-status b { font-size: 12px; font-weight: 840; letter-spacing: .02em; }
.execution-status span { font-size: 12px; font-weight: 770; font-variant-numeric: tabular-nums; }
.execution-card.critical .execution-status { background: #fff0ed; }
.execution-card.warning .execution-status { background: #fff8e8; }
.execution-main {
  display: grid;
  grid-template-columns: 94px minmax(0,1fr);
  gap: 13px;
  align-items: center;
  padding: 13px;
}
.execution-main.text-only { grid-template-columns: 1fr; }
.execution-main > img {
  width: 94px;
  height: 94px;
  border-radius: 13px;
  object-fit: cover;
  background: #f2f3f4;
}
.execution-copy { min-width: 0; }
.execution-copy > small { display: block; margin-bottom: 3px; color: #777b82; font-size: 10px; font-weight: 760; }
.next-action-card.execution-card h2 {
  max-width: none;
  margin: 0;
  overflow: hidden;
  color: #15171b;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.execution-route {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  margin: 6px 0 0 !important;
  color: #60646b !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  white-space: nowrap;
}
.execution-route span,
.execution-route b { overflow: hidden; text-overflow: ellipsis; }
.execution-route span { max-width: 42%; font-weight: 650; }
.execution-route b { min-width: 0; color: #3f434a; font-weight: 760; }
.execution-route i { flex: 0 0 auto; color: var(--next-accent); font-style: normal; }
.execution-specs { display: flex; min-width: 0; gap: 5px; margin-top: 8px; overflow: hidden; }
.execution-specs span {
  min-width: 0;
  max-width: 70%;
  padding: 4px 7px;
  overflow: hidden;
  border-radius: 7px;
  background: #f1f3f3;
  color: #3e4248;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.execution-specs span:first-child { flex: 0 0 auto; max-width: 40%; background: color-mix(in srgb, var(--next-accent) 9%, #f5f6f6); color: var(--next-accent); }
.execution-card .next-action-controls {
  display: grid;
  grid-template-columns: 84px minmax(0,1fr);
  gap: 8px;
  padding: 0 13px 13px;
}
.execution-card .next-action-controls .btn { min-height: 46px; border-radius: 12px; }
.execution-empty { padding: 15px 13px 5px; }
.execution-empty h2 { font-size: 18px !important; }
.execution-empty p { margin-top: 4px; font-size: 12px; line-height: 1.45; }
.execution-card.calm .next-action-controls { grid-template-columns: 1fr; }
.task-detail-visual { margin: 0 0 14px; overflow: hidden; border-radius: 15px; background: #f3f4f5; }
.task-detail-visual img { display: block; width: 100%; max-height: 240px; object-fit: cover; }
.task-detail-visual figcaption { padding: 8px 11px; color: #60646b; font-size: 11px; font-weight: 720; }

@media (max-width: 980px) {
  .command-deck { grid-template-columns: 1fr; gap: 8px; }
  .command-queue { padding: 0; border: 0; background: transparent; }
}

@media (max-width: 430px) {
  .top .topin { padding: 8px 10px 7px; }
  .top .brandrow { gap: 7px; }
  .top .brand { gap: 8px; }
  .top .logo { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; letter-spacing: 1px; }
  .top .brand h1 { max-width: 94px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .top .headtools { gap: 5px; }
  .top .iconbtn { min-width: 40px; height: 36px; padding: 0 7px; border-radius: 10px; font-size: 11px; }
  .top .mobile-role-control { display: block; max-width: 48px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top .header-sync-control { display: none; }
  main#app { padding-top: 10px; }
  .identitybar.identity-compact { display: none; }
  .work-context-bar { min-height: 48px; margin-bottom: 8px; padding: 2px; border-radius: 14px; }
  .work-context-bar button { min-height: 42px; }
  .work-context-identity { display: none; }
  .work-context-identity,
  .work-context-presence { gap: 7px; padding: 4px 7px; }
  .work-context-presence { width: 100%; justify-content: flex-start; }
  .work-context-presence span:last-child { width: 100%; grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
  .work-context-presence small { max-width: none; text-align: right; }
  .work-context-avatar { width: 30px; height: 30px; flex-basis: 30px; border-radius: 9px; font-size: 11px; }
  .work-context-bar b { font-size: 11px; }
  .work-context-bar small { max-width: 130px; font-size: 9px; }
  .task-stage-tabs { margin-bottom: 8px; }
  .task-stage-tabs button { min-height: 40px; }
  .next-action-card.execution-card { margin: 8px 0; border-radius: 16px; }
  .execution-status { min-height: 32px; padding: 5px 10px; }
  .execution-status b,
  .execution-status span { font-size: 11px; }
  .execution-main { grid-template-columns: 76px minmax(0,1fr); gap: 10px; padding: 10px; }
  .execution-main > img { width: 76px; height: 76px; border-radius: 10px; }
  .next-action-card.execution-card h2 { font-size: 17px; }
  .execution-copy > small { margin-bottom: 2px; font-size: 9px; }
  .execution-route { margin-top: 4px !important; font-size: 10px !important; }
  .execution-specs { margin-top: 6px; }
  .execution-specs span { padding: 3px 6px; font-size: 9px; }
  .execution-card .next-action-controls { padding: 0 10px 10px; }
  .execution-card .next-action-controls .btn { min-height: 44px; }
  .queue-heading { min-height: 32px; margin: 7px 2px 4px; }
  .queue-heading h2 { font-size: 16px; }
  .command-task.compact { border-radius: 14px; }
  .command-task.compact .task-state { min-height: 30px; padding: 5px 9px; }
  .command-task.compact .task-main { padding: 9px; }
  .command-task.compact .task-title { grid-template-columns: 46px minmax(0,1fr); gap: 8px; }
  .command-task.compact .task-title:has(> div:first-child:last-child) { grid-template-columns: 1fr; }
  .command-task.compact .task-title h3 { font-size: 15px; line-height: 1.25; }
  .command-task.compact .task-title p { display: none; }
  .command-task.compact .task-title small { font-size: 9px; }
  .task-thumb { width: 46px; height: 46px; border-radius: 9px; }
  .command-task.compact .task-owner-stack { align-items: center; }
  .command-task.compact .task-owner { font-size: 9px; }
  .command-task.compact .task-disclosure { display: none; }
  .command-task.compact .task-actions { grid-template-columns: 74px minmax(0,1fr); gap: 6px; margin-top: 0; padding: 0 9px 9px; border-top: 0; }
  .command-task.compact .task-actions .btn { min-height: 42px; font-size: 11px; }
  .dispatch-presence-strip { display: none; }
  .insight-drawer { margin: 12px 0 8px; border-radius: 15px; }
  .insight-drawer > summary { min-height: 48px; padding: 8px 11px; }
  .insight-drawer > summary b { font-size: 13px; }
  .insight-drawer > summary small { display: none; }
}

/* R47 zero-waste command surface: render only information that changes the next decision. */
.command-primary-summary {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.command-primary-summary:focus-visible { outline: 3px solid rgba(19,119,91,.24); outline-offset: -3px; border-radius: 16px; }
.command-primary .execution-main { min-height: 104px; }
.command-primary .execution-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #15171b;
  font-size: 20px;
  font-weight: 820;
  line-height: 1.25;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.command-primary .next-action-controls { grid-template-columns: 1fr; }
.command-deck.single { display: block; max-width: 760px; }
.command-clearline {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 7px 6px 14px;
  border: 1px solid #dfe3e2;
  border-radius: 15px;
  background: rgba(255,255,255,.82);
}
.command-clearline > span { display: grid; min-width: 0; gap: 1px; }
.command-clearline b { color: #25292e; font-size: 13px; line-height: 1.25; }
.command-clearline small { color: #7b8087; font-size: 10px; font-weight: 650; }
.command-clearline button {
  min-width: 68px;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: #171819;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.command-filterbar { grid-template-columns: repeat(auto-fit,minmax(86px,1fr)); }
.command-next-list { display: grid; gap: 1px; }
.command-next-row {
  display: grid;
  grid-template-columns: 8px minmax(0,1fr) auto;
  min-height: 58px;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 6px;
  border: 0;
  border-bottom: 1px solid #e9eaec;
  background: transparent;
  color: #23262b;
  text-align: left;
  cursor: pointer;
}
.command-next-row:last-child { border-bottom: 0; }
.command-next-row:hover { background: rgba(23,107,87,.045); }
.command-next-row:focus-visible { outline: 3px solid rgba(19,119,91,.2); outline-offset: -2px; border-radius: 10px; }
.command-next-row > i { width: 7px; height: 7px; border-radius: 50%; background: #1b8a6c; }
.command-next-row.warning > i { background: #b77900; }
.command-next-row.critical > i { background: #c4362e; }
.command-next-row > span { display: grid; min-width: 0; gap: 2px; }
.command-next-row small { color: #797e86; font-size: 9px; font-weight: 720; }
.command-next-row b { overflow: hidden; font-size: 13px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.command-next-row time { color: #676c73; font-size: 10px; font-weight: 760; font-variant-numeric: tabular-nums; white-space: nowrap; }
.command-next-more { margin-top: 3px; }
.command-next-more > summary { min-height: 40px; padding: 8px 6px; color: #5e646c; font-size: 11px; font-weight: 760; }

@media (max-width: 430px) {
  .top .brand-context { max-width: 174px; }
  .top .brand-context > div:last-child { min-width: 0; }
  .top .brand h1 { max-width: 124px; font-size: 14px; }
  .top .brand p { display: block; max-width: 124px; margin-top: 2px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .top .mobile-role-control { display: none; }
  .top .signal { display: none; }
  .work-context-bar { display: none; }
  main#app { padding-top: 7px; }
  .command-filterbar { margin-bottom: 6px; }
  .command-filterbar button { min-height: 36px; }
  .next-action-card.execution-card { margin: 0; border-radius: 15px; box-shadow: 0 5px 17px rgba(20,24,32,.05); }
  .execution-status { min-height: 29px; padding: 4px 9px; }
  .execution-status b,
  .execution-status span { font-size: 10px; }
  .command-primary .execution-main { min-height: 80px; grid-template-columns: 62px minmax(0,1fr); gap: 8px; padding: 8px 9px; }
  .command-primary .execution-main.text-only { min-height: 66px; grid-template-columns: 1fr; }
  .command-primary .execution-main > img { width: 62px; height: 62px; border-radius: 9px; }
  .command-primary .execution-title { font-size: 16px; }
  .command-primary .execution-copy > small { font-size: 8px; }
  .command-primary .execution-route { margin-top: 3px !important; font-size: 9px !important; }
  .command-primary .execution-specs { margin-top: 4px; }
  .command-primary .execution-specs span { padding: 3px 5px; font-size: 8px; }
  .command-primary .next-action-controls { padding: 0 9px 9px; }
  .command-primary .next-action-controls .btn { min-height: 44px; }
  .command-queue { margin-top: 5px; }
  .queue-heading { min-height: 26px; margin: 4px 2px 1px; }
  .queue-heading h2 { font-size: 12px; }
  .queue-heading span { font-size: 9px; }
  .command-next-row { min-height: 50px; padding: 6px 3px; }
  .command-next-row b { font-size: 12px; }
  .command-clearline { min-height: 52px; border-radius: 14px; }
  .command-clearline small { display: none; }
  .insight-drawer { margin-top: 8px; }
}

/* R48 low-literacy command surface: one screen, one decision, plain language. */
.next-action-card.execution-card { animation: none; }
.prep-tools-disclosure,
.movement-more,
.supplier-stats,
.task-detail-more {
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid #dde2e0;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
}
.prep-tools-disclosure > summary,
.movement-more > summary,
.supplier-stats > summary,
.task-detail-more > summary {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: #24282d;
  cursor: pointer;
}
.prep-tools-disclosure > summary > span,
.movement-more > summary > span,
.supplier-stats > summary > span { display: grid; min-width: 0; gap: 2px; }
.prep-tools-disclosure > summary b,
.movement-more > summary b,
.supplier-stats > summary b { font-size: 15px; }
.prep-tools-disclosure > summary small,
.movement-more > summary small,
.supplier-stats > summary small { color: #687078; font-size: 13px; }
.prep-tools-disclosure > summary em,
.movement-more > summary em,
.supplier-stats > summary em { color: #176b57; font-size: 13px; font-style: normal; font-weight: 780; }
.prep-tools-disclosure[open] > summary em,
.movement-more[open] > summary em,
.supplier-stats[open] > summary em { font-size: 0; }
.prep-tools-disclosure[open] > summary em::after,
.movement-more[open] > summary em::after,
.supplier-stats[open] > summary em::after { content: "收起"; font-size: 13px; }
.prep-tools-body { padding: 0 14px 14px; }
.prep-tools-actions,
.movement-more-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.prep-tools-actions .btn,
.movement-more-actions .btn { min-height: 44px; }
.prep-active-list { margin-bottom: 8px; }

.movement-primary-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.movement-primary {
  display: grid;
  grid-template-columns: 46px minmax(0,1fr);
  grid-template-rows: auto auto;
  min-height: 92px;
  align-items: center;
  column-gap: 12px;
  padding: 14px 16px;
  border: 1px solid #cdded8;
  border-radius: 18px;
  background: #fff;
  color: #1d2724;
  text-align: left;
  box-shadow: 0 6px 20px rgba(20,55,44,.05);
}
.movement-primary > span { grid-row: 1 / 3; display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: #eaf6f1; color: #137058; font-size: 24px; font-weight: 850; }
.movement-primary b { align-self: end; font-size: 20px; line-height: 1.2; }
.movement-primary small { align-self: start; margin-top: 3px; color: #66716d; font-size: 13px; line-height: 1.35; }
.movement-primary.issue { border-color: #d7dce4; }
.movement-primary.issue > span { background: #f0f2f5; color: #27374a; }
.movement-alerts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 10px 0; }
.movement-alerts .location-tile { min-height: 56px; padding: 10px 12px; text-align: left; }
.movement-alerts .location-tile b { font-size: 15px; }
.movement-alerts .location-tile span { font-size: 13px; }
.ledger-reference { display: block; margin-top: 3px; color: #858b91; font-size: 12px; }

.task-alert-facts { display: flex; gap: 5px 12px; flex-wrap: wrap; }
.task-alert-facts small { font-size: 13px; }
.task-alert-facts strong { color: inherit; }
.task-detail-lead {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr)) auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 12px;
}
.task-detail-lead > div { display: grid; gap: 4px; padding: 11px 12px; border-radius: 13px; background: #f3f5f4; }
.task-detail-lead span { color: #687078; font-size: 13px; }
.task-detail-lead b { color: #202529; font-size: 15px; line-height: 1.4; }
.task-speak { min-width: 96px; }
.task-action-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.task-action-steps li { display: grid; grid-template-columns: 32px minmax(0,1fr); min-height: 48px; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid #e0e4e2; border-radius: 13px; background: #fff; }
.task-action-steps span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: #176b57; color: #fff; font-size: 14px; font-weight: 850; }
.task-action-steps b { font-size: 15px; line-height: 1.4; }
.task-detail-more > summary { font-size: 14px; font-weight: 760; }
.task-detail-more .task-detail-sheet { padding: 0 12px 12px; }

.supplier-hub-grid { margin-top: 10px; }
.supplier-hub-card { min-width: 0; }
.supplier-hub-card dt { color: #697078; font-size: 13px; }
.supplier-hub-card dd { color: #252a2e; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.supplier-stats { margin-top: 14px; }
.supplier-stats .supplier-hub-summary { margin: 0; padding: 0 12px 12px; }
.supplier-hub-summary span { font-size: 13px; }

@media (max-width: 560px) {
  .top .brand-context { min-height: 44px; }
  .top .iconbtn { min-width: 44px; height: 44px; padding: 0 8px; font-size: 13px; }
  .bottomnav button { min-height: 56px; font-size: 14px; }
  .bottomnav button > b { font-size: 15px; }
  .sectionhead h2 { font-size: 22px; }
  .sectionhead p { font-size: 14px; line-height: 1.45; }
  .command-clearline { min-height: 62px; }
  .command-clearline b { font-size: 15px; }
  .command-clearline small { display: block; font-size: 13px; line-height: 1.35; }
  .command-clearline button { min-height: 44px; font-size: 14px; }
  .command-filterbar button { min-height: 44px; }
  .command-filterbar button span,
  .command-filterbar button b { font-size: 13px; }
  .command-primary .execution-copy > small,
  .execution-status b,
  .execution-status span,
  .command-primary .execution-route,
  .command-primary .execution-specs span,
  .queue-heading span,
  .command-next-row small,
  .command-next-row time { font-size: 13px !important; }
  .command-primary .execution-title,
  .command-next-row b { font-size: 16px; }
  .command-primary .execution-route { line-height: 1.35; }
  .command-primary .execution-specs span { padding: 5px 7px; }
  .command-next-row { min-height: 60px; }
  .queue-heading { min-height: 38px; }
  .queue-heading h2 { font-size: 16px; }
  .prep-tools-disclosure,
  .movement-more,
  .supplier-stats { border-radius: 14px; }
  .prep-tools-disclosure > summary,
  .movement-more > summary,
  .supplier-stats > summary { min-height: 56px; }
  .prep-tools-actions,
  .movement-more-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .prep-active-list .taskmeta,
  .prep-active-list .task-specline,
  .prep-active-list .taskmetric span { font-size: 13px; line-height: 1.4; }
  .prep-active-list .taskmetric b { font-size: 15px; }
  .prep-active-list .btn.small { min-height: 44px; font-size: 14px; }
  .movement-primary-actions { gap: 8px; }
  .movement-primary { min-height: 98px; grid-template-columns: 38px minmax(0,1fr); column-gap: 9px; padding: 12px; border-radius: 16px; }
  .movement-primary > span { width: 38px; height: 38px; border-radius: 12px; font-size: 20px; }
  .movement-primary b { font-size: 18px; }
  .movement-primary small { font-size: 13px; }
  .movement-alerts { grid-template-columns: 1fr; }
  .ledger-reference { display: block; overflow-wrap: anywhere; color: #555d66; }
  .task-alert-rail { gap: 9px; padding: 10px; }
  .task-alert-copy { align-items: flex-start; }
  .task-alert-copy b { font-size: 16px; }
  .task-alert-facts { display: grid; gap: 2px; margin-top: 4px; }
  .task-alert-actions button { min-height: 44px; font-size: 14px; }
  .task-detail-lead { grid-template-columns: 1fr 1fr; }
  .task-detail-lead .task-speak { grid-column: 1 / -1; min-height: 44px; }
  .task-action-steps li { min-height: 52px; }
  .task-action-steps b { font-size: 15px; }
  .supplier-hub-grid { grid-template-columns: 1fr; }
  .supplier-hub-card { padding: 14px; }
  .supplier-hub-card .rowbuttons { display: grid; grid-template-columns: 1fr 1.25fr; }
  .supplier-hub-card .btn { min-height: 44px; font-size: 14px; }
  .supplier-hub-card .supplier-stable-id { display: none; }
  .supplier-hub-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* R55 final responsive guard: keep the settings command surface single-choice on phones. */
.settings-shell {
  display: grid;
  grid-template-columns: minmax(150px, .34fr) minmax(0, 1fr);
  align-items: end;
  gap: 16px;
  padding: 15px 16px;
}

.settings-shell .settings-subnav {
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  gap: 4px;
  margin-top: 0;
  padding: 4px;
}

.settings-shell .settings-subnav button {
  min-height: 38px;
  padding: 7px 8px;
  font-size: 12px;
}

.settings-select,
.settings-select-label {
  display: none;
}

@media (max-width: 760px) {
  .settings-shell {
    display: block;
    margin: 8px 12px 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .settings-shell .settings-subnav {
    display: none;
  }

  .settings-shell .settings-heading {
    display: block;
  }

  .settings-shell .settings-select-label {
    display: block;
    margin-bottom: 6px;
    color: #475467;
    font-size: 12px;
    font-weight: 760;
  }

  .settings-shell .settings-select {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    background: #fff;
    color: #171719;
    font: inherit;
    font-weight: 760;
  }
}
.select-search{margin:0 0 8px;min-height:44px;max-width:100%;min-width:0}
.history-pages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0}
.history-pages .btn{min-width:0;min-height:44px}
#historyError{color:#9c251c;overflow-wrap:anywhere}
.select-search-status{display:block;margin-top:6px;color:#53616b;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
/* R60: counters must not push a state filter outside narrow screens. */
@media(max-width:600px){
  .list-segments{flex-wrap:wrap;overflow:visible}
  .list-segments button{flex:1 1 88px;min-width:0;max-width:100%;flex-direction:column;gap:4px;white-space:normal;line-height:1.3}
  .list-segments button span{min-width:0;overflow-wrap:anywhere}
}
/* R62.7: compact, wrapping next-step guidance; no fixed-height instruction cards. */
.readiness-actions{display:grid;gap:10px;min-width:0}
.readiness-actions article{display:grid;gap:8px;padding:12px;border:1px solid var(--line,#dfe4e8);border-radius:12px;min-width:0;overflow-wrap:anywhere}
.readiness-actions small{line-height:1.5;color:var(--muted,#586472)}
.readiness-actions .btn{justify-self:start;max-width:100%;white-space:normal;min-height:44px}
.readiness-reasons{padding-inline-start:22px;line-height:1.6;overflow-wrap:anywhere}
.novice-guide .readiness-reasons{display:block;margin:12px 0;padding:0 0 0 20px}
.novice-guide .readiness-reasons>li{display:list-item;margin:6px 0;padding:0;border:0;border-radius:0;min-width:0;line-height:1.6}
.decision-gate .btn{margin-top:8px;white-space:normal;max-width:100%}
.command-clearline>span{min-width:0;overflow-wrap:anywhere}
.command-clearline>button{white-space:normal;max-width:48%;min-height:44px}
/* R62.13: compact, touch-friendly dated planning and supplier groups. */
.stock-plan-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.stock-plan-filters label{min-width:0;font-weight:600}
.stock-plan-category,.supplier-order-group{border:1px solid var(--line,#e1e5e7);border-radius:12px;margin:12px 0;background:var(--card,#fff);min-width:0}
.stock-plan-category>summary,.supplier-order-group>summary{padding:14px;min-height:44px;cursor:pointer;font-weight:650;overflow-wrap:anywhere}
.supplier-order-group>summary span{font-size:13px;color:var(--muted,#626a73);margin-left:12px;font-weight:400}
.supplier-order-group>.btn{margin:0 14px 12px}
.supplier-order-group .purchase-card{margin:8px;box-shadow:none}
.stock-plan-row{padding:12px 14px;border-top:1px solid var(--line,#e1e5e7);min-width:0;overflow-wrap:anywhere}
.stock-plan-row .cardtop{align-items:flex-start;gap:8px}
.stock-plan-row .cardtop>b{min-width:0;font-size:15px}
.stock-plan-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:12px 0}
.stock-plan-values>div{min-width:0;background:#f5f7f7;padding:8px;border-radius:8px}
.stock-plan-values dt,.stock-plan-values small{font-size:12px;color:#59636c;overflow-wrap:anywhere}
.stock-plan-values dd{margin:4px 0;font-size:16px;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.stock-plan-row>details{font-size:13px;color:#59636c;margin:8px 0}
.stock-plan-row>details>summary{padding:8px 0;min-height:36px;cursor:pointer}
.stock-plan-row .btn{min-height:44px;margin-top:4px}
.supplier-export-text{min-height:220px;white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
#stockPlanStatus{font-size:13px;color:#59636c;margin:10px 0}
@media(max-width:420px){.stock-plan-filters{grid-template-columns:1fr}.supplier-order-group>summary span{display:block;margin-left:0;margin-top:4px}}
.purchase-line-reminder{display:block;margin-top:6px;color:#9a3a12;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.supplier-order-group>.card{margin:8px 0;max-width:100%;min-width:0}
.supplier-order-group{grid-column:1/-1;min-width:0;max-width:100%}
.receipt-check-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; border-bottom:1px solid var(--line,#e5e7eb); }
.receipt-check-item > div { display:grid; gap:4px; min-width:0; overflow-wrap:anywhere; }
.receipt-check-item > button { flex-shrink:0; min-height:44px; }
.receipt-check-item span,.receipt-check-item small { font-size:13px; color:var(--muted,#667085); }
.receipt-ack { display:flex; align-items:center; gap:8px; min-height:44px; margin:8px 0; overflow-wrap:anywhere; }
.receipt-ack input { width:22px; height:22px; flex-shrink:0; }
@media(max-width:360px){ .receipt-check-item { align-items:flex-start; flex-wrap:wrap; } }

/* R62.15: preserve every action and readable line length on phones. */
.workflow-evidence{display:block;max-width:100%;max-height:220px;object-fit:contain;border-radius:10px}
.workflow-balance{font-size:13px;line-height:1.7;color:var(--muted,#52606d);overflow-wrap:anywhere}
.purchase-resume{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px 0}
@media(max-width:560px){
 .recipe-vault .dishhead{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:start;gap:12px}
 .recipe-vault .dishhead>.btn{grid-column:1 / -1;width:100%;min-height:46px;white-space:normal}
 .recipe-vault .dish-summary{min-width:0;overflow-wrap:anywhere}
 .workflow-balance{line-height:1.8}.purchase-resume .btn{width:100%;min-height:46px}
}

/* R62.17 — clear starting points, discoverable complete catalog. */
.experience-welcome { margin: 24px 0 18px; }
.experience-welcome small, .experience-setup > div small { color:#216e59; font-size:12px; font-weight:750; letter-spacing:.04em; }
.experience-welcome h2 { margin:8px 0; font-size:28px; line-height:1.25; letter-spacing:-.03em; }
.experience-welcome p { margin:0; color:#5c6268; font-size:15px; line-height:1.6; }
.experience-welcome + .command-shell .command-deck.single { grid-template-columns:1fr; max-width:none; }
.experience-welcome + .command-shell .command-clearline { padding:20px; min-height:90px; gap:18px; }
.experience-welcome + .command-shell .command-clearline b { font-size:17px; line-height:1.5; }
.experience-welcome + .command-shell .command-clearline small { font-size:12px; line-height:1.5; margin-top:5px; }
.experience-welcome + .command-shell .command-clearline button { min-height:44px; padding:12px 18px; font-size:14px; white-space:normal; }
.experience-shortcuts { margin:28px 0; }
.experience-section-title { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.experience-section-title h2 { margin:0; font-size:19px; line-height:1.4; }
.experience-shortcut-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.experience-shortcut { display:flex; flex-direction:column; gap:10px; text-align:left; background:#fff; border:1px solid #dfe4e1; border-radius:18px; padding:22px; cursor:pointer; color:#202329; min-width:0; }
.experience-shortcut b { font-size:18px; }
.experience-shortcut span { color:#5c6268; font-size:13px; line-height:1.6; flex:1; }
.experience-shortcut small { color:#17634e; font-size:12px; font-weight:700; padding-top:8px; }
.experience-shortcut:hover, .experience-destination:hover { background:#f0f7f4; border-color:#80b7a5; }
.experience-finish { margin-top:18px; padding:16px 0; border-top:1px solid #e0e4e2; display:flex; align-items:center; gap:12px; font-size:13px; }
.experience-finish b { flex-shrink:0; }
.experience-finish span { flex:1; color:#5c6268; line-height:1.6; }
.experience-finish button { flex-shrink:0; }
.experience-directory p { color:#5c6268; line-height:1.6; }
.experience-directory label { display:grid; gap:8px; }
.directory-count { font-size:12px; }
.experience-directory-list { display:grid; gap:8px; }
.experience-destination { display:flex; width:100%; align-items:center; gap:16px; padding:15px; border:1px solid #e1e5e3; border-radius:12px; background:#fff; color:#202329; text-align:left; cursor:pointer; }
.experience-destination span { display:grid; gap:5px; flex:1; min-width:0; }
.experience-destination b { font-size:15px; }
.experience-destination small { color:#5c6268; line-height:1.5; }
.experience-destination em { font-size:12px; color:#17634e; font-style:normal; flex-shrink:0; }
.experience-setup { background:#fff; padding:24px; border:1px solid #dfe4e1; border-radius:20px; margin-bottom:28px; }
.experience-setup > p { color:#5c6268; font-size:13px; line-height:1.6; }
.experience-setup ol { list-style:none; margin:20px 0 0; padding:0; }
.experience-setup li { display:flex; align-items:center; gap:16px; padding:18px 0; border-top:1px solid #edf0ee; }
.experience-step { display:grid; place-items:center; border-radius:50%; width:30px; height:30px; flex-shrink:0; color:#17634e; background:#eef6f2; font-size:13px; font-weight:800; }
.experience-setup li > div { flex:1; min-width:0; }
.experience-setup li b { font-size:15px; }
.experience-setup li p { margin:5px 0; color:#5c6268; font-size:13px; line-height:1.5; }
.experience-setup li small { color:#816222; font-size:12px; }
.experience-advanced { border:1px solid #e1e5e3; border-radius:14px; padding:16px; margin:16px 0; }
.experience-advanced > summary { cursor:pointer; font-size:14px; font-weight:700; min-height:30px; }
.experience-sales-check { font-size:14px; line-height:1.7; }
.experience-sales-check dl { margin:20px 0; border:1px solid #e1e5e3; border-radius:14px; padding:6px 16px; }
.experience-sales-check dl > div { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid #edf0ee; }
.experience-sales-check dl > div:last-child { border-bottom:0; }
.experience-sales-check dt { color:#5c6268; }
.experience-sales-check dd { margin:0; text-align:right; font-weight:700; overflow-wrap:anywhere; }
.experience-sales-check li { margin:10px 0; }
.experience-sales-check details { border-top:1px solid #e1e5e3; padding:14px 0; }
.experience-sales-check summary { cursor:pointer; font-weight:700; }
.manager-reconcile-actions { display:flex; flex-wrap:wrap; gap:8px; align-self:center; }
.manager-reconcile-actions .btn { font-size:13px; min-height:44px; }
.experience-shortcut:focus-visible,.experience-destination:focus-visible { outline:3px solid #24755f; outline-offset:3px; }
@media(min-width:1000px) { html[data-role="仓库"] .experience-shortcut-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:700px) {
  .top .headtools { gap:4px; }
  .top .directory-control { padding:0 8px; min-width:50px; }
  .experience-welcome { margin:14px 0; }
  .experience-welcome h2 { font-size:24px; }
  .experience-welcome p { font-size:14px; }
  .experience-welcome + .command-shell .command-clearline { padding:18px; flex-wrap:wrap; }
  .experience-welcome + .command-shell .command-clearline button { width:100%; text-align:center; }
  .experience-shortcut-grid { grid-template-columns:1fr; gap:10px; }
  .experience-shortcut { display:grid; grid-template-columns:1fr auto; gap:5px 12px; padding:18px; }
  .experience-shortcut b { font-size:16px; }
  .experience-shortcut span { grid-column:1; }
  .experience-shortcut small { grid-column:2; grid-row:1/3; align-self:center; padding:0; }
  .experience-finish { flex-wrap:wrap; }
  .experience-finish span { flex-basis:100%; }
  .experience-setup { padding:18px; }
  .experience-setup .experience-section-title { align-items:flex-start; }
  .experience-setup .experience-section-title .btn { padding:8px; font-size:12px; }
  .experience-setup li { flex-wrap:wrap; gap:10px; align-items:flex-start; }
  .experience-setup li .btn { margin-left:40px; min-height:44px; }
  .manager-reconcile-actions { width:100%; }
  .manager-reconcile-actions .btn.primary { flex:1; }
  .manager-reconcile-actions .btn { width:auto; padding:10px 12px; }
  .experience-sales-check dl > div { flex-direction:column; gap:2px; }
  .experience-sales-check dd { text-align:left; }
}
@media(prefers-reduced-motion:reduce) { .experience-shortcut,.experience-destination { transition:none; } }

.experience-welcome + .command-shell .command-clearline > button { background:#181a19; color:#fff; border:1px solid #181a19; border-radius:12px; }

.experience-distribution-note{display:block;margin-bottom:16px;padding:12px 16px}.experience-distribution-note summary{cursor:pointer;font-size:13px;color:var(--muted);font-weight:600}.experience-distribution-note p{font-size:13px;line-height:1.7;margin:10px 0 0}.experience-distribution-note summary:focus-visible{outline:2px solid var(--accent);outline-offset:4px}

/* R62.18: reveal configuration substeps where they are needed. */
.setup-substeps{margin-top:12px}.setup-substeps summary{font-size:13px;cursor:pointer;color:var(--muted,#69717a)}.setup-substep-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.setup-substep-actions .btn{font-size:13px;white-space:normal}.sales-check-note{width:100%;min-height:320px;font:14px/1.65 system-ui;resize:vertical}
@media(max-width:600px){.setup-substep-actions{display:grid;grid-template-columns:1fr}.setup-substep-actions .btn{width:100%}.sales-check-note{min-height:260px}}
@media(max-width:600px){.experience-setup ol li{display:grid;grid-template-columns:30px minmax(0,1fr);gap:10px}.experience-setup li>.btn{grid-column:2;width:100%;margin-left:0}.experience-setup li .setup-substep-actions .btn{margin-left:0;min-width:0}.experience-setup li p{font-size:14px;line-height:1.65}.experience-setup li small{font-size:13px;line-height:1.6}}

/* R62.19: show the requested business day and last successful fetch separately. */
.manager-sync-facts { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:4px 0;padding:16px;background:rgba(255,255,255,.7);border:1px solid #ecdcd9;border-radius:12px; }
.manager-sync-facts > div { min-width:0;display:grid;gap:5px; }
.manager-sync-facts dt { color:#715b58;font-size:12px; }
.manager-sync-facts dd { margin:0;color:#292524;font-size:15px;font-weight:700;overflow-wrap:anywhere;font-variant-numeric:tabular-nums; }
.manager-unavailable .cardactions { display:flex;flex-wrap:wrap;gap:8px;margin-top:4px; }
.manager-unavailable .cardactions .btn { width:auto;min-height:44px; }
.manager-sync-error { padding:14px;border:1px solid #ebceaa;border-radius:12px;background:#fff7ea; }
.manager-sync-error h3 { margin:0 0 8px; }
.manager-sync-error p { overflow-wrap:anywhere; }
@media(max-width:480px){.manager-sync-facts{grid-template-columns:1fr;gap:12px}.manager-unavailable .cardactions .btn{flex:1 1 100%;width:100%}}
/* R62.20 — Boss Xiaozuo visual hierarchy; operational navigation stays in place. */
.manager-boss{--boss-today:#eaf5ef;--boss-yesterday:#fcf3e8;--boss-week:#f0eff8;gap:14px}
.manager-boss .manager-live-head{padding:4px 0}.manager-boss .manager-live-head h2{font-size:19px}.manager-boss .manager-eyebrow{font-size:11px}
.boss-datebar{display:flex;gap:8px;align-items:end;flex-wrap:wrap}.boss-datebar label{display:grid;gap:4px;font-size:11px;color:var(--muted,#65736b)}.boss-datebar input{font:inherit;font-size:14px;min-height:42px;padding:7px 9px;border:1px solid #dce2df;border-radius:8px;background:#fff;color:#1d3028}.boss-datebar .btn{flex:1;min-height:42px;white-space:nowrap}
.manager-boss .boss-hero{border-radius:12px 12px 0 0;background:#15382b;box-shadow:none;padding:26px;grid-template-columns:minmax(0,1fr) auto;margin-bottom:-14px}.boss-hero-compare{font-weight:750;align-self:center;text-align:right;color:#fff;font-size:15px}.boss-hero-compare>small{display:block;margin-top:7px;color:#d0e2d7;font-size:11px}.manager-boss .boss-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border:1px solid #e4e9e6;border-top:0;border-radius:0 0 12px 12px;overflow:hidden;background:#fff}.manager-boss .boss-kpis>div{border:0;border-right:1px solid #edf0ed;border-radius:0;padding:16px 5px;text-align:center;gap:5px;min-width:0}.boss-kpis>div:last-child{border-right:0}.manager-boss .boss-kpis b{font-size:24px;font-variant-numeric:tabular-nums}.manager-boss .boss-kpis span{font-size:11px}.manager-boss .boss-kpis .boss-qty{background:var(--boss-today);color:#24644a;border-top:3px solid #3e7d5b;padding-top:13px}
.boss-analysis-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.boss-analysis-actions .btn{min-height:44px}.boss-sync-note{font-size:12px;color:#58665e;padding:0 2px}.boss-quality{border:1px solid #ebdfc6;border-radius:10px;background:#fffbf2}.boss-quality>summary{min-height:44px;padding:13px 14px;font-size:12px;color:#76582e;cursor:pointer}.boss-quality .manager-reconcile{margin:0;border:0;border-top:1px solid #ebdfc6;border-radius:0;box-shadow:none}
.manager-boss .manager-panel{box-shadow:none;border-radius:12px;padding:17px 16px}.boss-product-head,.boss-product-row{display:grid;grid-template-columns:minmax(0,1.6fr) repeat(3,minmax(0,1fr));align-items:stretch;gap:0}.boss-product-head{font-size:12px;border-block:1px solid #e0e5e1;background:#fff}.boss-product-head>b{padding:12px 8px;align-self:center}.boss-period{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:4px;padding:12px 9px;font-variant-numeric:tabular-nums;min-width:0}.boss-period>b{font-size:14px}.boss-period small{font-size:11px;color:#748078}.boss-period-0{background:var(--boss-today);color:#276548}.boss-period-1{background:var(--boss-yesterday);color:#926036}.boss-period-2{background:var(--boss-week);color:#676c97}.boss-products-group{margin-top:8px;border:1px solid #e3e8e4;border-radius:9px;overflow:hidden}.boss-products-group>summary{background:#f8faf8;padding:14px 10px;min-height:52px}.boss-product-row{border-top:1px solid #edf0ed;background:white}.boss-product-row>span:first-child{display:flex;flex-direction:column;justify-content:center;gap:4px;padding:12px 8px;min-width:0}.boss-product-row>span:first-child>b{font-size:13px;line-height:1.5;overflow-wrap:anywhere}.boss-product-row>span:first-child>small{font-size:10px;color:#819088;overflow-wrap:anywhere}.boss-unsold>summary{padding:12px;font-size:12px;background:#f9faf9;color:#68736b;cursor:pointer}.boss-samples{overflow-x:auto}.boss-samples table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.boss-samples th,.boss-samples td{padding:12px 8px;border-bottom:1px solid #e6ebe7;text-align:right}.boss-samples th:first-child{text-align:left}.boss-samples caption{text-align:left;font-size:12px;color:#67766d;padding:8px 0}
@media(max-width:600px){.manager-boss .manager-live-head h2{font-size:17px}.manager-boss .boss-hero{padding:22px 16px}.manager-boss .manager-hero-main>b{font-size:40px}.boss-hero-compare{font-size:12px;max-width:100px}.manager-boss .boss-kpis b{font-size:19px}.manager-boss .boss-kpis span{font-size:10px}.manager-boss .manager-panel{padding:14px 8px}.boss-period{padding:10px 5px}.boss-period>b{font-size:12px}.boss-period small{font-size:10px}.boss-product-row>span:first-child>b{font-size:12px}.boss-datebar{gap:5px}.boss-datebar label{width:100%}.boss-datebar input{width:100%}.boss-analysis-actions .btn{font-size:12px;padding:10px 4px}.boss-products-group>summary{padding:12px 8px}.boss-products-group>summary small{font-size:10px}}
@media(prefers-reduced-motion:reduce){.manager-boss *{scroll-behavior:auto;transition:none!important;animation:none!important}}

.boss-line-chart{display:block;width:100%;height:auto}.boss-chart-note{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px 4px;color:#376c51}.boss-chart-note b{font-size:20px}.boss-chart-note span{font-size:11px;color:#637468}

@media(max-width:600px){.boss-period>b,.boss-product-row>span:first-child>b{font-size:14px}.boss-period small{font-size:11px}.boss-period{overflow-wrap:anywhere}}

/* One urgent summary; details stay in the task drawer below the live dashboard. */
.manager-alert-compact{max-width:1180px;margin:10px auto;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;animation:none}
.manager-alert-compact>div{min-width:0;display:grid;gap:4px}
.manager-alert-compact b{font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.manager-alert-compact span{font-size:12px;color:#7d302a;line-height:1.4}
.manager-alert-compact>button{flex:none;min-height:44px;padding:8px 12px;background:#fff;color:#8c2923;border:1px solid #d3a09b;border-radius:10px;font-weight:700}
.manager-source-times{display:flex;flex-wrap:wrap;gap:5px 16px;margin:10px 2px;color:#59685f;font-size:12px;line-height:1.6}
.manager-tasks{margin-top:18px}.manager-tasks>summary{cursor:pointer;min-height:48px}
@media(max-width:620px){.manager-alert-compact{margin:8px 12px;padding:10px;gap:8px}.manager-alert-compact b{font-size:13px}.manager-source-times{display:grid;gap:2px}}

.boss-category-tools,.shared-category-entry{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:12px 0}.shared-category-entry{padding:16px;border:1px solid #d3dfd8;border-radius:16px;background:#f3f8f4}.shared-category-entry p{font-size:13px;color:#59685f;line-height:1.6}.shared-category-list{display:grid;gap:8px;margin:16px 0}.shared-category-item{display:flex;justify-content:space-between;gap:12px;min-height:48px;padding:12px 14px;text-align:left;border:1px solid #d7e0da;border-radius:12px;background:#fff;color:#233d2e}.shared-category-item small{color:#55645b}.boss-category-tools .btn{min-height:44px}

/* R62.23: disclosures retain state during polling without replaying entrance motion. */
.task-disclosure[open],.insight-drawer-body{animation:none}
.shared-category-item.is-disabled{opacity:.7}
.shared-rule-list{display:grid;gap:8px;margin-top:16px}
.shared-rule-list button{text-align:left;white-space:normal;overflow-wrap:anywhere}
/* R62.27 task-focused forms; panels remain mounted so going back preserves input. */
[data-recipe-step][hidden],.recipe-editor-foot [hidden],#modalForm .field[hidden]{display:none!important}
.recipe-guide{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.recipe-guide li button{display:flex;align-items:center;gap:8px;width:100%;border:0;background:transparent;color:inherit;padding:8px;font:inherit;text-align:left;cursor:pointer}
.recipe-guide button:focus-visible{outline:2px solid #266a53;outline-offset:2px;border-radius:8px}
.recipe-editor-basics h3{margin:8px 0 16px}.recipe-editor-basics>h3,.recipe-editor-basics>p{grid-column:1/-1}
.recipe-editor-form [data-recipe-step]{padding:8px 0 20px}.recipe-save-status{font-size:13px;color:#637168;padding:12px 0}
.recipe-editor-foot{background:#fff;border-top:1px solid #e2e7e3;z-index:2;gap:8px}
.recipe-editor-foot>div{display:flex;gap:8px;flex-wrap:wrap}.recipe-editor-foot .btn{min-height:44px}
.personal-drafts{padding:20px 0;border-bottom:1px solid #e0e6e2;margin-bottom:20px}.personal-drafts h3{margin:0}
.draft-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:12px}.purchase-needs{display:grid;gap:12px}.purchase-need{padding:18px}.purchase-need .badge{margin-left:12px}
.settings-jump{padding:12px 0}.settings-jump select{margin-top:12px;width:100%}
@media(max-width:600px){.recipe-guide li button{padding:6px 2px;gap:4px;font-size:13px}.recipe-editor-foot{margin:0 -4px}.recipe-editor-foot .btn{padding:10px 12px}.draft-list{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.recipe-editor-form *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.recipe-editor-foot{display:flex!important;align-items:center;justify-content:space-between}.recipe-editor-foot>div{display:flex!important;flex-direction:row!important;width:auto!important;margin-left:auto}.recipe-editor-foot .btn{width:auto!important;flex:0 1 auto}

/* A failed refresh preserves input, but never presents old data as current. */
.connection-notice{max-width:1160px;margin:16px auto;padding:16px;display:flex;gap:16px;align-items:center;justify-content:space-between;background:#fff8e7;border:1px solid #e8ce8b;color:#604b21}
.connection-notice p{margin:6px 0}.connection-notice small{overflow-wrap:anywhere}
@media(max-width:600px){.connection-notice{margin:12px;display:block}.connection-notice button{margin-top:12px;width:100%}}

.daily-prep-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px;margin:16px 0}.daily-prep-card{padding:20px;min-width:0}.daily-prep-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.daily-prep-heading h3{margin:0;font-size:18px;overflow-wrap:anywhere}.daily-prep-references{display:flex;flex-wrap:wrap;gap:16px;margin:16px 0}.daily-prep-references span{display:grid;gap:6px;color:var(--muted,#70746d);font-size:13px}.daily-prep-references b{color:var(--ink,#242621);font-size:16px}.daily-prep-quantity{font-size:18px}.daily-prep-card .notice{overflow-wrap:anywhere}.daily-prep-card .btn{min-height:44px}

/* Courier: stable cards with four explicit states. */
.delivery-context p{margin:4px 0 0}.delivery-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:14px 0}.delivery-tabs .btn{padding:12px 4px;min-height:48px;white-space:normal}.delivery-tabs span{display:block;font-variant-numeric:tabular-nums}.delivery-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr))}.delivery-card{min-width:0}.delivery-card h2{font-size:20px;margin:0;overflow-wrap:anywhere}.delivery-card .cardtop strong{white-space:nowrap}.delivery-route{display:grid;gap:8px}.delivery-route small{display:inline-block;width:44px;color:var(--muted,#686d70);font-size:13px}.delivery-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.delivery-actions .primary{flex:1;min-height:48px}.delivery-card details{font-size:13px;color:var(--muted,#686d70);overflow-wrap:anywhere}

html[data-role="配送员"] .headtools [onclick="scanStock()"]{display:none!important}
.work-context-bar.delivery-context{display:flex;justify-content:space-between;gap:12px;padding:12px 14px}.delivery-context .btn{border:1px solid #dce2df;padding:8px 16px;min-height:44px}

.role-admin [hidden]{display:none!important}
.simple-workbench{display:grid;gap:12px}.simple-task{display:flex;align-items:center;gap:16px;padding:18px;background:var(--surface,#fff);border:1px solid var(--line,#e0e4e8);border-radius:18px}.simple-task.urgent{border-left:4px solid #b83a31}.simple-task-detail{flex:1;min-width:0;display:grid;gap:7px;text-align:left;border:0;background:transparent;padding:0;color:inherit;cursor:pointer}.simple-task-detail strong{font-size:20px;line-height:1.4}.simple-task-detail span,.simple-task-detail small{color:#586573;overflow-wrap:anywhere}.simple-task-status{font-size:13px;font-weight:700}.simple-task-action{flex:0 0 auto;max-width:45%}.simple-task-action .task-primary{min-height:48px}.simple-settings{display:grid;gap:12px}.simple-settings>details{border:1px solid #dce2e7;border-radius:18px;background:#fff;overflow:hidden}.simple-settings summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;padding:20px;list-style:none}.simple-settings summary span:first-child{display:grid;gap:5px}.simple-settings summary b{font-size:20px}.simple-settings summary small{color:#637080}.simple-settings .configuration-object-card{border:0;border-top:1px solid #e7ebef;border-radius:0;width:100%;box-shadow:none}.simple-settings details[open]>summary>span:last-child{transform:rotate(45deg)}.configuration-approval{margin-bottom:16px}.role-person .role-person-head{gap:12px}.role-person .cardactions{margin-top:12px}.role-admin .permission-safety-note{font-size:13px}.role-admin .directory-sync-status{padding:12px 16px}.role-admin .role-search{margin-top:12px}
@media(max-width:600px){.simple-task{align-items:stretch;flex-direction:column;gap:12px;padding:16px}.simple-task-action{max-width:none}.simple-task-action .task-primary{width:100%}.simple-workbench .taskfilters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.simple-workbench .taskfilters button{padding:10px 3px;font-size:13px;white-space:normal}.simple-workbench .taskfilters b{display:block}.simple-settings summary{padding:17px}}

.simple-task.warning .simple-task-status{color:#815113}.simple-task.urgent .simple-task-status{color:#a32e27}

/* R62.36: role accents identify the workspace; semantic colors identify work state. */
:root[data-role="厨师"]{--role-accent:#8a4c17;--role-accent-soft:#fff4e6;--role-accent-rgb:138,76,23}
:root[data-role="配送员"]{--role-accent:#176b78;--role-accent-soft:#e9f6f8;--role-accent-rgb:23,107,120}
.top{border-top:4px solid var(--role-accent)}
#workbenchTitle{color:var(--role-accent)}
#tabs button.active,.bottomnav button.active{color:var(--role-accent);background:var(--role-accent-soft);box-shadow:inset 0 -3px var(--role-accent)}
[data-signal="awaiting"]{--signal-fg:#1756a9;--signal-bg:#edf5ff;--signal-line:#a9c9ee}
[data-signal="active"]{--signal-fg:#6041a5;--signal-bg:#f4f0ff;--signal-line:#c9b8e9}
[data-signal="warning"]{--signal-fg:#875300;--signal-bg:#fff5dd;--signal-line:#e5bd61}
[data-signal="critical"]{--signal-fg:#a32b24;--signal-bg:#fff0ef;--signal-line:#df9b96}
[data-signal="complete"]{--signal-fg:#166347;--signal-bg:#edf8f2;--signal-line:#9acdb3}
[data-signal="neutral"]{--signal-fg:#546171;--signal-bg:#f2f4f7;--signal-line:#cbd2db}
.state-pill[data-signal]{display:inline-flex;align-items:center;gap:6px;justify-self:start;max-width:100%;padding:6px 10px;border-radius:8px;background:var(--signal-bg)!important;color:var(--signal-fg)!important;border:1px solid var(--signal-line);font-size:13px;font-weight:750;line-height:1.4;white-space:normal;box-shadow:none;animation:none}
.state-pill i{font-style:normal;display:inline-grid;place-items:center;min-width:16px;font-weight:800}
.signal-legend{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 10px}.signal-legend .state-pill{font-size:12px;padding:4px 7px}
.simple-task[data-signal],.daily-prep-card[data-signal],.delivery-card[data-signal]{border:1px solid var(--signal-line);border-left:5px solid var(--signal-fg);background:linear-gradient(110deg,var(--signal-bg),#fff 80%)}
.simple-task-action .task-primary{background:#1756a9;color:#fff;border-color:#1756a9}
.simple-task[data-signal="critical"] .task-primary{background:#a32b24;border-color:#a32b24}
.delivery-card .state-pill{margin-bottom:12px}.delivery-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}
.reference-note{padding:12px 14px;border:1px solid #a9c9ee;border-radius:12px;background:#edf5ff;color:#204971;font-size:14px;line-height:1.65}
.task-alert-rail,.task-alert-symbol,.alert-control{animation:none!important}
.task-stage-tabs button:nth-child(2){color:#1756a9}.task-stage-tabs button:nth-child(3){color:#6041a5}.task-stage-tabs button:nth-child(4){color:#a32b24}
.task-stage-tabs button.active{background:#edf5ff;color:#173d6b;box-shadow:inset 0 -3px currentColor}
.task-stage-tabs button:nth-child(3).active{background:#f4f0ff;color:#6041a5}.task-stage-tabs button:nth-child(4).active{background:#fff0ef;color:#a32b24}
@media(max-width:600px){.signal-legend{gap:4px}.signal-legend .state-pill{font-size:11px;padding:4px 5px}.delivery-tabs .btn{font-size:12px;padding:10px 2px}}
@media(prefers-reduced-motion:reduce){.state-pill,.simple-task,.delivery-card,.task-stage-tabs button{transition:none!important;animation:none!important;transform:none!important}}
.delivery-history-filters{display:grid;gap:12px;padding:16px;margin:12px 0;border:1px solid #dce2df;border-radius:16px;background:#fff}
.delivery-history-filters label{display:grid;gap:6px;min-width:0;font-weight:600}
.delivery-history-dates{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.delivery-history-filters .input,.delivery-history-filters .select{width:100%;min-width:0;max-width:100%;box-sizing:border-box;min-height:44px}
.delivery-history-shortcuts{display:flex;flex-wrap:wrap;gap:8px}.delivery-history-shortcuts .btn{min-height:44px}.delivery-history-shortcuts .primary{margin-left:auto}
.delivery-history-filters .meta{margin:0;font-weight:400}.delivery-proof-photo{margin:12px 0}.delivery-proof-photo img{display:block;width:100%;max-height:420px;object-fit:contain;border-radius:12px;background:#f5f6f7}
.delivery-proof-photo figcaption{font-size:13px;color:#59656a;margin-top:6px}.delivery-receipt{border-top:1px solid #dce2df;padding:12px 0}

#alertControl.voice-on{background:#fff5dd;color:#875300;border-color:#e5bd61}.alert-settings-control{min-width:44px}.headtools .alert-control{min-width:70px}.headtools #alertCount{margin-left:4px}

@media(max-width:600px){.top .brandrow{flex-wrap:wrap;gap:8px}.top .brand{flex:1 0 100%;width:100%;min-width:0}.top .brand h1{max-width:none;white-space:normal}.top .headtools{width:100%;justify-content:flex-start;gap:6px}.top .headtools .iconbtn{flex:0 0 auto;min-height:44px}.top .headtools .alert-settings-control{min-width:68px}.top .brand-context .logo{flex-shrink:0}}
/* Receiving keeps the primary decision large and stable on narrow phones. */
@media(max-width:600px){
  article[data-receiving-no] .delivery-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  article[data-receiving-no] .delivery-actions .btn{width:100%;min-width:0;min-height:48px;white-space:normal;line-height:1.5;padding:12px 8px}
  article[data-receiving-no] .delivery-actions .btn.primary{grid-column:1/-1}
  article[data-receiving-no] .delivery-actions .btn:only-child{grid-column:1/-1}
}
/* Count flows remain readable on a phone; meaning is conveyed in text as well as color. */
.count-entry {border-left:5px solid #28695b;background:#f3faf7;margin-bottom:18px}
.count-entry p,.count-note {font-size:14px;line-height:1.65;color:#475569;overflow-wrap:anywhere}
.count-entry .cardactions {flex-wrap:wrap;gap:10px}
.count-comparison {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:16px;border-radius:14px}
.count-comparison span,.count-comparison b {display:block;overflow-wrap:anywhere}
.count-comparison span {font-size:13px;margin-bottom:8px}
.count-warning {background:#fff4df;color:#6f4600;border:1px solid #dfbe7d}
.count-good {background:#eaf6ee;color:#21563c;border:1px solid #93bca4}
.count-history {display:grid;gap:12px;overflow-wrap:anywhere}
.count-history small {color:#475569;line-height:1.5}
@media(max-width:480px){.count-entry .cardactions .btn{flex:1 1 42%}.count-comparison{padding:12px;gap:8px}.count-comparison b{font-size:17px}}

.count-home-entry{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0 0 16px;padding:12px 16px;border-radius:16px;background:#edf6f2;color:#275747}.count-home-entry .btn{min-height:44px}
.daily-prep-start{padding:20px;text-align:left}
.daily-prep-start h3{margin:0 0 8px;font-size:18px;line-height:1.4}
.daily-prep-start p{margin:0 0 16px;line-height:1.65;color:var(--muted,#61746b)}
.daily-prep-start .btn{min-height:44px;max-width:100%;white-space:normal}
.manager-compare-reason{display:block!important;font-size:12px!important;font-weight:400!important;line-height:1.5!important;white-space:normal!important;overflow-wrap:anywhere;letter-spacing:0!important}

/* R62.41 interaction surface: role identity, work, then utilities.
   Business status colors remain semantic; role color is identity only. */
:root{--ui-ink:#17232d;--ui-muted:#586773;--ui-line:#dce3e8;--ui-canvas:#f3f5f7;--ui-blue:#155da8;--ui-radius:20px;--ui-ease:cubic-bezier(.2,.75,.25,1)}
html body{background:var(--ui-canvas);color:var(--ui-ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;-webkit-font-smoothing:antialiased}
html .top{background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:0 1px 0 var(--ui-line)}
html .topin{max-width:1160px;padding:12px 24px 0}
html main#app{max-width:1160px;margin:0 auto;padding:24px 24px 96px;outline:none}
html .brand h1{font-size:19px;letter-spacing:-.4px;font-weight:750}
html .brand p{font-size:12px;color:var(--ui-muted);margin-top:4px}
html .brandrow{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between}
html .headtools{display:flex;gap:8px;flex-wrap:nowrap;flex:0 0 auto;width:auto}
html .headtools .iconbtn{box-shadow:none;border:1px solid var(--ui-line);background:#f7f9fb;border-radius:13px;min-width:48px;min-height:44px;padding:8px 12px}
html .headtools .signal{font-size:12px;background:transparent;color:var(--ui-muted)}
html .tabs{gap:8px;margin-top:10px;padding:0 0 10px}
html .tabs .tab{min-height:42px;border-radius:12px;padding:10px 18px;border:0;box-shadow:none;color:var(--ui-muted)}
html .tabs .tab[aria-selected=true]{background:#e8f0f8;color:#154f86;box-shadow:none}
html .work-context-bar{border:0;background:transparent;box-shadow:none;border-radius:0;padding:0 0 16px;margin:0;min-height:0}
html .work-context-identity{padding:0;gap:9px;min-height:44px}
html .work-context-avatar{width:34px;height:34px;border-radius:11px}
html .work-context-identity small{font-size:12px;color:var(--ui-muted)}
html .work-context-presence{border:1px solid var(--ui-line);border-radius:12px;background:#fff;padding:7px 10px;min-height:44px}
html .work-context-presence small{font-size:11px;color:var(--ui-muted)}
.workbench-heading,.quick-shelf-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:4px 0 18px}
.workbench-heading h2{font-size:29px;letter-spacing:-.7px;margin:0 0 5px}
.workbench-heading p{margin:0;color:var(--ui-muted);font-size:14px}
.workbench-heading>span{font-size:14px;color:var(--ui-muted);white-space:nowrap;font-variant-numeric:tabular-nums}
html .task-stage-tabs{border:0;background:#e8edf1;border-radius:14px;padding:4px;margin:0 0 18px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;box-shadow:none}
html .task-stage-tabs button{border:0;background:transparent;box-shadow:none;color:#53616e;font-size:14px;min-height:44px;border-radius:11px;padding:8px 7px;white-space:normal}
html .task-stage-tabs button.active{color:#142d43;background:#fff;box-shadow:0 1px 4px #182b4214}
html .task-stage-tabs button b{background:transparent;color:inherit;font-variant-numeric:tabular-nums}
html .simple-workbench{display:block}
html .simple-task{gap:0;background:#fff;border:1px solid var(--ui-line);border-radius:var(--ui-radius);box-shadow:0 2px 5px #15304204;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) 200px;margin:0 0 12px;padding:0}
html .simple-task.focus-task{border-color:#a7c5e1;box-shadow:0 5px 18px #15304207}
.focus-task-eyebrow{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 22px;border-bottom:1px solid #dde8f3;background:#eef5fb;color:#194e7e;font-size:13px;font-weight:650}
.focus-task-eyebrow small{font-size:12px;font-weight:400;color:#526a80}
html .simple-task[data-signal=critical]{border-color:#d8877d;box-shadow:inset 4px 0 #b5392c}
html .simple-task[data-signal=critical] .focus-task-eyebrow{background:#fff0ed;color:#9b2c22;border-color:#f0c9c2}
html .simple-task[data-signal=warning]{border-color:#d9b576}
html .simple-task[data-signal=warning] .focus-task-eyebrow{background:#fff6e5;color:#81530a;border-color:#eedabb}
html .simple-task-detail{padding:22px;text-align:left;border:0;background:transparent;box-shadow:none;display:flex;align-items:flex-start;flex-direction:column;gap:10px;min-width:0}
html .simple-task-detail strong{font-size:21px;font-weight:730;letter-spacing:-.25px;line-height:1.4;overflow-wrap:anywhere}
html .focus-task .simple-task-detail strong{font-size:27px}
html .simple-task-detail .task-essential{font-size:16px;color:#21394a;line-height:1.5}
html .simple-task-detail small{color:var(--ui-muted);font-size:13px;line-height:1.6}
html .simple-task-detail .task-detail-link{font-size:13px;color:var(--ui-blue);font-weight:600;display:flex;gap:8px}
html .simple-task-action{width:100%;max-width:none;min-width:0;box-sizing:border-box;background:transparent;border:0;padding:22px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;gap:7px}
.next-step-label{font-size:12px;font-weight:650;color:var(--ui-muted);display:block}
html .simple-task[data-signal] .simple-task-action .task-primary{width:100%;min-height:50px;white-space:normal;line-height:1.35;box-shadow:none;background:#185d99;color:#fff;border-color:#185d99;border-radius:13px;font-size:16px}
html .simple-task-action .dangertext{font-size:13px;line-height:1.5;margin:0 0 5px}
html .simple-workbench .signal-help{margin:18px 0 0;border:0;background:transparent;padding:0}
.signal-help summary{color:var(--ui-muted);font-size:13px;min-height:44px;display:flex;align-items:center;gap:8px;cursor:pointer;width:fit-content}
.signal-help summary::after{content:'⌄';font-size:14px}
.signal-help .signal-legend{margin:0 0 16px}
html .workbench-empty{border:1px solid var(--ui-line);padding:34px 22px;min-height:180px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}
.workbench-empty .empty-symbol{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;color:#3e7763;background:#edf5f1;font-size:23px}
html .workbench-empty h3{margin:0;color:#263e4c;font-size:18px}
html .workbench-empty p{margin:0;max-width:370px;font-size:14px;line-height:1.6;color:var(--ui-muted)}
.quick-shelf{margin:26px 0 8px}
.quick-shelf-heading{margin:0 0 12px}
.quick-shelf-heading h2{font-size:17px;margin:0;letter-spacing:-.2px}
.quick-shelf-heading>span{font-size:12px;color:var(--ui-muted)}
.quick-shelf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.quick-tile{display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--ui-line);border-radius:16px;padding:18px;background:#fff;text-align:left;color:var(--ui-ink);min-height:84px}
.quick-tile b,.quick-tile small{display:block}
.quick-tile b{font-size:16px;line-height:1.5;margin-bottom:3px}
.quick-tile small{font-size:12px;color:var(--ui-muted);line-height:1.5}
.quick-tile i{font-style:normal;color:#617588;font-size:23px}
html .setup-next{background:#fff9ef;border:1px solid #e8d2ac;border-radius:20px;padding:22px;font-size:14px}
html .setup-next h3{font-size:21px;margin:8px 0}
html .setup-next p{line-height:1.6;color:#675b46}
/* Shared controls: immediate feedback, no layout animation or broad blur. */
html button,html a,html summary{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
html button,html .btn,html .iconbtn{transition:background-color 120ms ease,border-color 120ms ease,opacity 120ms ease;}
html button:enabled:active,html .btn:enabled:active{filter:brightness(.94);transform:none}
html button:focus-visible,html a:focus-visible,html summary:focus-visible{outline:3px solid #1570c2;outline-offset:3px}
html input:focus-visible,html textarea:focus-visible,html select:focus-visible{border-color:#3675b1;outline:3px solid #3675b133;outline-offset:1px}
html .btn{border-radius:13px;min-height:44px;box-shadow:none;font-size:14px}
html .btn.primary{box-shadow:none}
html button:disabled{cursor:default;opacity:.55;filter:none}
html .sectionhead h2{font-size:25px;letter-spacing:-.45px}
html .sectionhead p{color:var(--ui-muted);line-height:1.6}
html .card,html .rowcard,html .taskcard{box-shadow:0 2px 5px #15304204;border-color:var(--ui-line)}
html .state-pill{font-size:12px;line-height:1.45;font-weight:650;box-shadow:none}
html .sheet{background:#fff;box-shadow:0 12px 50px #17232d24;scroll-padding:85px 0 110px;overscroll-behavior:contain}
html dialog::backdrop{background:#18283266;backdrop-filter:none;-webkit-backdrop-filter:none}
html dialog[open] .sheet{animation:sheet-arrive 170ms var(--ui-ease)}
@keyframes sheet-arrive{from{opacity:.4;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
html .sheethead h2{font-size:24px;letter-spacing:-.4px;line-height:1.35}
html .sheethead .desc{font-size:14px;line-height:1.6;color:var(--ui-muted)}
html .sheethead .close{flex-shrink:0;background:#f0f3f5;color:#415667}
html .field label{font-size:14px;color:#283b4a;line-height:1.55}
html .field small{font-size:12px;color:var(--ui-muted);line-height:1.6}
html .input,html .select,html .textarea{border:1px solid #bccbd6;background:#fff;border-radius:12px;min-height:48px;font-size:16px}
html .input[readonly]{background:#f3f6f8;color:#4d6475}
html .formerr:not(:empty){background:#fff0ef;border:1px solid #d5938b;border-radius:12px;padding:12px 14px;font-size:14px;line-height:1.55}
html .sheetfoot{background:#fff;border-top:1px solid var(--ui-line);padding-top:14px;gap:10px;box-shadow:0 -6px 14px #fff}
html .sheetfoot .btn{min-height:50px;font-size:16px}
html .dialog-scroll-hint{display:none}
html .delivery-card{border-radius:20px;padding:20px}
html .delivery-route{background:#f4f7fa;border-radius:14px;padding:14px}
html .delivery-actions{display:flex;flex-wrap:wrap;gap:8px}
html .delivery-actions .primary{order:-1;min-width:140px}
html .delivery-tabs{position:static;gap:7px;background:transparent;overflow:auto;padding:6px 0 14px}
html .delivery-tabs .btn{white-space:nowrap;flex-shrink:0;min-height:44px}
html .tools-list{display:grid;grid-template-columns:1fr;gap:8px}
html .tools-list .quick-tile{min-height:70px}
@media(min-width:760px){html main#app{padding-top:22px}.quick-shelf-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.quick-tile{padding:16px}.quick-shelf-grid:has(>.quick-tile:nth-child(3):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){
 html .topin{padding:10px 16px}html .brandrow{gap:8px}html .brand h1{font-size:17px}html .brand p{display:block;font-size:11px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 html .headtools{gap:6px}html .headtools .signal{display:none}html .headtools .iconbtn{padding:7px 9px;font-size:12px;min-width:44px}html .brand .logo{width:34px;height:34px;border-radius:11px;font-size:13px}
 html main#app{padding:16px 16px calc(96px + env(safe-area-inset-bottom))}html .work-context-bar{padding-bottom:16px}html .work-context-identity small{display:none}html .work-context-avatar{display:none}html .work-context-identity b{font-size:13px;font-weight:500;color:var(--ui-muted)}
 html .work-context-presence{padding:6px 9px}html .work-context-presence small{display:none}
 .workbench-heading{margin-top:0;margin-bottom:16px}.workbench-heading h2{font-size:27px}.workbench-heading p{font-size:13px}
 html .task-stage-tabs{gap:2px;padding:3px;margin-bottom:14px}html .task-stage-tabs button{font-size:12px;padding:8px 3px}html .task-stage-tabs button b{padding:0 1px;min-width:0}
 html .simple-task{display:block;border-radius:18px;margin-bottom:12px}.focus-task-eyebrow{padding:10px 16px;font-size:12px}.focus-task-eyebrow small{font-size:11px}
 html .simple-task-detail{padding:16px;gap:9px}html .focus-task .simple-task-detail strong{font-size:23px}html .simple-task-detail strong{font-size:19px}html .simple-task-detail .task-essential{font-size:15px}
 html .simple-task-action{padding:0 16px 16px;gap:6px}html .simple-task-action .task-primary{min-height:48px}.next-step-label{font-size:12px}
 .quick-shelf{margin-top:22px}.quick-shelf-heading>span{font-size:11px}.quick-tile{padding:14px;gap:5px;min-height:88px}.quick-tile b{font-size:15px}.quick-tile small{font-size:11px}.quick-tile i{font-size:18px}
 html .bottomnav{background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none;border-top:1px solid #dce3e8;box-shadow:0 -3px 14px #19334b05;padding-top:7px}
 html .bottomnav button{min-height:48px;font-size:13px;color:#536677;border-radius:12px}html .bottomnav button.active{background:#eaf2f9;color:#174e7b}html .bottomnav button .count{display:inline-flex;vertical-align:middle;margin-left:5px;font-size:11px}
 html dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px)}html .sheet{border-radius:24px;padding:20px 16px;max-height:calc(100dvh - 16px)}html .sheethead h2{font-size:22px}html .sheetfoot{bottom:-20px;padding-bottom:env(safe-area-inset-bottom)}
 html .sectionhead h2{font-size:22px}.quick-shelf-heading h2{font-size:17px}html .delivery-card{padding:16px}html .delivery-actions .primary{flex:1 1 100%}
}
@media(prefers-reduced-motion:reduce){html dialog[open] .sheet{animation:none}html button,html .btn,html .iconbtn{transition:none}}
@media print{.quick-shelf,.work-context-bar,.workbench-heading,.signal-help{display:none!important}}

html .count-tools{margin-top:24px;border:1px solid var(--ui-line);border-radius:16px;background:#fff}
html .count-tools>summary{padding:16px;min-height:48px;cursor:pointer;font-size:14px;font-weight:650;color:#38556d}
html .count-tools .count-entry{border:0;margin:0;box-shadow:none}

.workbench-heading-tools{display:flex;gap:10px;align-items:center;color:var(--ui-muted);font-size:13px;flex-shrink:0}
.workbench-heading-tools .btn{font-size:13px;min-height:44px;padding:0 12px;background:#fff}
html #dialog .quick-shelf{margin:0}
html #dialog .quick-shelf-heading{display:none}
html #dialog .quick-shelf-grid{grid-template-columns:1fr}
@media(max-width:600px){.workbench-heading-tools{gap:4px;flex-direction:column;align-items:flex-end}.workbench-heading-tools>span{font-size:11px}.workbench-heading-tools .btn{font-size:12px;min-height:40px;padding:0 10px}}
@media(max-width:600px){
 html .top .brandrow{flex-wrap:nowrap;flex-direction:row;align-items:center;gap:8px}
 html .top .brand{flex:1 1 auto;width:auto;min-width:0;max-width:none}
 html .top .brand>div:last-child{min-width:0}
 html .top .brand h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 html .top .headtools{width:auto;flex:0 0 auto;justify-content:flex-end;gap:6px}
 html .top .headtools .iconbtn{min-width:44px}
}

/* R62.44: action hierarchy shared by every workbench; risk colors keep their meaning. */
html{--role-accent:#24577e;--role-soft:#eaf2f9}
:root[data-role="店长"]{--role-accent:#24577e;--role-soft:#eaf2f9;--role-accent-soft:#eaf2f9;--role-accent-rgb:36,87,126}
:root[data-role="仓库"]{--role-accent:#24685f;--role-soft:#e8f4ef;--role-accent-soft:#e8f4ef;--role-accent-rgb:36,104,95}
:root[data-role="厨房"]{--role-accent:#875328;--role-soft:#faf0e4;--role-accent-soft:#faf0e4;--role-accent-rgb:135,83,40}
:root[data-role="厨师"]{--role-accent:#8a4c17;--role-soft:#fff4e6;--role-accent-soft:#fff4e6;--role-accent-rgb:138,76,23}
:root[data-role="备菜"]{--role-accent:#486c36;--role-soft:#edf4e8;--role-accent-soft:#edf4e8;--role-accent-rgb:72,108,54}
:root[data-role="采购"]{--role-accent:#325c93;--role-soft:#ebf1fa;--role-accent-soft:#ebf1fa;--role-accent-rgb:50,92,147}
:root[data-role="配送员"]{--role-accent:#246b7c;--role-soft:#e8f4f7;--role-accent-soft:#e8f4f7;--role-accent-rgb:36,107,124}
:root[data-role="财务"]{--role-accent:#59558c;--role-soft:#f0eef8;--role-accent-soft:#f0eef8;--role-accent-rgb:89,85,140}
html .top{border-top:3px solid var(--role-accent)}
html .tabs .tab[aria-selected=true],html .bottomnav button.active{background:var(--role-soft);color:var(--role-accent);font-weight:750}
html .brand .logo{background:var(--role-accent);color:#fff}
html .btn.primary:not(.danger):not(.negative):not(:disabled){background:var(--role-accent);border-color:var(--role-accent);color:#fff}
html .btn:disabled,html button:disabled{cursor:not-allowed;box-shadow:none}
html button:focus-visible,html summary:focus-visible,html input:focus-visible,html select:focus-visible,html textarea:focus-visible{outline:3px solid #2674bb;outline-offset:3px}
html .simple-task-action{background:#f8fafc;border-left:1px solid var(--ui-line)}
html .simple-task-action .next-step-label{color:#304858;font-weight:700}
html .simple-task[data-signal=critical] .simple-task-action{background:#fff5f3}
html .simple-task[data-signal=warning] .simple-task-action{background:#fffaf0}
html .simple-task[data-signal] .simple-task-action .task-primary:not(:disabled){background:var(--role-accent);border-color:var(--role-accent)}
html .workbench-heading p{max-width:38em;line-height:1.6}
.settings-finder{padding:18px;background:#fff;border:1px solid var(--ui-line);border-radius:18px;margin:0 0 18px}
.settings-finder>label{display:block;font-size:16px;font-weight:700;margin-bottom:10px}
.settings-finder>div{display:flex;align-items:center;gap:8px}
.settings-finder input{flex:1;min-width:0}
.settings-finder .btn{flex-shrink:0;min-height:48px}
#settingsSearchResults{margin-bottom:20px}
#settingsSearchResults>.configuration-object-card{margin-bottom:10px;width:100%}
#settingsSearchResults>p{font-size:14px;color:var(--ui-muted);line-height:1.6}
html .simple-settings>details>summary{min-height:68px}
html .simple-settings>details[open]>summary{background:var(--role-soft);color:var(--role-accent)}
html .simple-settings>details[open]>summary>span[aria-hidden]{font-size:0}
html .simple-settings>details[open]>summary>span[aria-hidden]::after{content:'−';font-size:22px}
html [hidden]{display:none!important}
html .sheethead .desc{max-width:56em}
html .field:has([aria-invalid=true]){border-radius:12px;background:#fff5f3}
html .input[aria-invalid=true],html .select[aria-invalid=true],html .textarea[aria-invalid=true]{border:2px solid #b43b32}
@media(max-width:600px){
 html .simple-task-action{border-left:0;border-top:1px solid var(--ui-line);padding-top:12px}
 .settings-finder{padding:14px;margin-bottom:14px}.settings-finder>div{flex-wrap:wrap}.settings-finder input{flex-basis:100%}
 html .workbench-heading{align-items:flex-start;gap:8px}html .workbench-heading h2{font-size:25px}
 html .quick-tile small,html .simple-task-detail small{font-size:13px}
 html .task-stage-tabs button{font-size:13px;min-height:46px}
 html .bottomnav button.active{box-shadow:inset 0 3px var(--role-accent)}
}
@media print{.settings-finder,#settingsSearchResults{display:none!important}}

/* R62.45: task-first density and stable mobile navigation. */
html .bottomnav{grid-template-columns:repeat(4,minmax(0,1fr))}
html .bottomnav button{position:relative;display:flex;align-items:center;justify-content:center;gap:4px;min-width:0}
html .bottomnav .nav-label{white-space:nowrap}
html .bottomnav button .count{position:absolute;top:1px;right:5px;margin:0;min-width:17px;line-height:17px;padding:0 4px;font-size:10px;border-radius:10px}
html .bottomnav button .reference-count{background:#edf0f3;color:#58616c}
html .bottomnav button.active{box-shadow:none;background:var(--role-soft)}
html .bottomnav button:only-child{grid-column:1/-1}
.setup-disclosure{background:#fff;border:1px solid var(--ui-line,#dce3e8);border-radius:16px;padding:14px 16px;margin:16px 0}
.setup-disclosure summary{font-weight:600;color:var(--ui-muted,#536677);cursor:pointer;min-height:28px}
.setup-disclosure h3{font-size:18px;line-height:1.45}.setup-disclosure p{font-size:14px;line-height:1.6}
.recipe-processing{grid-column:1/-1;min-width:0;border-top:1px solid #e2e6ea;padding-top:12px}
.recipe-processing>summary{display:flex;justify-content:space-between;gap:12px;align-items:center;min-height:44px;cursor:pointer;font-size:14px;font-weight:650}
.recipe-processing>summary:after{content:'›';font-size:20px}.recipe-processing[open]>summary:after{content:'⌄'}
.recipe-processing>summary small{margin-left:auto;font-weight:400;color:#58616c}
.recipe-processing .field{margin-top:12px}
html .recipe-line-heading{align-items:start}html .recipe-line-heading .rowbuttons{gap:4px}
html .recipe-editor-line{padding:16px;border-radius:16px;box-shadow:none}
html .recipe-ready-row{font-size:11px}html .recipe-editor-line .recipe-line-heading small{font-size:12px}
@media(max-width:560px){
 html .bottomnav{padding:6px 8px calc(6px + env(safe-area-inset-bottom));min-height:62px}
 html .bottomnav button{font-size:12px;min-height:48px;padding:12px 2px 4px}
 html .workbench-empty{padding:24px 16px}html .quick-tile{box-shadow:none;border-radius:16px}
 html .module-menu-item{grid-template-columns:minmax(0,1fr) auto;border-radius:0;box-shadow:none;padding:14px 4px;border:0;border-bottom:1px solid #e2e6ea}
 html .module-menu-list{gap:0}html .module-menu-icon{display:none}
 html .module-menu-copy small{font-size:13px}html .module-menu-copy b{font-size:17px}
 html .recipe-line-quick{gap:10px}html .recipe-line-heading .rowbuttons .btn{padding:0 8px;min-height:36px;font-size:12px}
 html .recipe-editor-head .desc{font-size:13px}html .recipe-guide{margin-bottom:16px}
}
@media(pointer:coarse){#dialogTitle[tabindex="-1"]:focus{outline:none}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}html .sheet,html .bottomnav,html .btn{animation:none;transition:none}}

/* R62.46: one scroll region, stable actions, task-oriented form hierarchy. */
html .settings-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.settings-directory-group{min-width:0}.settings-directory-group h3{margin:0 0 10px;font-size:14px;color:var(--ui-muted);font-weight:600}
.settings-directory-group>div{background:#fff;border:1px solid var(--ui-line);border-radius:16px;overflow:hidden}
html .settings-directory .configuration-object-card{width:100%;margin:0;border:0;border-radius:0;box-shadow:none;padding:16px;min-height:76px}
html .settings-directory .configuration-object-card+.configuration-object-card{border-top:1px solid var(--ui-line)}
html .settings-directory .configuration-object-card b{font-size:16px;font-weight:650}html .settings-directory .configuration-object-card small{font-size:13px;line-height:1.5}
html .bottomnav button{padding:8px 4px;min-height:48px;font-size:14px;font-weight:600}
html .bottomnav button .count{top:0;right:1px;min-width:18px;font-size:11px;line-height:18px}
html .bottomnav button.active{background:var(--role-accent-soft)}
html #dialog:has(.recipe-editor-form){width:min(720px,calc(100vw - 32px));height:min(850px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);margin:auto}
html #dialog:has(.recipe-editor-form) #sheet{display:flex;flex-direction:column;height:100%;max-height:100%;width:100%;padding:0;overflow:hidden;border-radius:inherit}
html #dialog .recipe-editor-head{position:static;flex:0 0 auto;margin:0;padding:16px 20px;align-items:center}
html #dialog .recipe-editor-head h2{font-size:21px;padding:0;margin:0;line-height:1.3}
html #dialog .recipe-editor-head .desc{font-size:13px;margin-top:4px;line-height:1.45}
html #dialog .recipe-editor-head .close{width:44px;height:44px;min-width:44px}
html #dialog .recipe-editor-form{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;margin:0;padding:0}
html #dialog .recipe-guide{position:static;flex:0 0 auto;display:grid;gap:4px;margin:0;padding:8px 16px;border-bottom:1px solid var(--ui-line);background:#fff;box-shadow:none}
html #dialog .recipe-guide li{min-width:0;border:0;border-radius:10px;background:#f4f6f8;padding:0;color:#667085;box-shadow:none}
html #dialog .recipe-guide li.active{outline:none;background:var(--role-soft);color:var(--role-accent)}
html #dialog .recipe-guide li.complete{background:#f0f6f3;color:#326951}
html #dialog .recipe-guide li button{justify-content:center;padding:8px 4px;min-height:44px;font-size:13px;gap:6px;font-weight:600;white-space:nowrap}
html #dialog .recipe-guide li b{font-size:12px;min-width:20px;width:20px;height:20px;line-height:20px;border-radius:50%;padding:0;background:transparent;color:inherit}
html #dialog .recipe-guide li.active b{background:var(--role-accent);color:#fff}
html #dialog .recipe-step-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:20px;scroll-padding:16px;scrollbar-gutter:stable}
html #dialog [data-recipe-step]{margin:0;padding:0;background:transparent;border:0;box-shadow:none;gap:14px}
html #dialog [data-recipe-step]>h3{font-size:18px;line-height:1.4;margin:0 0 10px}
html #dialog [data-recipe-step]>.meta{font-size:13px;line-height:1.5;margin:0 0 16px}
html #dialog .recipe-editor-lines{gap:16px;margin-bottom:16px}
html #dialog .recipe-editor-line{padding:0;border:1px solid var(--ui-line);border-radius:14px;overflow:visible;background:#fff;box-shadow:none}
html #dialog .recipe-line-heading{display:flex;flex-direction:row;align-items:center;gap:8px;padding:10px 12px;background:#f7f9fb;border-radius:14px 14px 0 0;border-bottom:1px solid var(--ui-line)}
html #dialog .recipe-line-heading>div:nth-child(2){flex:1;min-width:0;gap:0}
html #dialog .recipe-line-heading b{font-size:15px;line-height:1.4;overflow-wrap:anywhere}
html #dialog .recipe-line-index{width:24px;height:24px;min-width:24px;border-radius:8px;font-size:12px;background:#e7edf1;color:#47606f;padding:0;display:grid;place-items:center}
html #dialog .recipe-line-heading .rowbuttons{display:flex;flex:0 0 auto;width:auto;gap:0;margin:0}
html #dialog .recipe-line-heading .rowbuttons .btn{min-height:44px;min-width:44px;padding:6px;font-size:12px;background:transparent;border:0;box-shadow:none}
html #dialog .recipe-line-quick{display:grid;grid-template-columns:1fr;gap:14px;margin:0;padding:14px}
html #dialog .recipe-line-quick>.field{margin:0;gap:6px;padding:0;background:none;border:0}
html #dialog .recipe-line-quick .field label{font-size:14px;font-weight:600}
html #dialog .recipe-line-quick .wide{grid-column:1/-1}
html #dialog .recipe-processing{padding:0;border-top:1px solid var(--ui-line)}
html #dialog .recipe-processing>summary{padding:10px 0;min-height:44px;line-height:1.5;display:flex;font-size:14px;gap:8px}
html #dialog .recipe-processing>summary small{font-size:12px;max-width:45%;text-align:right}
html #dialog .recipe-processing .field{margin-top:10px}
html #dialog .process-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
html #dialog .recipe-line-advanced{margin:0;padding:0 14px 12px;border-top:1px solid var(--ui-line)}
html #dialog .recipe-line-advanced>summary{padding:12px 0 0;font-size:13px;line-height:1.5;min-height:44px;color:var(--ui-muted)}
html #dialog .recipe-line-advanced>summary small{display:block;font-size:12px;font-weight:400}
html #dialog .recipe-save-status{font-size:12px;margin:16px 0 0;color:var(--ui-muted)}
html #dialog .recipe-editor-foot{position:static;flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;margin:0;padding:12px 20px calc(12px + env(safe-area-inset-bottom));width:100%;box-shadow:0 -1px var(--ui-line);gap:10px}
html #dialog .recipe-editor-foot>div{display:flex;gap:8px;margin-left:auto;min-width:0}
html #dialog .recipe-editor-foot .btn{width:auto;min-width:74px;min-height:46px;padding:10px 14px;white-space:nowrap;font-size:14px}
html #dialog .recipe-editor-line.has-error{border:2px solid #b43b32}
@media(max-width:600px){
 html .settings-directory{grid-template-columns:1fr;gap:24px}
 html #dialog:has(.recipe-editor-form){width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;margin:0}
 html #dialog .recipe-editor-head{padding:12px 16px}
 html #dialog .recipe-step-body{padding:16px;scrollbar-gutter:auto}
 html #dialog .recipe-editor-foot{padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
 html #dialog .recipe-editor-foot .btn{min-width:66px;padding:10px 12px}
 html #dialog .recipe-guide{padding:8px 12px}
}

html #dialog .process-presets{padding:0;background:transparent;border:0}html #dialog .process-presets b{grid-column:1/-1;font-size:13px}html #dialog .process-presets button{width:100%;min-height:44px;font-size:13px;padding:8px 6px}

/* R62.47: a single identity header, stable icon navigation, and a compact work queue. */
html{--ui-canvas:#f5f6f8;--ui-line:#e0e4e9;--ui-radius:16px}
html .top{border-top:0}
html .brand .logo{width:36px;height:36px;border-radius:11px;flex:0 0 36px;font-size:13px;box-shadow:none}
html .brand-stack{min-width:0}
html .top .brand-context{display:flex;align-items:center;gap:7px;min-height:26px;max-width:100%;text-align:left}
html .brand-context>span{color:var(--ui-muted);font-size:15px}
html .brand-meta{display:flex;align-items:center;gap:9px;font-size:12px;line-height:1.3;color:var(--ui-muted);min-width:0}
html #workbenchSubtitle{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:8em}
html .header-presence{font:inherit;color:#316c58;background:none;border:0;padding:6px 0;min-height:30px;cursor:pointer;white-space:nowrap}
html .header-presence::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;margin-right:5px;vertical-align:1px}
html .header-presence[data-status="暂离"],html .header-presence[data-status="下班"]{color:#8b5517}
html .presence-notice{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border:1px solid #e3ca99;background:#fff8eb;border-radius:12px;margin:0 0 16px;font-size:13px}
html .workbench-heading{margin:0 0 18px}
html .workbench-heading h2{font-size:26px;font-weight:700;line-height:1.3;letter-spacing:-.4px}
.heading-count{font-size:15px;font-weight:500;color:var(--ui-muted);margin-left:5px;font-variant-numeric:tabular-nums}
html .workbench-empty{min-height:0;display:grid;grid-template-columns:32px 1fr;text-align:left;padding:20px;gap:4px 12px;border-radius:16px}
html .workbench-empty .empty-symbol{grid-row:1/3;width:32px;height:32px;font-size:18px;align-self:center}
html .workbench-empty h3{font-size:17px}
html .workbench-empty p{max-width:none;font-size:13px;grid-column:2}
html .workbench-empty>.btn{grid-column:2;justify-self:start}
html .simple-workbench .setup-disclosure{padding:0;background:transparent;border:0;border-radius:0;margin:12px 0}
html .setup-disclosure>summary{min-height:44px;display:flex;align-items:center;font-size:13px;color:#6e5a32;gap:8px}
html .setup-disclosure>summary::before{content:'i';font:600 12px Georgia,serif;border:1px solid #9d8763;border-radius:50%;width:16px;height:16px;text-align:center;line-height:16px}
html .setup-disclosure h3{font-size:17px}
html .quick-shelf{margin:22px 0 0}
html .quick-shelf-grid{gap:0;background:#fff;border:1px solid var(--ui-line);border-radius:16px;overflow:hidden}
html .quick-tile{border:0;border-radius:0;min-height:80px;padding:16px;box-shadow:none}
html .quick-tile:nth-child(n+3){border-top:1px solid var(--ui-line)}
html .quick-tile:nth-child(even){border-left:1px solid var(--ui-line)}
html .quick-tile b{font-size:16px;font-weight:600}
html .quick-shelf-heading>span{display:none}
html .simple-task-detail{padding:18px;gap:8px}
html .focus-task .simple-task-detail strong{font-size:23px}
html .simple-task-action{padding:18px}
html .focus-task-eyebrow{padding:10px 18px}
html .dish{border-radius:16px;box-shadow:none;padding:18px}
html .dishhead{align-items:center;gap:12px}
html .dishhead .dishrank{display:none}
html .dish-summary{min-width:0;flex:1}
html .dish-summary .name{font-size:18px;line-height:1.5;overflow-wrap:anywhere}
html .dish-tags{gap:6px;margin:6px 0}
html .dish-tags .badge{background:#f2f4f6;color:#55606c;border:0;font-size:12px;padding:3px 7px;border-radius:5px;white-space:normal;overflow-wrap:anywhere}
html .dish-tags .badge.warn{background:#fff5e4;color:#865713}
html .dish-summary .meta{font-size:12px;line-height:1.5}
.recipe-card-detail{margin-top:12px;border-top:1px solid var(--ui-line)}
.recipe-card-detail>summary{padding:12px 0;min-height:44px;font-size:13px;color:var(--ui-muted);cursor:pointer}
html .module-menu-item{border-radius:12px;box-shadow:none}
html .sectionhead h2{font-size:25px;line-height:1.35;letter-spacing:-.4px}
html .sectionhead p{font-size:14px;line-height:1.6;max-width:48em}
html .btn,html .iconbtn,html .quick-tile,html .module-menu-item{-webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:background-color 120ms,color 120ms}
html .btn:active:not(:disabled),html .quick-tile:active,html .module-menu-item:active{filter:brightness(.94)}
html .input,html .select,html .textarea{font-size:16px;min-height:48px;border-radius:12px}
html .sheethead .close{min-width:44px;min-height:44px}
html .bottomnav button{display:flex;flex-direction:column;gap:4px;border-radius:0;color:#626d79;font-size:11px;font-weight:500;padding:6px 2px;min-height:56px;line-height:1.2}
html .bottomnav button.active{background:transparent;color:var(--role-accent);font-weight:650}
.nav-icon{display:block;position:relative;width:24px;height:24px;flex:0 0 24px}
.nav-icon svg{display:block;width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
html .bottomnav button>.nav-icon{overflow:visible}
html .bottomnav .nav-icon .count{top:-4px;right:-15px;font:600 10px/16px -apple-system,BlinkMacSystemFont,sans-serif;padding:0 4px;min-width:16px;white-space:nowrap;border:1px solid white;box-sizing:content-box;background:#b42318;color:#fff}
html .bottomnav button .reference-count{background:#e8edf2;color:#445366}
html .settings-finder{padding:0;border:0;background:transparent;box-shadow:none}
html .settings-finder>label{font-size:13px;font-weight:500;color:var(--ui-muted);margin-bottom:8px}
@media(max-width:600px){
 html .topin{padding:10px 16px}
 html .brand{gap:8px}
 html .brand h1{font-size:16px;font-weight:700;letter-spacing:0;line-height:1.35}
 html .brand-meta{font-size:11px;gap:7px}
 html .headtools{gap:5px}
 html .headtools .iconbtn{min-width:44px;min-height:44px;padding:7px;border:0;background:#f0f3f6;border-radius:12px;font-size:12px}
 html .headtools .signal{display:none}
 html main#app{padding:20px 16px calc(94px + env(safe-area-inset-bottom))}
 html .workbench-heading h2,html .sectionhead h2{font-size:24px}
 html .workbench-heading p{font-size:13px;line-height:1.5;margin-top:5px}
 html .bottomnav{background:#fff;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none;padding:3px 8px calc(3px + env(safe-area-inset-bottom));border-top:1px solid var(--ui-line)}
 html .task-stage-tabs{border-radius:11px;padding:3px;gap:2px}
 html .task-stage-tabs button{font-size:12px;min-height:40px;padding:7px 4px;border-radius:8px}
 html .quick-tile{min-height:90px;padding:14px}
 html .quick-tile small{font-size:12px;line-height:1.5}
 html .quick-tile i{font-size:18px}
 html .dish{padding:16px}
 html .recipe-vault .dishhead{display:flex;flex-wrap:wrap;gap:10px}
 html .recipe-vault .dish-summary{flex:1 0 100%;width:100%}
 html .recipe-vault .dishhead>.btn{flex:1 1 120px;width:auto;min-width:0;min-height:44px;font-size:14px}
 html .sectionhead .actions{gap:8px}
 html .sectionhead .actions>.btn{min-height:44px;font-size:14px}
 html .sheethead h2{font-size:21px}
 html #dialog .sheethead .desc{font-size:13px;line-height:1.5}
}
@media(max-width:350px){html .topin{padding:8px 10px}html .brand .logo{display:none}html main#app{padding-left:12px;padding-right:12px}}
@media(prefers-reduced-motion:reduce){html .btn,html .iconbtn,html .quick-tile,html .module-menu-item{transition:none}}

/* Access expires without closing the recipe editor or discarding a photo/draft. */
.recipe-access-shield{position:fixed;inset:0;z-index:2147483000;background:#f5f6f8;display:grid;place-items:center;padding:max(24px,env(safe-area-inset-top)) 24px max(24px,env(safe-area-inset-bottom));box-sizing:border-box}
.recipe-access-shield>div{width:100%;max-width:420px}.recipe-access-shield h2{font-size:24px;line-height:1.3}.recipe-access-shield p{color:#52606b;line-height:1.7;margin:16px 0 24px}.recipe-access-shield button{width:100%;min-height:48px}

[data-recipe-shield-hidden]{display:none!important}
.recipe-access-shield button+button{margin-top:12px}

/* Shared menu photographs keep geometry stable while loading. */
.dish-photo{display:block;width:64px;height:64px;aspect-ratio:1;object-fit:cover;flex:0 0 64px;border-radius:12px;background:#edf1ef;border:1px solid #dfe6e1}
.dish-photo[hidden]{display:none}.recipe-dish-photo:empty{display:none}.recipe-dish-photo .dish-photo{width:96px;height:96px}.daily-prep-heading h3{min-width:0;flex:1}.menu-lifecycle-row>.dish-photo{grid-row:auto}.boss-product-row .dish-photo{width:36px;height:36px;float:left;margin:0 8px 4px 0;border-radius:7px}.source-pending-row .rowbuttons{gap:8px}.source-pending-row .meta{overflow-wrap:anywhere}.source-pending-row .name{line-height:1.45}

@media(max-width:760px){html .recipe-vault .dish-photo+.dish-summary{flex:1 1 calc(100% - 80px);width:auto}}

.catalog-reference{margin-top:16px;border:1px solid #dfe6e2;border-radius:18px;background:#fff;overflow:hidden}.catalog-reference>summary{min-height:58px;padding:13px 16px;display:flex;align-items:center;justify-content:space-between;gap:14px;cursor:pointer;list-style:none}.catalog-reference>summary::-webkit-details-marker{display:none}.catalog-reference>summary:focus-visible{outline:3px solid rgba(38,108,246,.28);outline-offset:-3px}.catalog-reference>summary span{display:grid;gap:3px;min-width:0}.catalog-reference>summary b{font-size:14px}.catalog-reference>summary small{color:#68736e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.catalog-reference>summary em{font-size:12px;font-style:normal;color:#1f6f5a;font-weight:800}.catalog-reference[open]>summary{border-bottom:1px solid #e5e9e7}.catalog-reference[open]>summary em{font-size:0}.catalog-reference[open]>summary em:after{content:'收起';font-size:12px}.catalog-reference-body{display:grid;gap:10px;padding:14px 16px}.catalog-reference-body p{margin:0;color:#68736e;font-size:13px;line-height:1.55}
.smart-stock-groups{display:grid;gap:14px;min-width:0}.smart-stock-group{min-width:0;border:1px solid rgba(31,42,38,.1);border-radius:22px;background:#fff;overflow:hidden;box-shadow:0 1px 2px rgba(18,37,31,.03)}.smart-stock-group>summary{display:list-item;box-sizing:border-box;min-height:68px;padding:22px 20px;cursor:pointer;list-style-position:inside;outline:none}.smart-stock-group>summary::marker{color:#1f6f5a}.smart-stock-group>summary:hover{background:rgba(31,111,90,.045)}.smart-stock-group>summary:focus-visible{box-shadow:inset 0 0 0 3px rgba(38,108,246,.28)}.smart-stock-group[open]>summary{border-bottom:1px solid rgba(31,42,38,.08)}.smart-group-title{font-size:18px;font-weight:850;color:#17231e;min-width:0;overflow-wrap:anywhere}.smart-group-meta{float:right;font-size:13px;color:#68736e;text-align:right;white-space:nowrap;margin-top:3px}.smart-group-chevron{display:none}.smart-group-body{display:grid;gap:10px;padding:12px;background:#f5f7f6}.smart-group-subbody{padding:10px}.smart-stock-class>summary{background:#edf5f2}.smart-stock-l1{border-radius:18px}.smart-stock-l1>summary{min-height:60px;padding:19px 17px;background:#fbfcfb}.smart-stock-l1 .smart-group-title{font-size:16px}.smart-stock-l2{border-radius:16px;box-shadow:none}.smart-stock-l2>summary{min-height:54px;padding:16px 15px}.smart-stock-l2 .smart-group-title{font-size:15px}.smart-stock-l2>.smart-stock-list{padding:10px;background:#f8faf9}.smart-stock-list{display:grid;gap:12px;min-width:0}.smart-stock-row{display:grid;grid-template-columns:62px minmax(0,1fr) auto;align-items:center;gap:16px;padding:16px 18px;background:#fff;border:1px solid rgba(31,42,38,.09);border-radius:22px;box-shadow:0 1px 2px rgba(18,37,31,.03);min-width:0}
.ingredient-thumb,.ingredient-fallback{width:62px;height:62px;border-radius:17px;display:grid;place-items:center;object-fit:cover;background:#eef5f2;color:#1f5f50;font-size:24px;font-weight:800}.smart-stock-main{min-width:0}.smart-stock-main .name{font-size:18px;font-weight:800}.smart-stock-main .meta{font-size:13px;color:#6d746f;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.smart-badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:9px}
.catalog-searchbox{display:grid;gap:8px;min-width:0}.catalog-searchbox>label{font-weight:800}.catalog-searchline{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;min-width:0}.catalog-searchline>*{min-width:0}.catalog-shortcuts{display:flex;flex-wrap:wrap;gap:7px;padding:15px 0 10px;min-width:0}.catalog-shortcuts button{border:1px solid #dfe3e0;background:#fff;border-radius:999px;padding:8px 13px;white-space:nowrap;font:inherit;color:#28342f;min-width:0}.catalog-results{display:grid;gap:8px;min-height:160px;max-height:min(54vh,650px);overflow:auto;padding:3px;min-width:0}.catalog-result{width:100%;min-width:0;border:1px solid #e6e8e6;background:#fff;border-radius:18px;display:grid;grid-template-columns:58px minmax(0,1fr) auto;gap:13px;align-items:center;padding:11px;text-align:left;font:inherit;color:inherit;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}.catalog-result:hover,.catalog-result:focus-visible{border-color:#7aa698;box-shadow:0 8px 24px rgba(28,76,62,.11);transform:translateY(-1px);outline:none}.catalog-result img{width:58px;height:58px;border-radius:15px;object-fit:cover;background:#eef4f1}.catalog-copy{display:grid;min-width:0}.catalog-copy b{font-size:16px}.catalog-copy small,.catalog-copy span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#7a807c;margin-top:3px}.catalog-copy span{font-size:12px;color:#1f6f5a}.catalog-state{font-size:12px;background:#16201c;color:#fff;padding:7px 10px;border-radius:999px}.catalog-state.approved{background:#e4f2ed;color:#16644f}.catalog-welcome,.catalog-empty,.catalog-loading{border:1px dashed #d6ddd9;border-radius:20px;display:grid;place-items:center;text-align:center;gap:8px;min-height:160px;padding:25px;color:#747c77}.catalog-welcome b,.catalog-empty b{font-size:20px;color:#1d2823}.catalog-manual{display:flex;justify-content:center;margin-top:14px}
.smart-item-summary{display:grid;grid-template-columns:72px minmax(0,1fr);gap:15px;align-items:center;padding:15px;background:#f4f7f5;border-radius:20px}.smart-item-summary img{width:72px;height:72px;border-radius:18px;object-fit:cover;background:#e8efeb}.smart-item-summary div{display:grid;gap:4px}.smart-item-summary b{font-size:20px}.smart-item-summary span{font-size:13px;color:#69716d}.smart-item-summary small{color:#1f6f5a}.smart-advanced{border-top:1px solid #e4e7e5;padding-top:14px}.smart-advanced summary{cursor:pointer;font-weight:750;color:#52605a;padding:6px 0 14px}.smart-advanced>.fields{margin-top:4px}.smart-complete-summary{display:grid;gap:5px;padding:16px;background:#f4f7f5;border-radius:18px}.smart-complete-summary b{font-size:20px}.smart-complete-summary span{font-weight:700}.smart-complete-summary small{color:#59645f}.input.readonly{display:flex;align-items:center;background:#f5f5f3;color:#4f5753}
.supplier-inline-summary{margin-top:9px;padding:9px 11px;border-radius:12px;font-size:12px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}.supplier-inline-summary.ready{background:#edf7f3;color:#16644f}.supplier-inline-summary.blocked{background:#fff1e8;color:#8a421e}.procurement-core,.supplier-management{border:1px solid #dfe6e2;border-radius:20px;padding:16px;background:#fbfcfb;min-width:0}.procurement-core-head,.supplier-management-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.procurement-core-head>div,.supplier-management-head>div{display:grid;gap:4px}.procurement-core-head b,.supplier-management-head b{font-size:16px}.procurement-core-head span,.supplier-management-head span{font-size:12px;color:#68736e;line-height:1.45}.supplier-relation-list{display:grid;gap:8px}.supplier-relation-card{width:100%;border:1px solid #dce3df;background:#fff;border-radius:15px;padding:12px;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;color:inherit}.supplier-relation-card.primary{border-color:#93b9ad;background:#f3faf7}.supplier-relation-card>span:first-child{display:grid;gap:4px;min-width:0}.supplier-relation-card small{font-size:11px;color:#68736e;overflow-wrap:anywhere}.supplier-price{display:grid;gap:2px;text-align:right;white-space:nowrap}.supplier-price b{font-size:17px}.supplier-empty-inline{display:grid;gap:5px;padding:14px;background:#fff4eb;border:1px solid #f2d6c0;border-radius:14px}.supplier-empty-inline span{font-size:12px;color:#7f563d}.supplier-price-history{display:grid;gap:7px}.supplier-price-history h3{font-size:15px;margin:0 0 4px}.supplier-price-history>div{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #e5e8e6;padding-top:8px}.supplier-price-history>div>span{display:grid;gap:2px}.supplier-price-history>div>span:last-child{text-align:right}.supplier-price-history small{font-size:11px;color:#68736e}.supplier-hub-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0 0 18px}.supplier-hub-summary>div{display:grid;gap:5px;padding:16px;border:1px solid #e0e4e2;border-radius:16px;background:#fff}.supplier-hub-summary b{font-size:24px}.supplier-hub-summary span{font-size:12px;color:#68736e}.supplier-hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.supplier-hub-card{border:1px solid #e0e4e2;border-radius:20px;background:#fff;padding:17px;min-width:0}.supplier-hub-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.supplier-hub-head>div{min-width:0}.supplier-hub-head h3{font-size:19px;margin:7px 0 3px;overflow-wrap:anywhere}.supplier-hub-head p{font-size:12px;color:#68736e;margin:0;overflow-wrap:anywhere}.supplier-stable-id{font-size:11px;color:#1f6f50;background:#eaf5f1;border-radius:999px;padding:4px 7px}.supplier-hub-card dl{display:grid;gap:8px;margin:14px 0}.supplier-hub-card dl>div{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #eef0ef;padding-top:8px}.supplier-hub-card dt{font-size:12px;color:#68736e}.supplier-hub-card dd{margin:0;font-size:12px;font-weight:700;text-align:right;overflow-wrap:anywhere}
.catalog-shortcut-panel{border:0;margin:6px 0 0;min-width:0}.catalog-shortcut-panel>summary{cursor:pointer;color:#52605a;font-size:13px;font-weight:750;padding:8px 0}.ingredient-request-queue{display:grid;gap:10px;margin:0 0 20px}.ingredient-request-card{display:grid;grid-template-columns:64px minmax(0,1fr) auto;align-items:center;gap:14px;padding:15px;border:1px solid #e0e4e2;border-radius:20px;background:#fff;min-width:0}.ingredient-request-card>div{min-width:0}.ingredient-request-card h3{margin:7px 0 4px;font-size:18px;overflow-wrap:anywhere}.ingredient-request-card p,.ingredient-request-card small{display:block;margin:0;color:#68736e;overflow-wrap:anywhere}.ingredient-request-media,.ingredient-request-media img{width:64px;height:64px;border-radius:17px}.ingredient-request-media{display:grid;place-items:center;background:#edf6f2;color:#176a56;font-size:24px;font-weight:850}.ingredient-request-media img{object-fit:cover}.ingredient-request-card .rowbuttons{justify-content:flex-end;min-width:0}
@media(max-width:680px){.catalog-reference>summary{padding:11px 13px}.smart-stock-group>summary{min-height:62px;padding:14px 15px}.smart-group-meta{float:none;display:block;text-align:left;white-space:normal;line-height:1.35;margin:4px 0 0 18px}.smart-group-body{padding:8px;gap:8px}.smart-stock-l1>summary,.smart-stock-l2>summary{padding:12px 13px}.smart-stock-l2>.smart-stock-list{padding:8px}.smart-stock-row{grid-template-columns:52px minmax(0,1fr);padding:14px}.ingredient-thumb,.ingredient-fallback{width:52px;height:52px;border-radius:14px}.smart-stock-row .rowbuttons{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.smart-stock-row .rowbuttons .btn{padding-inline:4px;min-width:0}.catalog-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.catalog-shortcuts button{width:100%;padding:9px 6px;overflow:hidden;text-overflow:ellipsis}.catalog-results{max-height:50vh}.catalog-result{grid-template-columns:50px minmax(0,1fr)}.catalog-result img{width:50px;height:50px}.catalog-result .catalog-state{grid-column:1/-1;justify-self:start}.catalog-copy span{max-width:100%}.smart-item-summary{grid-template-columns:60px minmax(0,1fr)}.smart-item-summary img{width:60px;height:60px}.procurement-core-head,.supplier-management-head{display:grid}.procurement-core-head .btn,.supplier-management-head .btn{width:100%}.supplier-relation-card{align-items:flex-start}.supplier-hub-summary{grid-template-columns:1fr 1fr}.supplier-hub-grid{grid-template-columns:1fr}.supplier-hub-card dl>div{display:grid}.supplier-hub-card dd{text-align:left}.supplier-price-history>div{display:grid}.supplier-price-history>div>span:last-child{text-align:left}.ingredient-request-card{grid-template-columns:52px minmax(0,1fr)}.ingredient-request-media,.ingredient-request-media img{width:52px;height:52px}.ingredient-request-card .rowbuttons{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.ingredient-request-card .rowbuttons .status-chip{grid-column:1/-1}.supplier-hub-card .rowbuttons{display:grid;grid-template-columns:1fr}.supplier-hub-card .rowbuttons .btn{width:100%;min-width:0}}
@media(max-width:360px){.smart-stock-row .rowbuttons{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-state{padding:6px 8px}.catalog-copy span{max-width:140px}}

/* Taxonomy integrity stays available without displacing the work list. */
.catalog-coverage { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: rgba(255,255,255,.78); font-size: 11px; line-height: 1.35; }
.catalog-coverage b { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; }
.catalog-coverage.warning b { background: #fff0d6; color: #7b4c00; }
.catalog-coverage span { overflow-wrap: anywhere; }
.catalog-reference .catalog-coverage{margin-top:0;color:#68736e}.catalog-reference .catalog-coverage b{background:#e7f3ef;color:#16644f}.catalog-reference .catalog-coverage.warning b{background:#fff0d6;color:#7b4c00}
@media(max-width:680px){
  .catalog-coverage { display: grid; gap: 5px; margin-top: 8px; }
  .catalog-coverage b { justify-self: start; }
}

/* R58 UI boundary guard: verified overflow, hierarchy and empty-state fixes. */
.supplier-duplicate-hint[hidden],
[data-supplier-kind][hidden],
.dialog-scroll-hint[hidden] {
  display: none !important;
}

dialog {
  position: fixed;
}

dialog .close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #e4e7ec;
  border-radius: 50%;
  background: #f7f8f9;
  box-shadow: none;
  color: #25282d;
}

dialog .close:focus-visible {
  outline: 3px solid rgba(23, 107, 87, .24);
  outline-offset: 2px;
}

.dialog-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 12;
  translate: -50% 0;
  padding: 7px 12px;
  border: 1px solid rgba(21, 92, 72, .18);
  border-radius: 999px;
  background: rgba(238, 249, 245, .96);
  box-shadow: 0 5px 18px rgba(18, 56, 45, .12);
  color: #176b57;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

dialog:not(:has(.sheetfoot)) .dialog-scroll-hint {
  bottom: calc(18px + env(safe-area-inset-bottom));
}

.settings-identity .role-workspace-control {
  min-width: 0;
  width: auto;
}

.settings-identity .role-workspace-trigger {
  display: flex;
  min-width: 138px;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--role-accent) 22%, #d0d5dd);
  border-radius: 12px;
  background: var(--role-accent-soft);
  color: var(--role-accent);
  cursor: pointer;
}

.settings-identity .role-workspace-trigger span,
.settings-identity .role-workspace-trigger b {
  font-size: 12px;
}

.role-choice-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f4f6f7;
}

.role-choice-summary b {
  color: #20242a;
  font-size: 14px;
}

.role-choice-summary span {
  color: #667085;
  font-size: 12px;
}

.role-choice-scroll-note {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #edf7f3;
  color: #176b57;
  font-size: 12px;
  font-weight: 760;
}

.command-clearline.command-idle {
  min-height: 56px;
  border-color: #dce7e2;
  background: #f8fbfa;
  box-shadow: none;
}

.command-idle > span {
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
}

.command-idle > span::before {
  content: "";
  grid-row: 1 / 3;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #27a37d;
  box-shadow: 0 0 0 4px #e5f5ef;
}

.command-idle button {
  min-width: auto;
  min-height: 40px;
  padding: 0 8px;
  background: transparent;
  color: #176b57;
}

.command-idle button i {
  font-style: normal;
}

.inventory-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.inventory-tools .search {
  width: 100%;
}

.inventory-refresh {
  min-width: 68px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #d7dce0;
  border-radius: 13px;
  background: #fff;
  color: #4d535a;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
}

.inventory-filters,
.inventory-location-summary,
.recipe-overview {
  overflow: clip;
  border: 1px solid #dfe3e5;
  border-radius: 14px;
  background: rgba(255,255,255,.84);
}

.inventory-filters {
  grid-column: 1 / -1;
}

.inventory-filters > summary,
.inventory-location-summary > summary,
.recipe-overview > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  color: #343a40;
  font-size: 13px;
  font-weight: 780;
  cursor: pointer;
  list-style: none;
}

.inventory-filters > summary::-webkit-details-marker,
.inventory-location-summary > summary::-webkit-details-marker,
.recipe-overview > summary::-webkit-details-marker {
  display: none;
}

.inventory-filters > summary::after,
.inventory-location-summary > summary em,
.recipe-overview > summary em {
  color: #176b57;
  font-size: 12px;
  font-style: normal;
  font-weight: 780;
}

.inventory-filters > summary::after {
  content: "展开";
}

.inventory-filters[open] > summary::after {
  content: "收起";
}

.inventory-filters > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 12px 12px;
}

.inventory-location-summary {
  margin: 10px 0;
}

.inventory-location-summary > summary span,
.recipe-overview > summary span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.inventory-location-summary > summary b,
.recipe-overview > summary b {
  font-size: 14px;
}

.inventory-location-summary > summary small,
.recipe-overview > summary small {
  color: #737a82;
  font-size: 12px;
  font-weight: 650;
}

.inventory-location-summary .location-summary {
  margin: 0;
  padding: 0 12px 12px;
}

.inventory-zero-summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0;
  padding: 9px 10px 9px 13px;
  border: 1px solid #dce7e2;
  border-radius: 14px;
  background: #f5faf8;
}

.inventory-zero-summary > span,
.inventory-empty,
.supplier-empty {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.inventory-zero-summary b,
.inventory-empty b,
.supplier-empty b {
  color: #24292e;
  font-size: 14px;
}

.inventory-zero-summary small,
.inventory-empty span,
.supplier-empty span {
  color: #71777f;
  font-size: 12px;
  line-height: 1.45;
}

.inventory-zero-summary button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #176b57;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.inventory-empty,
.supplier-empty {
  min-height: 88px;
  place-content: center;
  padding: 18px;
  border: 1px dashed #d2d8d5;
  border-radius: 16px;
  background: rgba(255,255,255,.7);
  text-align: center;
}

.recipe-vault-head {
  min-height: 44px;
  padding-block: 7px;
}

.recipe-overview {
  margin: 10px 0 12px;
}

.recipe-overview-body {
  padding: 0 12px 12px;
}

.recipe-overview-body .menu-source-summary,
.recipe-overview-body .recipe-principle {
  margin-bottom: 10px;
}

.recipe-result-grid {
  margin-top: 0;
}

@media (min-width: 701px) and (max-width: 959px) {
  .recipe-vault .sectionhead {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .recipe-vault .sectionhead .actions {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(150px, 190px) auto;
    width: 100%;
  }

  .recipe-vault .sectionhead .actions .search,
  .recipe-vault .sectionhead .actions .menu-category-filter {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 960px) {
  .recipe-vault .sectionhead {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(560px, auto);
    align-items: end;
    gap: 12px;
    margin-bottom: 10px;
  }

  .recipe-vault .sectionhead > div:first-child {
    align-self: center;
  }

  .recipe-vault .sectionhead .actions {
    display: grid;
    grid-template-columns: minmax(210px, 1fr) minmax(160px, 190px) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .recipe-vault .sectionhead .actions .search,
  .recipe-vault .sectionhead .actions .menu-category-filter {
    width: 100%;
    min-width: 0;
  }

  .recipe-vault .sectionhead .actions .btn.primary {
    white-space: nowrap;
  }
}

.recipe-watermark {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 110px 70px;
  opacity: .032;
}

dialog .recipe-editor-foot {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin-top: 18px;
}

@media (max-width: 700px) {
  .dialog-scroll-hint {
    bottom: calc(132px + env(safe-area-inset-bottom));
  }

  dialog:not(:has(.sheetfoot)) .dialog-scroll-hint {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }

  dialog .sheet > form,
  dialog .sheet > .info-body,
  dialog .sheet > .dialog-body {
    padding-bottom: 2px;
  }

  .role-choice-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .role-choice {
    min-height: 60px;
    padding: 10px 12px;
  }

  .inventory-tools {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .inventory-filters > div {
    grid-template-columns: 1fr;
  }

  .inventory-zero-summary {
    align-items: flex-start;
  }

  .recipe-vault-head {
    position: static;
    align-items: center;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 8px;
    padding: 7px 10px;
  }

  .recipe-vault-head .btn {
    width: auto;
    min-height: 38px;
    margin-left: auto;
  }

  .recipe-vault .sectionhead {
    gap: 8px;
    margin-bottom: 8px;
  }

  .recipe-vault .sectionhead h2 {
    font-size: 19px;
  }

  .recipe-vault .sectionhead p {
    display: none;
  }

  .recipe-vault .sectionhead .actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 7px;
  }

  .recipe-vault .sectionhead .actions .search {
    min-width: 0;
  }

  .recipe-vault .sectionhead .actions .menu-category-filter {
    width: 104px;
  }

  .recipe-vault .sectionhead .actions .btn.primary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .recipe-vault .list-segments {
    margin-block: 8px;
  }

  .recipe-vault .list-segments button {
    min-width: 96px;
    min-height: 40px;
    padding: 6px 8px;
  }

  .recipe-vault .list-scope-note.compact {
    min-height: 40px;
    margin: 6px 0 8px;
    padding: 7px 10px;
  }

  .recipe-overview {
    margin-block: 8px;
  }

  .recipe-overview > summary {
    min-height: 46px;
    padding-block: 7px;
  }

  .recipe-watermark {
    inset: 150px 12px 80px;
    grid-template-columns: 1fr;
    gap: 180px;
    opacity: .025;
  }

  .recipe-guide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 10px;
  }

  .recipe-guide li {
    min-height: 48px;
    gap: 3px;
    padding: 5px 3px;
    border-radius: 10px;
  }

  .recipe-guide li b {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .recipe-guide li span {
    font-size: 10px;
    line-height: 1.15;
    text-align: center;
  }

  dialog .recipe-editor-foot {
    grid-template-columns: 1fr;
    margin-top: 14px;
  }
}

@media (max-width: 360px) {
  .dialog-scroll-hint {
    max-width: calc(100% - 24px);
    white-space: nowrap;
  }

  .command-idle small {
    display: block;
  }

  .command-idle button {
    font-size: 12px;
    white-space: normal;
  }

  .inventory-zero-summary {
    display: grid;
  }

  .inventory-zero-summary button {
    justify-self: start;
    padding-left: 0;
  }

  .recipe-vault .sectionhead .actions {
    grid-template-columns: minmax(0, 1fr) 96px;
  }

  .recipe-vault .sectionhead .actions .menu-category-filter {
    width: 96px;
  }

  .recipe-guide li span {
    font-size: 9px;
  }
}
/* R61: keep search and scan on one row without shrinking touch targets. */
.catalog-searchline { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; }
.catalog-searchline .input { min-width:0; width:100%; }
.catalog-searchline .btn { min-width:52px; min-height:44px; padding-inline:12px; }
.catalog-shortcut-label{display:block;margin:12px 0 6px;font-size:13px;color:var(--muted,#64748b)}
.catalog-brand-group{min-width:0;border-top:1px solid #e7ece9;padding:3px 0}
.catalog-brand-group>summary{cursor:pointer;padding:10px 0;font-size:13px;font-weight:650;color:#40544a}
.catalog-brand-group .catalog-shortcuts button{white-space:normal;overflow-wrap:anywhere;text-overflow:clip;line-height:1.4;font-size:13px}
.catalog-page-note{color:#59665f;font-size:13px;padding:10px 0}
.catalog-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;font-size:14px}
.catalog-pagination .btn{min-height:44px;min-width:88px}
.catalog-source-note{font-size:12px;line-height:1.5;color:#52605e;overflow-wrap:anywhere;padding:8px}
#smartLabelConditions[hidden]{display:none!important}
@media(max-width:680px){
  .catalog-searchline { grid-template-columns:minmax(0,1fr) 52px 52px; gap:6px; }
  .catalog-searchline .input { padding-inline:10px; }
  .catalog-searchline .btn { padding-inline:4px; font-size:14px; width:52px; }
  .catalog-result { grid-template-columns:44px minmax(0,1fr) auto; gap:9px; padding:10px; min-height:94px; }
  .catalog-result img { width:44px; height:44px; border-radius:12px; }
  .catalog-result .catalog-state { grid-column:auto; justify-self:end; white-space:nowrap; padding:7px 9px; }
  .catalog-result .catalog-copy b { font-size:15px; line-height:1.35; overflow-wrap:anywhere; }
  .catalog-result .catalog-copy small { white-space:normal; line-height:1.4; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
}
.supplier-details>summary{cursor:pointer;font-size:13px;font-weight:650;padding:10px 0;min-height:40px;color:#315c50}
.supplier-compact-count{font-size:13px;color:#52605a;margin:8px 0 0}
.supplier-details .rowbuttons{margin-top:10px}
.ingredient-request-queue+.list-more{margin-bottom:20px}

/* R62.26: scoped source-binding controls; generic full-width inputs must not stretch checkboxes. */
.recipe-identity-summary{grid-column:1/-1;background:#f4f7f5;border-radius:14px;padding:14px;line-height:1.65;font-size:14px;overflow-wrap:anywhere}
.recipe-sales-field{min-width:0;margin:0;border:1px solid #dfe5e1;border-radius:14px;padding:12px}
.recipe-sales-field legend{padding:0 6px;font-size:14px;font-weight:650}
.recipe-sales-options .recipe-sales-row{display:grid;grid-template-columns:22px minmax(0,1fr);gap:10px;padding:12px 4px;border-bottom:1px solid #e6e8e7;align-items:start;cursor:pointer;font-size:14px;line-height:1.5}
.recipe-sales-options .recipe-sales-row[hidden]{display:none!important}
.recipe-sales-options .recipe-sales-row:last-child{border-bottom:0}
.recipe-sales-row span{min-width:0;overflow-wrap:anywhere}
.recipe-sales-row small{display:block;font-size:12px;color:#626d67;line-height:1.6}
.recipe-sales-options input[type=checkbox],.recipe-sales-confirm input[type=checkbox]{width:20px!important;min-width:20px!important;height:20px!important;min-height:20px!important;margin:2px 0 0;padding:0;accent-color:#1f6f5a;justify-self:start}
.recipe-sales-confirm label{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.6}
.food-reference-library{margin-top:20px;border:1px solid #d3ddd8;border-radius:14px;padding:12px;background:#f6f9f7;color:#203c32;overflow-wrap:anywhere}
.food-reference-library summary{min-height:44px;display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:600;line-height:1.5}
.food-reference-library summary::before{content:'›';flex:none}.food-reference-library details[open]>summary::before,.food-reference-library[open]>summary::before{content:'⌄'}
.food-reference-library summary small{margin-left:auto;font-weight:400;font-size:12px;white-space:nowrap}
.food-reference-library p,.food-reference-library li{font-size:14px;line-height:1.6;margin:8px 0}.food-reference-library small{color:#51685d;font-size:12px}
.food-reference-item{border-top:1px solid #d3ddd8;padding:4px 0}.food-reference-item summary{font-size:14px;font-weight:500;word-break:normal}
.food-reference-item dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:8px 0 12px}.food-reference-item dt{font-size:12px;color:#51685d}.food-reference-item dd{margin:4px 0;font-size:15px;font-variant-numeric:tabular-nums;font-weight:600}
.food-reference-library a{display:inline-flex;align-items:center;min-height:44px;color:#175e49;text-decoration:underline;font-size:14px}.food-reference-purchase{border-top:1px solid #d3ddd8;margin-top:12px}
/* Source purchase records stay visually separate from enabled stock materials. */
.source-master-entry,.source-master-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;color:inherit;background:#fff;border:1px solid #dce4e1;padding:16px;border-radius:14px;margin:0 0 10px;font:inherit;min-height:56px}
.source-master-entry{background:#edf5f1;border-color:#c8ddd2;margin:12px 0 18px}
.source-master-entry span,.source-master-row span{min-width:0;overflow-wrap:anywhere}
.source-master-entry small,.source-master-row small{display:block;margin-top:5px;color:#566960;font-size:13px;line-height:1.5}
.source-master-row b{font-size:15px;font-weight:600}.source-master-row em{font:12px system-ui;white-space:nowrap;color:#655b3b}
.source-master-content{padding:18px;overflow-wrap:anywhere;line-height:1.6}.source-master-content h3{font-size:16px;margin-top:24px}
.source-master-quote{border-bottom:1px solid #e3e7e5;padding:14px 0}.source-master-quote p{margin:5px 0}.source-master-provenance{display:block;color:#68756e;font-size:12px}
.source-master-warning{color:#956124}.source-master-content input[type=file]{max-width:100%}

.source-master-fields{margin:12px 0}.source-master-fields>div{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:12px;padding:5px 0}.source-master-fields dt{color:#65716b}.source-master-fields dd{margin:0;overflow-wrap:anywhere}.source-master-notes{margin:14px 0}.source-master-quote summary,.source-master-notes summary{padding:10px 0;cursor:pointer;font-size:14px;color:#34584b}
.stock-category-browser{display:grid;gap:10px;min-width:0}.stock-category-group{min-width:0;background:#fff;border:1px solid #dce2e7;border-radius:18px;overflow:hidden}.stock-category-group>summary{display:flex;align-items:center;gap:14px;min-height:72px;padding:14px 18px;cursor:pointer;list-style:none;background:#edf2f9;color:#243f61}.stock-category-group>summary::-webkit-details-marker{display:none}.stock-category-name{display:grid;gap:4px;min-width:0;flex:1}.stock-category-name b{font-size:18px;font-weight:650;line-height:1.35;overflow-wrap:anywhere}.stock-category-name small{font-size:12px;color:#5c6b80;line-height:1.4}.stock-category-count{flex:none;font-size:18px;font-weight:650;font-variant-numeric:tabular-nums}.stock-category-count small{font-size:12px;font-weight:400}.stock-category-chevron{width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);margin:0 3px 0 4px;flex:none}.stock-category-group[open]>summary{border-bottom:1px solid #dce2e7}.stock-category-group[open] .stock-category-chevron{transform:rotate(45deg)}.stock-category-group>summary:focus-visible{outline:3px solid #3977bd;outline-offset:-3px}.stock-category-group>.smart-stock-list{padding:12px;background:#f6f8fb}.stock-category-group:not([open])>.smart-stock-list{display:none}.stock-category-path{margin:6px 2px 0;font-size:14px;font-weight:600;line-height:1.4;color:#53677c;overflow-wrap:anywhere}.stock-category-pending>summary{background:#faf5e9;color:#715321}.stock-category-pending .stock-category-name small{color:#806942}.stock-category-browser .smart-leaf-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 0;font-size:13px}.stock-category-browser .smart-leaf-pagination .btn{min-height:44px}.stock-category-browser .smart-leaf-pagination span{white-space:nowrap;font-variant-numeric:tabular-nums}@media(max-width:680px){.stock-category-group>summary{padding:13px 15px;gap:10px}.stock-category-group>.smart-stock-list{padding:8px}.stock-category-group .smart-stock-row{border-radius:14px;padding:12px;gap:10px}.stock-category-group .smart-stock-row .name{overflow-wrap:anywhere}}

.stock-classified-item{min-width:0}.stock-classification-info{margin:0 4px;padding:6px 10px;color:#647386;font-size:12px;line-height:1.6}.stock-classification-info>summary{cursor:pointer;min-height:32px;display:flex;align-items:center;list-style:none;gap:6px}.stock-classification-info>summary::-webkit-details-marker{display:none}.stock-classification-info>summary:after{content:"＋";font-size:12px}.stock-classification-info[open]>summary:after{content:"−"}.stock-classification-info p{margin:0 0 6px;overflow-wrap:anywhere}.stock-classification-info.needs-review{color:#805716;background:#fbf5e8;border-radius:0 0 10px 10px}.stock-classification-info>summary:focus-visible{outline:2px solid #3977bd;outline-offset:2px}

.stock-category-children{display:grid;gap:0;padding:0 12px;background:#fff}.stock-category-group:not([open])>.stock-category-children{display:none}.stock-category-group .stock-category-group{border:0;border-radius:0;border-bottom:1px solid #e5e9ed}.stock-category-group .stock-category-group:last-child{border-bottom:0}.stock-category-level-2>summary{min-height:58px;padding:10px 8px;background:#fff;color:#2c3c4b}.stock-category-level-2>summary .stock-category-name b{font-size:16px;font-weight:600}.stock-category-level-3>summary{min-height:50px;padding:9px 10px;background:#f5f7fa;color:#4b5f72;border-radius:8px}.stock-category-level-3>summary .stock-category-name b{font-size:14px;font-weight:550}.stock-category-level-3{margin:4px 0}.stock-category-level-2>.stock-category-children{padding:0 0 8px 8px}.stock-category-level-2 .stock-category-count{font-size:14px;font-weight:500}.stock-category-level-2 .stock-category-chevron{width:6px;height:6px;border-width:1.5px}.stock-category-level-2>.stock-category-children .smart-stock-list{padding:8px 0;background:#f6f8fb}.stock-category-group[open]>.stock-category-children>details>summary .stock-category-chevron{transform:rotate(-45deg)}.stock-category-group[open]>.stock-category-children>details[open]>summary .stock-category-chevron{transform:rotate(45deg)}

/* Material setup: one decision group at a time; existing controls retain ownership. */
.material-form-step[hidden]{display:none!important}.material-form-step h3{margin:4px 0 12px;font-size:17px}.material-form-progress{margin:0 0 14px;font-size:13px;color:#53645f}.smart-item-image{display:grid;place-items:center;flex:0 0 64px;width:64px;height:64px;background:#eef3f1;border-radius:14px;color:#365a4a;font-size:14px;text-align:center}.smart-item-image img{width:64px;height:64px;object-fit:cover;border-radius:14px}.smart-item-image [hidden]{display:none}.material-category-review{padding:12px;border:1px solid #e6d9b9;border-radius:12px;background:#fff9eb;font-size:13px}.material-form-step input[type=checkbox]{width:20px;height:20px}.material-form-step .smart-advanced{border:0;padding:0}.material-form-step .smart-advanced>summary{padding:12px 0}.material-form-step .field[hidden]{display:none!important}

/* Material wizard owns its actions; generic mobile forms must not stack this row. */
.material-form>.fields{display:block;min-width:0}
.material-form-step{min-width:0;grid-template-columns:repeat(2,minmax(0,1fr))}
.material-form-step>.wide,.material-form-step>.smart-item-summary{grid-column:1/-1;min-width:0}
.material-form-step .smart-item-summary>div{min-width:0}
@media(max-width:560px){.material-form-step{grid-template-columns:minmax(0,1fr)}}
html dialog .material-form .sheetfoot{grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.25fr);gap:8px;padding:10px 16px calc(10px + env(safe-area-inset-bottom));box-shadow:none}
html dialog .material-form .sheetfoot[data-step="0"]{grid-template-columns:minmax(0,1fr) minmax(0,1.5fr)}
html dialog .material-form .sheetfoot [hidden]{display:none!important}
html dialog .material-form .sheetfoot .btn{min-height:44px;padding:9px 6px;font-size:14px;line-height:1.35;white-space:normal;letter-spacing:0}
.material-form-step h3{scroll-margin-top:12px}.material-form-step h3:focus{outline:none}
.food-reference-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}.food-reference-pagination .btn{min-height:44px;padding:8px 12px}.food-reference-pagination span{font-size:12px;text-align:center}.food-reference-library[aria-busy="true"]{opacity:.7}

html dialog .sheetfoot.compact-actions{grid-template-columns:minmax(0,.85fr) minmax(0,1.5fr);gap:8px;padding-top:10px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
html dialog .sheetfoot.compact-actions .btn{min-height:44px;padding:10px 8px;font-size:15px;line-height:1.4;white-space:normal}

/* R63 shared workspace. Tokens intentionally follow the existing MO green identity. */
:root {
  --ui-canvas:#f4f6f3; --ui-ink:#1c3029; --ui-muted:#5c6c64;
  --ui-line:#dde5dd; --ui-blue:#245d48; --role-accent:#245d48;
  --ui-radius:16px; --workspace-accent:#245d48; --workspace-soft:#eaf1e9;
  color-scheme:light;
}
:root[data-role] {--role-accent:#245d48;--role-accent-soft:#eaf1e9;--role-soft:#eaf1e9;--role-accent-rgb:36,93,72}
html body{background:var(--ui-canvas);color:var(--ui-ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
html button,html input,html select,html textarea{font-family:inherit}
html :where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #36745b;outline-offset:3px}
html [hidden]{display:none!important}
.workspace-skip{position:fixed;left:16px;top:-100px;z-index:10000;padding:12px 20px;border-radius:10px;color:#fff;background:#173d30}
.workspace-skip:focus{top:12px}
.workspace-nav{display:none}
.workspace-tools{display:flex;align-items:center;gap:6px}
html .top{background:#fff;border-bottom:1px solid var(--ui-line);box-shadow:none;backdrop-filter:none}
html .top .brand h1{color:var(--ui-ink);font-size:18px;letter-spacing:0}
html .brand .logo{background:#245d48;color:#fff;border-radius:12px;box-shadow:none}
html .headtools .iconbtn{border:1px solid var(--ui-line);background:white;border-radius:10px;color:#3b5045;min-height:42px;padding:8px 12px}
html .headtools .iconbtn:hover{background:var(--workspace-soft)}
html .headtools .signal{font-size:11px;color:var(--ui-muted);gap:4px}
html .btn{border:1px solid #cfdad1;border-radius:10px;color:#324b3d;min-height:44px;padding:10px 16px;background:#fff;box-shadow:none;font-weight:600;line-height:1.4}
html .btn.primary{background:#245d48;color:#fff;border-color:#245d48;box-shadow:none}
html .btn.primary:hover{background:#194b39}
html .btn.small{min-height:40px;padding:8px 12px;font-size:13px}
html .btn:disabled{opacity:.58;cursor:not-allowed}
html .input,html .select,html .textarea{border:1px solid #cbd7cd;border-radius:10px;background:#fff;color:#20372b;min-height:46px;box-shadow:none}
html .input::placeholder,html .textarea::placeholder{color:#738077}
html .input:focus,html .select:focus,html .textarea:focus{border-color:#36745b;box-shadow:0 0 0 3px #36745b15}
html .sectionhead,html .workbench-heading{margin-bottom:22px;gap:16px}
html .sectionhead h2,html .workbench-heading h2{font-size:26px;line-height:1.35;letter-spacing:-.5px;color:#1c3029;font-weight:700}
html .sectionhead p,html .workbench-heading p{font-size:13px;line-height:1.7;color:var(--ui-muted)}
.workspace-eyebrow{display:block;font-size:11px;font-weight:650;letter-spacing:1.5px;color:#65796a;margin:0 0 8px}
html .heading-count{font-size:14px;font-weight:650;color:#245d48;background:#e3ede1;border-radius:8px;padding:4px 9px;vertical-align:middle}
html .task-stage-tabs{display:flex;gap:4px;width:fit-content;max-width:100%;background:#e8ede6;border:1px solid #dfe6dc;border-radius:12px;padding:4px;margin-bottom:18px}
html .task-stage-tabs button{min-height:42px;min-width:102px;padding:8px 16px;font-size:13px;color:#536559;border-radius:9px}
html .task-stage-tabs button.active{background:#fff;color:#1d4835;box-shadow:0 1px 3px #213d2410}
html .simple-task{background:#fff;border:1px solid #d6e2d7;border-radius:16px;box-shadow:0 3px 12px #1c372404;grid-template-columns:minmax(0,1fr) 192px}
html .simple-task.focus-task{border-left:3px solid #458464;background:#fff}
html .simple-task[data-signal="critical"]{border-left:3px solid #bd4238}
html .simple-task-detail{padding:22px 24px;gap:7px;background:transparent}
html .simple-task-detail strong,html .focus-task .simple-task-detail strong{font-size:21px;line-height:1.45;color:#1d3428}
html .simple-task-detail small{font-size:12px;color:#5b6d61}
html .simple-task-detail .task-essential{font-size:14px;color:#42594b}
html .focus-task-eyebrow{background:#f3f7f0;padding:10px 24px;color:#3d644c;border-bottom:1px solid #e5ede0;font-size:12px}
html .simple-task-action{background:#fafcf8;border-left:1px solid #e6ece2;padding:22px;gap:10px}
html .simple-task-action .btn{font-size:14px;min-height:46px}
html .task-detail-link{color:#245d48}
html .workbench-empty{border-style:dashed;border-color:#ccd9cc;background:#fafcf8;min-height:0;border-radius:16px}
html .empty-symbol{background:#e8f0e4;color:#36714d;width:40px;height:40px;font-size:19px}
.workspace-preparation{margin-top:18px}
.workspace-preparation .quick-shelf-heading{gap:10px;flex-wrap:wrap}
.workspace-preparation .quick-shelf-heading h2{font-size:16px}
.workspace-preparation .quick-shelf-heading h2 span{font-size:12px;font-weight:400;color:var(--ui-muted)}
.workspace-no-orders{font-size:13px;color:var(--ui-muted);margin:14px 0}
.workspace-readiness .readiness-impact{margin-top:8px}
.workspace-priority .when-open,.workspace-priority[open] .when-closed{display:none}
.workspace-priority[open] .when-open{display:inline}
.workspace-readiness{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;background:#fff9ec;border:1px solid #e8dbb5;border-radius:14px;margin:18px 0}
.workspace-readiness>div{min-width:0}
.workspace-readiness span{font-size:11px;color:#786128;font-weight:600}
.workspace-readiness h3{font-size:15px;line-height:1.5;margin:5px 0;color:#594621}
.workspace-readiness p{font-size:12px;line-height:1.65;color:#766438;margin:0;max-width:62em}
.workspace-readiness>.btn{flex-shrink:0;background:transparent;border-color:#d6c697;color:#665027;font-size:13px}
html .quick-shelf{margin-top:26px}
html .quick-shelf-heading h2{font-size:15px;color:#465b4c;font-weight:650}
html .quick-shelf-grid{background:transparent;gap:12px;border:0;border-radius:0;overflow:visible}
html .quick-shelf-grid .quick-tile{border:1px solid #dce5d9;border-radius:14px;padding:18px;background:#fff;min-height:92px;align-items:center}
html .quick-tile:hover{background:#f6f9f3;border-color:#bacdbb}
html .quick-tile b{font-size:15px;color:#294432}
html .quick-tile small{font-size:12px;color:#687a6a;line-height:1.6;margin-top:6px}
html .quick-tile i{font-size:20px;color:#68836b}
html .card,html .rowcard,html .taskcard,html .dish,html .master-card{border-color:#dce5da;box-shadow:0 2px 8px #203b2603;border-radius:14px}
html .list-segments{background:#e8ede6;border-radius:10px;padding:4px}
html .list-segments button{border-radius:7px;min-height:40px;color:#576b5b}
html .list-segments button.active{color:#245d48;background:white}
html .badge{font-weight:600;letter-spacing:0}
html .tablewrap{border:1px solid #dce5da;border-radius:14px;box-shadow:none}
html table{font-variant-numeric:tabular-nums}
html th{background:#f4f7f1;color:#536653;font-size:12px}
html td{border-color:#e7ede3;line-height:1.55}
html tr:hover td{background:#f9fbf7}
html .notice{border-radius:12px;line-height:1.7}
.workspace-approvals{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 24px;margin:0 0 18px;background:#edf4e7;border:1px solid #ccdcbc;border-radius:16px}
.workspace-approvals span{font-size:11px;letter-spacing:1px;color:#5a7250;font-weight:650}
.workspace-approvals h2{font-size:23px;line-height:1.4;margin:7px 0;color:#284b2d}
.workspace-approvals p{font-size:12px;line-height:1.6;margin:0;color:#617256}
.workspace-approvals>.btn{flex-shrink:0}
.supplier-status-filters{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 16px}
.supplier-status-filters button{display:flex;gap:8px;align-items:center;border:1px solid #d9e3d3;background:#fff;border-radius:9px;min-height:44px;padding:10px 15px;color:#617159;font-size:13px}
.supplier-status-filters button[aria-pressed="true"]{background:#e5efdc;border-color:#c5d8b8;color:#31532b;font-weight:650}
.supplier-status-filters b{font-size:11px;color:inherit;font-variant-numeric:tabular-nums}
.supplier-review-note{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px;padding:14px 16px;background:#fff9ea;border:1px solid #e8ddb6;border-radius:12px;color:#796537;font-size:12px;line-height:1.7}
html .configuration-object-card{color:#294532}
html .settings-directory-group h3{color:#5b6e5b;font-size:13px}
html .settings-directory-group>div{border-color:#dce5da;border-radius:14px}
html .settings-directory .configuration-object-card{padding:18px}
html .configuration-object-card:hover{background:#f5f8f1}
html .manager-tasks.workspace-priority{margin:0 0 22px;background:#fff;border:1px solid #d7e3d4;border-radius:16px;overflow:hidden}
html .workspace-priority>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 22px;min-height:74px;list-style:none;cursor:pointer;color:#31583d}
html .workspace-priority>summary::-webkit-details-marker{display:none}
html .workspace-priority>summary small{display:block;font-size:11px;color:#677d65;margin-bottom:5px}
html .workspace-priority>summary b{display:block;font-size:18px}
html .workspace-priority>summary>span:last-child{font-size:12px;font-weight:600}
html .workspace-priority[open]>summary{border-bottom:1px solid #e1e9dc;margin-bottom:18px}
html .workspace-priority>.simple-workbench{padding:0 20px 6px}
html .manager-boss{max-width:none}
html .manager-boss .boss-datebar{padding:10px 12px;border:1px solid #dce5d8;border-radius:12px;background:#fff;gap:8px;margin:0;align-items:center}
html .manager-boss .boss-datebar label{font-size:12px;color:#5b705b;gap:9px;display:flex;align-items:center}
html .manager-boss .boss-datebar input{min-height:42px;border:1px solid #d5dfd1;border-radius:8px;padding:8px 10px;color:#28452e;background:#fafcf8;font-size:14px;max-width:190px}
html .manager-boss .boss-datebar .btn{min-height:40px;font-size:12px;padding:8px 13px}
html dialog{border:1px solid #dce5d8;border-radius:22px;box-shadow:0 28px 90px #13281b30}
html dialog::backdrop{background:#12231bb0;backdrop-filter:none}
html .sheethead{background:#fff;border-bottom:1px solid #e2e9dd;padding:24px}
html .sheethead h2{font-size:23px;color:#203d2d}
html .sheethead .desc{color:#667761;font-size:13px;line-height:1.7;margin-top:8px}
html .sheetfoot{border-color:#e0e8db;background:#fff}
html .field>label{color:#42593f;font-size:13px;font-weight:600}
html .formerr:not(:empty){background:#fff0ed;border:1px solid #e7beb7;border-radius:10px;padding:13px 16px;color:#9f2e21}
html .toast{background:#203b2b;color:#fff;border-radius:12px;box-shadow:0 8px 28px #13261724}
@media(min-width:1100px){
 html[data-workspace="ready"] .workspace-nav{display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;width:224px;background:#f9fbf7;border-right:1px solid #dce5d8;padding:28px 16px 18px;z-index:90;overflow-y:auto;overscroll-behavior:contain}
 .workspace-brand{display:flex;align-items:center;gap:11px;padding:0 8px;margin-bottom:28px}
 .workspace-mark{display:grid;place-items:center;background:#245d48;color:#fff;border-radius:12px;width:38px;height:42px;font:700 12px/1 -apple-system,sans-serif;letter-spacing:1px}
 .workspace-brand b{font-size:18px;letter-spacing:1px;color:#203c2c}
 .workspace-brand small{display:block;font-size:10px;margin-top:6px;color:#657b65;letter-spacing:.6px}
 .workspace-finder{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid #d6e1d1;border-radius:10px;padding:11px;font-size:12px;color:#61715e;min-height:42px;text-align:left}
 .workspace-finder>span{font-size:22px;line-height:16px;color:#526f55}
 .workspace-finder kbd{margin-left:auto;color:#7a8974;border:1px solid #e0e6db;border-radius:4px;padding:2px 4px;font-size:9px}
 .workspace-nav-group{font-size:10px;letter-spacing:1.3px;color:#73836c;margin:26px 12px 10px}
 .workspace-nav nav>button{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;padding:11px 13px;margin:4px 0;color:#556a55;border:0;border-radius:10px;background:transparent;text-align:left;font-size:13px;font-weight:500}
 .workspace-nav nav>button:hover{background:#eef3e9}
 .workspace-nav nav>button[aria-current="page"]{background:#e3eddd;color:#244f31;font-weight:650}
 .workspace-nav nav>button .nav-icon{width:19px;height:19px;flex:0 0 19px}
 .workspace-nav .nav-icon svg{width:19px;height:19px;stroke-width:1.6}
 .workspace-nav nav>button>b{margin-left:auto;border-radius:5px;background:#d0e1c9;color:#2c572d;font-size:10px;padding:2px 5px;min-width:19px;text-align:center}
 .workspace-footer{display:grid;gap:8px;margin-top:auto;padding:28px 12px 0;font-size:10px;color:#758570;letter-spacing:.4px}
 .workspace-edition{border-top:1px solid #e1e8dc;padding-top:17px;font-weight:600;color:#526d50}
 html[data-workspace="ready"] .top{margin-left:224px;width:calc(100% - 224px)}
 html[data-workspace="ready"] .topin{max-width:none;padding:17px 32px}
 html[data-workspace="ready"] .top .tabs{display:none}
 html[data-workspace="ready"] .brand .logo{display:none}
 html[data-workspace="ready"] .brandrow{margin:0;min-height:40px}
 html[data-workspace="ready"] main#app{width:calc(100% - 224px);max-width:none;margin:0 0 0 224px;padding:30px 32px 56px;min-height:calc(100vh - 86px)}
 html[data-workspace="ready"] .connection-notice#connectionNotice{margin:16px 32px 0 256px;width:auto;max-width:none}
 html[data-workspace="ready"] .task-alert-rail{left:248px;right:24px;width:auto}
 html[data-workspace="ready"] .bottomnav{display:none}
}
@media(min-width:1600px){
 html[data-workspace="ready"] main#app{padding-left:48px;padding-right:48px}
 html[data-workspace="ready"] .topin{padding-left:48px;padding-right:48px}
 html .simple-workbench,html .quick-shelf,html .workbench-heading{max-width:1440px}
}
@media(max-width:1099px){
 html .top .tabs{padding-top:14px}
 html .tab[aria-selected="true"]{background:#e5efdf;color:#295137}
}
@media(max-width:760px){
 html .topin{padding:10px 14px}
 html .top .brand h1{font-size:16px}
 html .headtools .alert-control,html .workspace-refresh{display:none}
 html .headtools .iconbtn{min-width:42px;padding:8px;font-size:12px;border:0;background:#eef3e9}
 html .brand .logo{width:32px;height:34px;border-radius:10px}
 html main#app{padding:24px 16px calc(94px + env(safe-area-inset-bottom))}
 html .sectionhead h2,html .workbench-heading h2{font-size:24px}
 .workspace-eyebrow{font-size:10px;letter-spacing:1px;margin-bottom:7px}
 html .workbench-heading{align-items:flex-start;margin-bottom:20px}
 html .workspace-guide{font-size:11px;min-height:38px;padding:8px 10px;flex-shrink:0}
 html .task-stage-tabs{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;padding:3px;margin-bottom:16px}
 html .task-stage-tabs button{font-size:12px;min-width:0;min-height:44px;padding:6px 3px}
 html .simple-task{grid-template-columns:1fr;border-radius:15px}
 html .simple-task-detail{padding:20px;gap:8px}
 html .focus-task .simple-task-detail strong{font-size:22px}
 html .simple-task-action{border-left:0;border-top:1px solid #e4ebdf;padding:14px 20px;display:flex;align-items:center;justify-content:space-between}
 html .simple-task-action .btn{width:auto;min-width:126px}
 html .focus-task-eyebrow{padding:10px 18px;font-size:11px}
 html .focus-task-eyebrow small{font-size:10px}
 html .quick-shelf-grid{gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
 html .quick-shelf-grid .quick-tile{padding:15px;min-height:102px}
 html .quick-tile b{font-size:14px}
 html .quick-tile small{font-size:11px;margin-top:6px}
 .workspace-readiness{padding:16px;gap:12px;align-items:flex-start;flex-direction:column}
 .workspace-approvals{padding:18px;gap:12px;flex-wrap:wrap}
 .workspace-approvals h2{font-size:16px}
 .supplier-status-filters{gap:5px}
 .supplier-status-filters button{padding:9px 11px;font-size:12px}
 .supplier-review-note{flex-wrap:wrap}
 .workspace-readiness>.btn{min-height:40px;font-size:12px}
 html .workspace-priority>summary{padding:15px 16px}
 html .workspace-priority>.simple-workbench{padding:0 12px 4px}
 html .workspace-priority>summary b{font-size:17px}
 html .manager-boss .boss-datebar{display:flex;flex-wrap:wrap;gap:7px;padding:12px}
 html .manager-boss .boss-datebar label{flex:1 1 100%;justify-content:space-between}
 html .manager-boss .boss-datebar input{max-width:none;width:calc(100% - 66px)}
 html .manager-boss .boss-datebar .btn{flex:1;min-width:0;font-size:12px}
 html .bottomnav{border-top:1px solid #dce5d6;background:#fcfdfb;padding:5px 8px calc(5px + env(safe-area-inset-bottom));box-shadow:0 -3px 18px #243e2004}
 html .bottomnav button{color:#70806b;gap:4px;min-height:54px}
 html .bottomnav button.active{color:#245b39;background:transparent}
 html .bottomnav button.active>.nav-icon:before{content:"";position:absolute;inset:-3px -14px;background:#e4efde;border-radius:10px;z-index:-1}
 html .bottomnav .nav-icon{isolation:isolate}
 html dialog{border-radius:20px 20px 0 0}
 html .sheethead{padding:20px}
 html .sheethead h2{font-size:21px}
 html .btn.small{min-height:44px}
 html .field>label{font-size:13px}
}
@media(max-width:350px){html .brand .logo{display:none}html .top .brand h1{font-size:15px}html main#app{padding-left:12px;padding-right:12px}html .workspace-guide{display:none}html .brand-meta{font-size:10px}}
@media(prefers-reduced-motion:reduce){html *,html *:before,html *:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
@media print{.workspace-nav,.workspace-tools,.workspace-skip{display:none!important}html[data-workspace="ready"] main#app{margin:0;width:100%;padding:0}}

.workspace-health-reasons{margin:0 0 20px;padding:16px 20px;border:1px solid #e7c29a;border-radius:14px;background:#fff8ed;color:#744016}.workspace-health-reasons ul{margin:8px 0 0;padding-left:20px}.workspace-health-phases{padding:16px 0;border-top:1px solid var(--line)}.workspace-health-phases summary{cursor:pointer;font-weight:650;min-height:44px;display:flex;align-items:center}.workspace-health-phases p{color:var(--muted);font-size:13px}.workspace-health-phases .table-scroll{overflow-x:auto}.workspace-health-phases table{min-width:650px;width:100%;border-collapse:collapse}.workspace-health-phases td,.workspace-health-phases th{text-align:left;padding:10px;border-bottom:1px solid var(--line);font-size:13px}

/* R64: verified mobile reading, list navigation and form hierarchy. */
html .boss-product-head,html .boss-product-row{grid-template-columns:minmax(240px,2fr) repeat(3,minmax(100px,1fr))}
html .boss-product-row>span.boss-product-identity{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:12px;padding:14px;min-width:0}
html .boss-product-row .dish-photo{display:block;float:none;width:48px;height:48px;aspect-ratio:1;flex:0 0 48px;object-fit:cover;border-radius:10px;margin:0}
.boss-product-copy{display:flex;flex-direction:column;gap:5px;min-width:0}
.boss-product-copy>b{font-size:14px;line-height:1.55;color:#24392e;overflow-wrap:anywhere}
.boss-product-copy>small{font-size:11px;line-height:1.4;color:#65766b;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.boss-cell-date{font-size:11px;line-height:1.4;font-weight:500;color:#5e6d63}
.boss-cell-date time{font-variant-numeric:tabular-nums}
html .boss-period small{color:#5c6a61}
.boss-product-toolbar,.approval-toolbar{display:grid;grid-template-columns:auto minmax(180px,360px) 1fr;align-items:center;gap:10px 14px;margin:0 0 16px}
.boss-product-toolbar>label,.approval-toolbar>label{font-size:13px;font-weight:650;color:#314d3c}
.boss-product-toolbar p,.approval-toolbar p{margin:0;font-size:12px;line-height:1.6;color:#5e7063}
.boss-product-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;border-top:1px solid #e7ece6;background:#fcfdfb}
.boss-product-visible{font-size:12px;line-height:1.5;color:#627366}
html .boss-product-more{font-size:12px;min-height:44px;padding:8px 12px}
html .approval-card{min-width:0;gap:9px;padding:18px;border:1px solid #dce5da;border-radius:14px;background:#fff;box-shadow:none}
html .approval-card>b{overflow-wrap:anywhere;font-size:16px;line-height:1.5}
html .approval-card p{overflow-wrap:anywhere;line-height:1.6;font-size:13px}
.approval-more{margin-top:16px}
html .settings-shell{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0;margin:0 0 22px;border:0;border-radius:0;background:transparent;box-shadow:none}
html .settings-shell>.select{width:auto;max-width:280px;min-width:0;flex:0 1 240px;font-size:13px}
html .settings-shell>.btn{white-space:nowrap;font-size:13px}
html .field>label small{display:inline;margin:0 0 0 6px;color:#69766c;font-size:11px;line-height:inherit;font-weight:400}
html .form-advanced>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:48px;padding:12px 0;font-size:14px}
html .form-advanced>summary small{display:inline;margin:0;color:#677568;font-size:11px;font-weight:400;text-align:right}
html .health-metrics b{white-space:normal;text-overflow:clip;overflow:visible;overflow-wrap:anywhere;line-height:1.5}
.health-technical{margin-top:8px;font-size:12px;color:#617064}
.health-technical summary{min-height:44px;display:flex;align-items:center;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.health-technical p{overflow-wrap:anywhere;line-height:1.6}
html .health-head>div{min-width:0}
html .audit-row small{white-space:normal;overflow-wrap:anywhere}
@media(min-width:761px){.boss-cell-date{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}}
@media(max-width:760px){
 html main#app{padding-top:18px}
 html .sectionhead,html .workbench-heading{gap:12px;margin-bottom:16px}
 html .sectionhead h2,html .workbench-heading h2{font-size:22px;line-height:1.4;letter-spacing:0}
 html .sectionhead p,html .workbench-heading p{font-size:13px;line-height:1.65}
 html .workspace-approvals{flex-wrap:nowrap;gap:10px;padding:13px 14px;margin-bottom:12px;border-radius:12px}
 html .workspace-approvals span{font-size:10px;letter-spacing:0}
 html .workspace-approvals h2{font-size:16px;line-height:1.4;margin:3px 0 0}
 html .workspace-approvals p{display:none}
 html .workspace-approvals>.btn{font-size:12px;padding:9px 11px;min-height:44px}
 html .manager-tasks.workspace-priority{margin-bottom:18px;border-radius:12px}
 html .workspace-priority>summary{padding:12px 14px;min-height:64px}
 html .workspace-priority>summary b{font-size:14px;line-height:1.5}
 html .workspace-priority>summary small{font-size:11px;margin-bottom:2px}
 html .manager-boss .manager-panel{padding:16px 12px;border-radius:14px}
 html .boss-product-head{display:none}
 html .boss-products-group{border-radius:12px;margin-top:12px}
 html .boss-products-group>summary{padding:13px 12px;gap:10px}
 html .boss-products-group>summary b{font-size:14px;line-height:1.5;overflow-wrap:anywhere}
 html .boss-products-group>summary small{font-size:11px;line-height:1.5;color:#627167}
 html .boss-products-group>summary em{font-size:14px;white-space:nowrap}
 html .boss-product-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:14px 10px 12px;border-top:1px solid #e5ebe5}
 html .boss-product-row>span.boss-product-identity{grid-column:1/-1;gap:10px;padding:0 0 12px}
 html .boss-product-row .dish-photo{width:48px;height:48px;flex:0 0 48px}
 html .boss-product-copy>b{font-size:15px;line-height:1.5}
 html .boss-product-copy>small{font-size:11px}
 html .boss-product-row .boss-period{padding:10px 4px;align-items:center;gap:4px;text-align:center;border:1px solid #ffffff80}
 html .boss-product-row .boss-period:first-of-type{border-radius:8px 0 0 8px}
 html .boss-product-row .boss-period:last-child{border-radius:0 8px 8px 0}
 html .boss-product-row .boss-period>b{font-size:15px;line-height:1.5;overflow-wrap:anywhere}
 html .boss-product-row .boss-period small{font-size:11px;line-height:1.4}
 .boss-cell-date{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 4px;font-size:11px}
 .boss-product-toolbar,.approval-toolbar{grid-template-columns:1fr;gap:7px;margin-bottom:14px}
 .boss-product-toolbar input,.approval-toolbar input{width:100%;font-size:16px}
 .boss-product-footer{padding:10px;gap:8px;flex-wrap:wrap}
 html .boss-product-more{margin-left:auto}
 html .settings-shell{gap:10px;margin-bottom:18px}
 html .settings-shell>.btn{font-size:12px;padding:10px 12px}
 html .settings-shell>.select{flex:1;max-width:240px;font-size:14px}
 html .sheethead{padding:17px 18px}
 html .sheethead h2{font-size:20px;line-height:1.45}
 html .sheethead .desc{font-size:12px;line-height:1.65;margin-top:6px}
 html .health-head{align-items:flex-start;gap:12px}
 html .health-head h3{font-size:20px;line-height:1.45}
 html .health-head p{font-size:12px;line-height:1.7}
 html .health-state{flex-shrink:0;font-size:11px}
 html .workbench-empty{min-height:0}
}
/* The urgent notice stays in the document flow; it must not cover controls while scrolling. */
html .task-alert-rail.manager-alert-compact{position:relative;top:auto;left:auto;right:auto;box-shadow:none;text-align:left;flex-direction:row}
@media(min-width:1100px){html[data-workspace="ready"] .task-alert-rail.manager-alert-compact{margin:14px 32px 0 256px}}
@media(max-width:760px){html .task-alert-rail.manager-alert-compact{margin:10px 14px 0;padding:10px 12px;align-items:center}html .manager-alert-compact>div{gap:3px}html .manager-alert-compact small{font-size:11px;color:#854940}html .manager-alert-compact>button{font-size:12px;max-width:84px}html .boss-period-0{border-radius:8px 0 0 8px}}

html .work-context-bar h2{font-size:20px;line-height:1.4;margin:0;color:#243e2d}

html .field-error{display:block;margin:7px 0 0;color:#a82f24;font-size:12px;line-height:1.6;font-weight:500}

/* Keep the receiving page identity visible where the shared presence bar is hidden. */
html .work-context-bar.receiving-context{display:block}
html .receiving-context p{margin:5px 0 0;color:var(--ui-muted);font-size:13px;line-height:1.5}

@media(max-width:350px){html .boss-cell-date{flex-direction:column;flex-wrap:nowrap;min-height:33px;gap:2px}}

/* Empty tasks remain compact so operational actions stay within reach. */
html .workbench-empty{grid-template-rows:auto auto;align-content:center;justify-content:start;align-items:start;padding:18px 16px;gap:4px 12px}
html .workbench-empty .empty-symbol{grid-column:1;grid-row:1 / 3;align-self:center}
html .workbench-empty h3{grid-column:2;grid-row:1;align-self:end}
html .workbench-empty p{grid-column:2;grid-row:2;align-self:start}
html .manual-unit-notice{padding:12px;margin-top:10px;border:1px solid #d8c89d;background:#fff9ec;color:#6e5424;border-radius:10px;font-size:13px;line-height:1.6}
html .manual-unit-notice p{margin:6px 0 10px}
html .manual-unit-notice[hidden]{display:none}
html .manager-bar-value{font-variant-numeric:tabular-nums}

@media(max-width:760px){html .boss-product-row .boss-period>b.boss-amount-long{font-size:13px;white-space:nowrap;letter-spacing:-.2px}}
@media(max-width:350px){html .boss-product-row .boss-period>b.boss-amount-long{font-size:12px}}

/* Keep mobile section headings intact while their explanatory copy wraps. */
@media(max-width:700px){.manager-section-title>span{flex-shrink:0;white-space:nowrap}.manager-section-title>small{min-width:0;line-height:1.5}}

/* R66: live status stays visible; primary metrics fit the mobile reading order. */
.manager-freshness-notice{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px 16px;border:1px solid #dec08a;border-radius:12px;background:#fff8e9;color:#604919;font-size:13px;line-height:1.6}
.manager-freshness-notice span{flex:1 1 240px}.manager-freshness-notice .btn{min-height:44px}
html .manager-boss .boss-hero.snapshot-stale{background:#554b38}
html .manager-live-head{margin:0;min-height:44px}
html .manager-boss .boss-datebar .btn,html .manager-boss .boss-datebar input{min-height:44px}
@media(max-width:600px){
 html .workspace-approvals{padding:10px 12px;margin:0 0 10px;gap:8px;flex-wrap:nowrap}
 html .workspace-approvals>div>span{font-size:11px}
 html .workspace-approvals h2{font-size:16px;margin:2px 0}
 html .workspace-approvals p{display:none}
 html .workspace-approvals>.btn{padding:10px;font-size:12px;min-height:44px}
 html .manager-tasks.workspace-priority{margin:0 0 12px}
 html .workspace-priority>summary{padding:8px 12px;min-height:54px}
 html .workspace-priority>summary small{margin:0;font-size:11px}
 html .workspace-priority>summary b{font-size:14px}
 html .manager-boss{gap:10px}
 html .manager-boss .manager-live-head{padding:0;align-items:center}
 html .manager-boss .manager-live-head h2{font-size:17px}
 html .manager-boss .manager-eyebrow{display:none}
 html .manager-boss .boss-datebar{gap:6px;padding:8px}
 html .manager-boss .boss-hero{padding:20px 16px;margin-bottom:-10px}
 html .manager-boss .boss-kpis>div{padding:12px 4px}
 html .manager-boss .boss-kpis span{font-size:11px;line-height:1.5}
 html .manager-boss .boss-kpis b{font-size:20px}
 .manager-freshness-notice{padding:12px}
}

/* Production cards: name, description and state are independent layers. */
.master-card-head > div{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}
.master-card-head > div > b{font-size:17px;line-height:1.45;overflow-wrap:anywhere}
.master-card-head > div > span{font-size:13px;line-height:1.6;color:var(--muted,#65716d);overflow-wrap:anywhere}
.master-card-head .status-chip{flex-shrink:0;align-self:flex-start}
.master-card dl dd{overflow-wrap:anywhere}
.station .loadsub{white-space:normal;line-height:1.6}

.chef-workspaces{margin-bottom:24px}.chef-space-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px}.chef-space-card{padding:20px;background:#fff;border:1px solid #dce5df;border-radius:18px;min-width:0}.chef-space-heading{display:flex;gap:12px;justify-content:space-between;align-items:flex-start}.chef-space-heading>div{min-width:0}.chef-space-heading h3{margin:4px 0 8px;font-size:20px;line-height:1.4;overflow-wrap:anywhere}.chef-space-heading p{margin:4px 0;color:#55635c;line-height:1.5}.chef-space-meta{display:grid;grid-template-columns:72px 1fr;gap:10px;margin:18px 0;font-size:14px;line-height:1.6}.chef-space-meta>span{color:#647168}.chef-space-meta p{margin:0;overflow-wrap:anywhere}.chef-legacy-owners>summary{padding:16px 0;font-weight:650;cursor:pointer}.chef-choice-field{border:1px solid #dce5df;border-radius:12px;padding:14px;min-width:0}.chef-choice-field legend{font-weight:650;padding:0 5px}.chef-choices{max-height:240px;overflow:auto;overscroll-behavior:contain;margin-top:8px}.chef-choices label{display:flex;align-items:center;gap:10px;padding:12px 4px;min-height:44px;border-bottom:1px solid #edf0ec;line-height:1.5}.chef-choices label[hidden]{display:none}.chef-choices input{width:20px;height:20px;flex-shrink:0;accent-color:#245e4e}.chef-choices span{overflow-wrap:anywhere}.chef-member-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px;margin:12px 0;background:#f4f7f3;border:1px solid #dce5df;border-radius:12px}.chef-member-row .field:first-child{grid-column:1/-1}.chef-member-row .field{min-width:0}.chef-member-row .field.wide{grid-column:auto}.chef-member-row .field:first-child{grid-column:1/-1}.chef-member-row button{justify-self:start}.chef-members h3{font-size:17px}.chef-choices:focus-within,.chef-member-row:focus-within{outline:1px solid #7d9c8a;outline-offset:2px}@media(max-width:380px){.chef-member-row{grid-template-columns:1fr}.chef-space-card{padding:16px}.chef-space-meta{grid-template-columns:1fr;gap:4px}.chef-space-meta p{margin-bottom:8px}}

/* Keep sticky edges aligned with the actual sheet padding. */
html dialog .sheet{padding:var(--sheet-inset,22px)}
@media(max-width:600px){.chef-member-row{grid-template-columns:minmax(0,1fr)}}

/* R682: editable requisition lines and compact, persistent entry. */
.req-draft-status{font-size:12px;line-height:1.6;color:var(--muted,#647369);margin:0 0 14px;overflow-wrap:anywhere}
.req-list-heading{display:flex;justify-content:space-between;align-items:baseline;gap:12px;flex-wrap:wrap;margin:12px 0}
.req-list-heading small{color:var(--muted,#647369)}
.req-edit-line{padding:14px;border:1px solid var(--line,#dbe3dd);border-radius:14px;background:var(--surface,#fff);margin-bottom:10px;min-width:0}
.req-edit-name{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:8px}
.req-edit-name b{overflow-wrap:anywhere;min-width:0;line-height:1.5}
.req-edit-name button{flex:0 0 auto}
.req-edit-line label{display:block;font-size:13px;margin-bottom:6px}
.req-edit-line input{width:100%;min-width:0}
.req-edit-line p{font-size:13px;line-height:1.6;margin:8px 0 0}
#reqForm .sheetfoot.compact-actions{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px}
#reqForm .sheetfoot.compact-actions button{min-width:0;white-space:normal}

/* R70: keep complete figures together and give operational controls a clear hierarchy. */
.manager-inbox{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-bottom:18px}
.manager-inbox:empty{display:none}
html .manager-inbox .workspace-approvals,html .manager-inbox .workspace-priority{margin:0}
html .manager-inbox .workspace-approvals{background:#f0f4eb;border-color:#d6e0cd}
html .manager-inbox .workspace-approvals h2{font-size:18px}
html .manager-inbox .workspace-approvals>.btn{background:#fff;color:#245d48;border-color:#bdccbd}
html .manager-summary{border:1px solid #d4dfd6;border-radius:18px;background:#fff;overflow:hidden;min-width:0}
html .manager-summary .boss-hero{margin:0;border-radius:0;padding:24px;gap:16px}
html .manager-summary .manager-hero-main>b{white-space:normal;overflow-wrap:anywhere;line-height:1.08;letter-spacing:-.035em}
html .manager-summary .boss-kpis{border:0;border-radius:0}
html .manager-summary .boss-kpis>div{padding:18px 14px;min-height:86px;border-right:1px solid #e4eae3;gap:7px;background:#fff;border-top:0}
html .manager-summary .boss-kpis>div:last-child{border-right:0}
html .manager-summary .boss-kpis b{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.25;font-weight:700;font-size:25px;letter-spacing:-.025em}
html .manager-summary .boss-kpis span{font-size:12px;font-weight:500;color:#5c6c64}
html .manager-summary .boss-kpis .boss-qty{color:#245d48}
html .manager-summary .manager-source-times{margin:0;padding:12px 18px;border-top:1px solid #e4eae3;background:#f8faf6;font-size:11px;line-height:1.65}
html .manager-boss .boss-datebar .btn[aria-pressed="true"]{background:#e7efe3;border-color:#b8cdb9;color:#244f38}
html .manager-boss .manager-section-title{align-items:flex-start;flex-wrap:wrap;gap:5px 16px}
html .manager-boss .manager-section-title>small{color:#637268;font-size:12px;line-height:1.55;max-width:100%}
html .manager-boss .manager-section-title>span{font-size:17px;line-height:1.55;font-weight:700}
html .manager-boss .boss-analysis-actions .btn{background:#fff;border-color:#d5dfd3}
html .manager-boss .boss-product-copy>b{font-weight:650}
html .manager-boss .boss-products-group>summary{background:#f5f8f1}
html .manager-boss .boss-products-group>summary em{font-variant-numeric:tabular-nums}
.directory-intro{font-size:13px;line-height:1.6;color:#5c6c64;margin:0 0 16px}
.directory-quick{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0 18px}
html .directory-quick .btn{background:#f3f7ef;font-size:13px;font-weight:500}
.directory-group-title{font-size:12px;line-height:1.5;letter-spacing:.02em;color:#61725f;margin:14px 0 3px;font-weight:650}
html .experience-directory-list{gap:8px}
html .experience-destination{border-color:#dce5d8;border-radius:12px;padding:14px 16px;gap:12px}
html .experience-destination b{font-size:15px;font-weight:650;line-height:1.5}
html .experience-destination small{font-size:12px;line-height:1.65;color:#5f7063}
html .experience-destination em{flex-shrink:0;font-size:12px;color:#245d48}
html .settings-finder>label{color:#42593f;font-weight:600;font-size:13px}
html #settingsSearchResults{border:1px solid #dce5d8;border-radius:14px;background:#fff;padding:16px;margin:12px 0 20px}
html #settingsSearchResults>p{font-size:13px;line-height:1.7;margin:0 0 12px}
html #settingsSearchResults>.btn{margin-top:2px}
@media(min-width:900px){
 .manager-inbox{grid-template-columns:1fr 1fr;align-items:start}
 html .manager-inbox .workspace-approvals{min-height:106px;padding:16px 20px}
 html .manager-inbox .workspace-priority>summary{min-height:106px;padding:16px 20px}
 html .manager-summary .boss-hero{padding:28px}
}
@media(max-width:760px){
 html .manager-inbox{gap:8px;margin-bottom:16px}
 html .manager-inbox .workspace-approvals{padding:8px 12px;border-radius:12px;min-height:60px}
 html .manager-inbox .workspace-approvals h2{font-size:15px;margin:1px 0}
 html .manager-inbox .workspace-approvals span{font-size:10px}
 html .manager-inbox .workspace-priority>summary{min-height:50px;padding:8px 12px}
 html .manager-inbox .workspace-priority>summary small{font-size:10px}
 html .manager-inbox .workspace-priority>summary b{font-size:13px}
 html .manager-boss{gap:12px}
 html .manager-boss .boss-datebar{background:transparent;padding:0;border:0;gap:8px}
 html .manager-boss .boss-datebar input{background:#fff;font-size:16px}
 html .manager-summary .boss-hero{grid-template-columns:minmax(0,1fr);padding:20px;gap:14px}
 html .manager-summary .manager-hero-main{gap:9px}
 html .manager-summary .manager-hero-main>b{font-size:clamp(32px,9vw,42px)}
 html .manager-summary .manager-hero-main>small{font-size:12px;line-height:1.6;color:#d9e7df;font-weight:500}
 html .manager-summary .boss-hero-compare{display:flex;justify-content:space-between;align-items:center;gap:10px;max-width:none;text-align:left;font-size:12px;border-top:1px solid #ffffff26;padding-top:11px}
 html .manager-summary .boss-hero-compare>small{margin:0;font-size:11px}
 html .manager-summary .boss-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 html .manager-summary .boss-kpis>div{min-height:82px;padding:14px 10px;text-align:left;gap:5px;border-top:0}
 html .manager-summary .boss-kpis>div:nth-child(2n){border-right:0}
 html .manager-summary .boss-kpis>div:nth-child(n+3){border-top:1px solid #e4eae3}
 html .manager-summary .boss-kpis b{font-size:23px}
 html .manager-summary .boss-kpis span{font-size:11px}
 html .manager-summary .manager-source-times{padding:11px 14px;gap:3px}
 html .manager-boss .manager-panel{padding:16px 14px}
 html .manager-boss .manager-section-title>small{flex-basis:100%;font-size:11px}
 html .manager-boss .manager-section-title{margin-bottom:12px}
 html .manager-boss .boss-product-row .boss-period>b{font-weight:650}
 html dialog .input,html dialog .select,html dialog .textarea{font-size:16px}
 html .settings-directory .configuration-object-card{padding:16px}
 html .experience-destination{padding:13px 14px}
 html .directory-intro{margin-bottom:14px}
}

/* R78: keep the complete operating summary above the mobile navigation. */
@media(max-width:760px){
 html .manager-inbox{gap:6px;margin-bottom:12px}
 html .manager-inbox .workspace-priority:not([open])>summary{min-height:44px;padding:6px 12px;gap:8px}
 html .manager-inbox .workspace-priority:not([open])>summary>span:first-child{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 6px;min-width:0}
 html .manager-inbox .workspace-priority:not([open])>summary small{display:inline;font-size:11px;margin:0}
 html .manager-inbox .workspace-priority:not([open])>summary b{display:inline;line-height:1.5}
 html .manager-inbox .workspace-priority>summary>.disclosure-label{flex-shrink:0}
 html .manager-boss{gap:8px}
 html .manager-boss .manager-compact-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center}
 html .manager-boss .manager-compact-head h2{font-size:17px;white-space:nowrap}
 html .manager-boss .manager-business-date{display:block;min-width:0}
 html .manager-boss .manager-business-date>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
 html .manager-boss .manager-business-date input{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-height:44px;padding:8px;font-size:16px}
 html .manager-boss .manager-compact-head>.btn{min-width:52px;min-height:44px;padding:10px 12px;font-size:13px}
 html .manager-boss .manager-date-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 html .manager-boss .manager-date-shortcuts>.btn{min-width:0;min-height:44px;padding:10px 6px}
 html .manager-summary .boss-hero{padding:14px 16px;gap:8px}
 html .manager-summary .manager-hero-main{gap:5px}
 html .manager-summary .boss-hero-compare{padding-top:8px}
 html .manager-summary .boss-kpis>div{min-height:70px;padding:10px;gap:3px}
 html .manager-summary .manager-source-times{padding:8px 12px;gap:2px}
}

.manager-category-warning{margin:0 0 12px;padding:10px 12px;background:#fff5dd;color:#79530b;border-radius:10px;font-size:12px;line-height:1.65;overflow-wrap:anywhere}

/* R73: shell removal is scoped to the roster route; native controls keep existing dialog behavior. */
html[data-roster-route=ready],html[data-roster-route=ready] body{background:#f5f5f7;padding-bottom:0}html[data-roster-route=ready] #top,html[data-roster-route=ready] #workspaceNav,html[data-roster-route=ready] #bottomNav,html[data-roster-route=ready] #taskAlertRail{display:none!important}html[data-roster-route=ready] #app{margin:0 auto!important;padding:0!important;width:100%!important;max-width:1200px!important;min-height:100dvh}
.mo-roster{box-sizing:border-box;color:#1d1d1f;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","PingFang SC",sans-serif;max-width:1200px;width:100%;min-width:0;margin:auto;padding:24px 32px 120px}.mo-roster *,.roster-dialog-content *{box-sizing:border-box}.mo-roster .btn,.roster-dialog-content .btn{font-family:inherit;min-height:44px;min-width:0;border:0;border-radius:10px;box-shadow:none;color:#1d1d1f;background:transparent;padding:10px 12px;font-size:14px;font-weight:500;line-height:1.45;white-space:normal;cursor:pointer}.mo-roster .btn.primary,.roster-dialog-content .btn.primary{background:#0071e3;color:#fff;border:1px solid transparent;font-weight:600;min-height:48px;border-radius:13px}.mo-roster button:disabled,.roster-dialog-content button:disabled{opacity:1;cursor:not-allowed;color:#6e6e73;background:#f5f5f7}.mo-roster :where(button,a,input,select,textarea,summary):focus-visible,.roster-dialog-content :where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #0071e3;outline-offset:2px}.roster-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
/* Three compact rows; expanded rules and exceptional feedback retain their natural height. */
.roster-compact-header{min-width:0}.roster-topline{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;margin:0}.mo-roster .roster-back,.mo-roster .roster-text-action{flex:none;padding:8px 0;color:#6e6e73;font-size:13px;min-height:44px;white-space:nowrap}.mo-roster .roster-text-action{min-width:44px;text-align:right}.roster-native-title{display:flex;flex:1;min-width:0;align-items:center;justify-content:center;gap:8px;margin:0}.roster-native-title h2{color:#1d1d1f;font-size:28px;letter-spacing:-.035em;line-height:1.2;font-weight:650;margin:0;white-space:nowrap}.roster-inline-state{font-size:12px;line-height:1.5;color:#6e6e73;overflow-wrap:anywhere}.roster-native-period{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;margin:8px 0}.roster-datebar{display:grid;grid-template-columns:44px 87px 44px;gap:0;align-items:center;width:175px;min-width:175px;flex:none}.mo-roster .roster-datebar .btn{min-height:44px;height:44px;padding:8px 0;font-size:25px}.mo-roster .roster-datebar .roster-week-label{font-size:14px;color:#6e6e73;white-space:nowrap;font-weight:400}.roster-native-toolbar .select{width:190px;min-width:100px;max-width:calc(100% - 183px);min-height:48px;border:1px solid #e8e8ed;border-radius:12px;background:#fff;color:#1d1d1f;font-size:14px;padding:10px 12px;font-family:inherit}.roster-native-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px;min-width:0}.roster-native-toolbar>.roster-segments{margin-right:auto;flex:none}.roster-segments{display:flex;gap:2px;padding:3px;background:#ededf0;border-radius:11px;min-width:0}.mo-roster .roster-segments>.btn{min-height:44px;padding:7px 15px;flex:1;font-size:13px;white-space:nowrap}.roster-segments>.btn[aria-pressed=true]{background:#fff;box-shadow:0 1px 3px #00000012;color:#1d1d1f}.mo-roster .roster-compact-gap{min-height:44px;font-size:12px;color:#875200;padding:8px 4px;white-space:nowrap}.roster-native-toolbar>.roster-rules{flex:none;border:0;margin:0;min-width:0}.roster-native-toolbar>.roster-rules>summary{min-width:48px;min-height:44px;padding:12px 4px;font-size:13px;line-height:20px;white-space:nowrap;list-style-position:inside}.roster-native-toolbar>.roster-rules[open]{flex:1 0 100%;order:3}.roster-rules[open]>summary{text-align:right}.roster-native-toolbar>.roster-rules>div{padding:8px 0 12px;border-top:1px solid #e8e8ed;display:block}.roster-rules p{font-size:12px;color:#6e6e73;line-height:1.65;margin:6px 0;overflow-wrap:anywhere}.roster-rules p.roster-day-gap{color:#875200}.roster-rules .btn{padding-left:0}

.roster-state{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 14px;border:1px solid #e8e8ed;border-radius:12px;margin:0 0 10px;background:#fff;min-width:0}.roster-state[data-compact=true]{border:0;background:transparent;padding:2px 0 8px;min-height:26px;color:#6e6e73}.roster-state b{font-size:12px;line-height:1.5;font-weight:500}.roster-state p{font-size:13px;line-height:1.6;margin:4px 0 0;overflow-wrap:anywhere}.roster-state[data-state=error],.roster-state[data-state=unknown],.roster-state[data-state=dirty]{border-color:#ead8bc}.roster-state .btn{flex:none}.roster-native-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:24px;align-items:start;min-width:0}.roster-native-layout>div{min-width:0}.roster-table-scroll{width:100%;max-width:100%;max-height:70dvh;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-width:thin;border:0;border-radius:15px;background:#fff;isolation:isolate}.roster-week-table{width:100%;max-width:100%;table-layout:fixed;min-width:0;border-collapse:separate;border-spacing:0;font-size:14px}.roster-week-table .roster-name-col{width:23%}.roster-week-table th,.roster-week-table td{padding:0;min-width:0;text-align:center;vertical-align:middle;border-bottom:1px solid #f0f0f3}.roster-week-table thead th{position:sticky;top:0;z-index:3;background:#fafafa;color:#6e6e73;font-weight:400;border-bottom:1px solid #e8e8ed}.roster-week-table .roster-name-heading{text-align:left;padding-left:20px;left:0;z-index:4;font-size:12px}.roster-date-heading{display:grid;align-content:center;justify-items:center;gap:2px;width:100%;min-width:24px;min-height:80px;border:0;background:transparent;font-family:inherit;padding:6px 0;color:inherit;cursor:pointer}.roster-date-heading b{font-size:18px;line-height:25px;font-weight:550;color:#1d1d1f;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;font-variant-numeric:tabular-nums}.roster-week-table thead th[data-today=true] .roster-date-heading b{background:#1d1d1f;color:#fff}.roster-week-table thead th[data-selected=true]{background:#f0f0f3}.roster-day-name{font-size:11px}.roster-day-stats{display:flex;align-items:center;justify-content:center;gap:3px;font-size:10px;line-height:1.3;white-space:nowrap;font-variant-numeric:tabular-nums}.roster-shortfall{color:#875200;font-size:10px;font-weight:600}.roster-group th{text-align:left;background:#fff;height:41px;padding:14px 20px 5px;font-size:12px;color:#6e6e73;font-weight:600;border-bottom:0;overflow-wrap:anywhere}.roster-group span{float:right;font-weight:400;font-size:11px}.roster-week-table .roster-name{position:sticky;left:0;z-index:2;background:#fff;text-align:left}.roster-name-button{display:flex;align-items:center;width:100%;min-height:48px;padding:9px 8px 9px 20px;background:#fff;border:0;text-align:left;font-family:inherit;color:#1d1d1f;cursor:pointer}.roster-person-main{min-width:0;display:grid;gap:2px}.roster-person-main b{font-size:14px;line-height:1.4;font-weight:500;white-space:normal;overflow-wrap:anywhere}.roster-person-main small{font-size:10px;line-height:1.3;color:#6e6e73}.roster-person-main small:empty{display:none}.mo-roster .roster-assignment{position:relative;display:flex;justify-content:center;align-items:center;width:100%;min-width:24px;min-height:48px;height:100%;padding:7px 0;border:0;border-radius:0;background:#fff;color:#1d1d1f;box-shadow:none;font-family:inherit;cursor:pointer}.mo-roster .roster-assignment b{font-size:14px;line-height:1.4;font-weight:500}.mo-roster .roster-assignment[data-rest=true],.mo-roster .roster-assignment[data-empty=true]{color:#6e6e73;background:#fff}.mo-roster .roster-assignment[data-changed=true]:after{content:"";position:absolute;bottom:4px;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:#875200}.roster-note-dot{position:absolute;bottom:3px;right:3px;color:#6e6e73;line-height:1}.roster-under{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;color:#6e6e73;font-size:11px;padding:5px 0}.mo-roster .roster-under .btn{font-size:11px;color:#6e6e73;padding:8px 0}
.roster-desktop-day{position:sticky;top:24px;min-width:0}.roster-day-panel{background:#fff;border-radius:16px;padding:22px}.roster-day-panel h3{font-size:22px;line-height:1.3;font-weight:600;letter-spacing:-.035em;margin:0 0 8px}.roster-day-overview{font-size:12px;color:#6e6e73;margin:0 0 12px}.roster-day-gap{color:#875200;font-size:13px;line-height:1.6;margin:12px 0;font-weight:500;overflow-wrap:anywhere}.roster-day-group{margin-top:20px}.roster-day-group h4{font-size:13px;color:#6e6e73;margin:0 0 8px}.roster-day-member{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:48px;text-align:left;padding:9px 0;border:0;border-top:1px solid #f0f0f3;color:#1d1d1f;background:transparent;font-family:inherit;font-size:14px;cursor:pointer}.roster-day-member>span:first-child{flex:1;overflow-wrap:anywhere}.roster-day-member>span:last-child{text-align:right;flex:none}.roster-day-member b{font-size:13px;font-weight:500}.roster-day-member small{display:block;font-size:11px;color:#6e6e73;margin-top:2px}.roster-action-dock{position:fixed;bottom:0;left:0;right:0;z-index:28;border-top:1px solid #e8e8ed;background:#f5f5f7;padding:14px 32px calc(14px + env(safe-area-inset-bottom))}.roster-action-dock>div{max-width:1136px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:22px}.roster-dock-caption{font-size:12px;color:#6e6e73}.roster-dock-actions{display:flex;align-items:center;gap:20px}.roster-dock-actions .primary{min-width:170px}.mo-roster .roster-auto-action{font-size:13px;color:#6e6e73;padding:8px 0}.roster-disclosure,.roster-manager-departments{border:0;border-top:1px solid #e8e8ed;margin:5px 0 0}.roster-disclosure>summary,.roster-manager-departments>summary,.roster-dialog-content details>summary{min-height:44px;display:list-item;padding:12px 0;cursor:pointer;font-size:13px;color:#6e6e73}.roster-disclosure>div{display:grid;gap:12px;padding:6px 0 14px}.roster-advanced label{display:grid;gap:7px;font-size:13px}.roster-inline-actions{display:flex;flex-wrap:wrap;gap:6px}.roster-inline-actions .btn{background:#fff;border:1px solid #e8e8ed}.roster-muted{font-size:12px;color:#6e6e73;line-height:1.65;margin:8px 0}.roster-empty{padding:25px 0;text-align:center;color:#6e6e73;font-size:13px;line-height:1.7}.roster-empty h3{color:#1d1d1f;font-size:18px}
.roster-dialog-content{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;color:#1d1d1f;min-width:0}.roster-dialog-content p{line-height:1.7}.roster-dialog-content .field{min-width:0}.roster-dialog-content .input,.roster-dialog-content .select,.roster-dialog-content .textarea,.mo-roster .input{min-width:0;width:100%;min-height:48px;font-size:16px;padding:12px;border:1px solid #dedee3;border-radius:12px;background:#fff;color:#1d1d1f;font-family:inherit}.roster-dialog-content .field>label{font-size:13px;font-weight:500;color:#1d1d1f}.roster-dialog-content small{color:#6e6e73;line-height:1.6}.roster-dialog-note{color:#6e6e73;font-size:12px;line-height:1.7;margin:12px 0;overflow-wrap:anywhere}#dialog:has(.roster-dialog-content){border-radius:24px;color:#1d1d1f;background:#fff}#dialog:has(.roster-dialog-content) .sheet{background:#fff}#dialog:has(.roster-dialog-content) .btn.primary{background:#0071e3;color:#fff;border-color:#0071e3}#dialog:has(.roster-dialog-content) .iconbtn{width:44px;height:44px;min-height:44px;background:#f5f5f7;color:#6e6e73;border:0;border-radius:50%}.roster-quick-shifts{display:grid;gap:0;border-top:1px solid #e8e8ed}.roster-dialog-content .roster-quick-shifts .btn{min-height:64px;padding:14px 2px;text-align:left;border-radius:0;border-bottom:1px solid #e8e8ed;font-size:15px;background:#fff}.roster-quick-shifts .btn[aria-pressed=true]{box-shadow:inset 3px 0 #1d1d1f;padding-left:12px}.roster-quick-shifts .btn:disabled{color:#6e6e73;background:#f5f5f7}.roster-day-chips{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:6px;margin:4px 0 16px}.roster-day-chips .btn{min-height:52px;background:#f5f5f7;padding:8px 4px;font-size:12px}.roster-day-chips .btn[aria-pressed=true]{background:#1d1d1f;color:#fff}.roster-busy-reason{background:#f5f5f7;padding:12px;border-radius:10px}.roster-choices{border:0;padding:0;margin:0;display:grid;gap:8px;min-width:0}.roster-choices legend{font-size:14px;font-weight:600;margin-bottom:10px}.roster-choice{display:flex;align-items:center;gap:10px;min-height:52px;padding:12px;border:1px solid #e8e8ed;border-radius:11px;font-weight:400!important;background:#fff}.roster-choice>span{display:grid;gap:4px;min-width:0}.roster-choice input{width:20px;height:20px;flex:none;accent-color:#0071e3}.roster-choice b{font-size:14px}.roster-choice small{font-size:12px}.roster-checkbox-list{max-height:270px;overflow:auto;display:grid;gap:6px;padding:2px}.roster-batch-days{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.roster-batch-days .roster-choice{font-size:12px;padding:8px 4px}.roster-preview{padding:12px;background:#f5f5f7;border-radius:12px;font-size:14px;line-height:1.8}.roster-auto-summary{font-size:15px;font-weight:500}.roster-preview-counts{display:flex;gap:28px;padding:12px 0 20px;border-bottom:1px solid #e8e8ed;font-size:12px;color:#6e6e73}.roster-preview-counts b{display:block;font-size:27px;color:#1d1d1f;font-weight:550}.roster-preview-gap{font-size:12px;color:#875200;margin:4px 0}.roster-auto-numbers{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:4px 0}.roster-auto-numbers .wide{grid-column:1/-1}.roster-auto-scope{display:grid;grid-template-columns:32px minmax(0,1fr);gap:4px 6px;padding:12px 0;border:0;border-top:1px solid #e8e8ed;min-width:0}.roster-auto-scope legend{font-size:13px;font-weight:600;overflow-wrap:anywhere;padding-top:12px}.roster-auto-check{min-height:44px;display:flex;justify-content:center;align-items:center;font-size:0!important}.roster-auto-check input{width:20px;height:20px;accent-color:#0071e3}.roster-auto-scope>.wide{grid-column:2}.roster-auto-scope>.wide>label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.roster-auto-counts{grid-column:1/-1}.roster-auto-counts>summary,.roster-auto-advanced>summary{min-height:44px;padding:10px 0;font-size:12px;color:#6e6e73;cursor:pointer}.roster-manager-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}.roster-manager-row{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:52px;border-top:1px solid #e8e8ed;padding:6px 0}.roster-manager-row>span{min-width:0;overflow-wrap:anywhere}.roster-manager-row b{display:block;font-size:14px;font-weight:500}.roster-manager-row small{display:block;font-size:11px;color:#6e6e73}.roster-manager-row .btn{flex:none;font-size:12px}.roster-department-block{padding:4px 0 12px}.roster-position-row{margin-left:16px}.roster-master-list h3{font-size:16px}.roster-shift-segments{display:grid;gap:12px}.roster-shift-segment{display:grid;grid-template-columns:1fr 1fr;gap:10px;border:1px solid #e8e8ed;padding:12px;border-radius:12px}.roster-guide{display:grid;gap:16px;font-size:14px;line-height:1.7;padding-left:20px}
@media(max-width:999px){.roster-native-layout{grid-template-columns:1fr}.roster-desktop-day{display:none}.mo-roster{max-width:760px}}@media(max-width:600px){html[data-roster-route=ready],html[data-roster-route=ready] body{background:#fff}.mo-roster{padding:8px 16px 106px}.roster-topline{margin:0}.roster-native-title{display:flex;margin:0;gap:6px}.roster-native-title h2{font-size:20px;margin:0}.roster-datebar{width:175px;min-width:175px;grid-template-columns:44px 87px 44px}.mo-roster .roster-datebar .roster-week-label{font-size:14px}.roster-native-toolbar{gap:8px}.roster-native-toolbar .select{width:160px;min-height:48px;font-size:13px}.mo-roster .roster-segments .btn{min-height:44px;padding:7px 12px;font-size:12px}.roster-state{padding:10px;flex-wrap:wrap}.roster-state[data-compact=true]{padding:0 0 8px}.roster-state .btn{min-height:44px}.roster-table-scroll{max-height:65dvh;border-radius:0}.roster-week-table .roster-name-col{width:26%}.roster-week-table .roster-name-heading{padding-left:0;font-size:10px}.roster-date-heading{min-height:78px}.roster-date-heading b{font-size:16px;width:24px;height:24px}.roster-day-name{font-size:10px}.roster-day-stats,.roster-shortfall{font-size:9px}.roster-group th{padding:14px 0 5px;font-size:11px;line-height:1.5}.roster-group span{font-size:10px}.roster-name-button{padding:9px 3px 9px 0;min-height:48px}.roster-person-main b{font-size:13px}.mo-roster .roster-assignment{min-height:48px;font-size:13px}.mo-roster .roster-assignment b{font-size:13px}.roster-under{font-size:10px}.mo-roster .roster-under .btn{font-size:10px}.roster-day-panel{padding:16px;background:#fafafa}.roster-day-panel h3{font-size:20px}.roster-action-dock{padding:11px 16px calc(12px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #f0f0f3}.roster-action-dock>div{display:block}.roster-dock-caption{display:none}.roster-dock-actions{display:grid;grid-template-columns:88px minmax(0,1fr);gap:14px}.roster-dock-actions .primary{min-width:0;width:100%}.mo-roster .roster-auto-action{font-size:12px}.roster-shift-segment{grid-template-columns:1fr}#dialog:has(.roster-dialog-content){border-radius:24px 24px 0 0}}@media(max-width:350px){.mo-roster{padding-left:14px;padding-right:14px}.roster-week-table .roster-name-col{width:27%}.roster-person-main b{font-size:12px}.mo-roster .roster-assignment b{font-size:12px}.roster-native-toolbar .select{font-size:13px;min-width:100px}.mo-roster .roster-segments .btn{padding-left:10px;padding-right:10px}.roster-dock-actions{grid-template-columns:83px minmax(0,1fr);gap:12px}.roster-batch-days{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(prefers-reduced-motion:reduce){.mo-roster *,.roster-dialog-content *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media print{.roster-topline,.roster-native-period,.roster-native-toolbar,.roster-state,.roster-action-dock,.roster-advanced,.roster-desktop-day,.roster-under{display:none}.mo-roster{padding:0;max-width:none}.roster-native-layout{display:block}.roster-table-scroll{max-height:none;overflow:visible}.roster-week-table thead th,.roster-week-table .roster-name{position:static}.roster-person-row{break-inside:avoid}}
.mo-roster .roster-native-toolbar .roster-segments>button{white-space:nowrap!important;min-width:58px;flex:none;line-height:1.4}

.mo-roster .roster-dock-actions[data-empty=true]{grid-template-columns:minmax(0,1fr)}

/* Mobile has two persistent 44px rows. Rules expand naturally; warnings remain outside the compact header. */
@media(max-width:600px){.roster-compact-header .roster-native-title{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.roster-compact-header .roster-back-label{display:none}.roster-topline{gap:6px;min-height:44px;margin:0 0 4px}.mo-roster .roster-back{width:44px;min-width:44px;height:44px;padding:4px 0;font-size:25px;line-height:1}.mo-roster .roster-text-action{width:44px;min-width:44px;text-align:right}.roster-native-toolbar{gap:6px;min-height:44px;margin:0 0 4px}.roster-native-toolbar .select{flex:1;min-width:100px;width:auto;max-width:none;min-height:44px;height:44px;padding:8px;font-size:13px}.roster-native-toolbar>.roster-segments{padding:0;margin-right:0;gap:2px}.mo-roster .roster-native-toolbar .roster-segments>button{min-width:50px;min-height:44px;height:44px;padding:7px 6px;font-size:11px;white-space:nowrap!important}.roster-native-toolbar>.roster-rules>summary{min-width:44px;padding:12px 2px}.roster-date-heading{min-height:60px;height:60px;gap:1px;padding:3px 0}.roster-date-heading b{width:20px;height:20px;line-height:20px;font-size:15px}.roster-day-name{font-size:10px;line-height:11px}.roster-day-stats{flex-direction:column;gap:0;min-height:18px;font-size:9px;line-height:1}.roster-day-stats>span{line-height:9px}.roster-shortfall{font-size:9px}.roster-under{align-items:flex-start}.roster-under>span{padding:8px 0;min-width:0;overflow-wrap:anywhere}.roster-under .roster-inline-state{font-size:inherit}.roster-under .btn{flex:none}}

.mo-roster .roster-back-mobile{display:none}@media(max-width:600px){.mo-roster .roster-back-icon,.mo-roster .roster-back-label{display:none}.mo-roster .roster-back-mobile{display:inline}.mo-roster .roster-back{font-size:13px;line-height:1.45}.roster-table-scroll{max-height:calc(100dvh - 178px)}.roster-group th{height:32px;padding:8px 0 3px}}

/* The automatic roster form exposes its count inputs without a disclosure. */
.roster-dialog-content .roster-auto-counts{grid-column:1/-1;padding:4px 0}.roster-dialog-content .roster-auto-counts .field>label{display:block;margin-bottom:6px;font-size:13px}.roster-dialog-content .roster-auto-counts .input{min-height:48px;font-variant-numeric:tabular-nums;text-align:center}

/* Reference details belong to the preview sheet; main roster geometry stays unchanged. */
.roster-dialog-content .roster-auto-target-note{font-size:12px;line-height:1.65;color:#875200;margin:8px 0;overflow-wrap:anywhere}
.roster-demand-reference{min-width:0;margin:0 0 20px;padding-bottom:16px;border-bottom:1px solid #e8e8ed}
.roster-demand-reference h3{font-size:16px;line-height:1.5;margin:0 0 8px;font-weight:600;overflow-wrap:anywhere}
.roster-demand-group{margin:16px 0}
.roster-demand-group h4{font-size:13px;line-height:1.5;font-weight:600;margin:0 0 8px;overflow-wrap:anywhere}
.roster-demand-targets{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;padding:0;margin:0;list-style:none}
.roster-demand-targets li{display:grid;gap:5px;text-align:center;padding:8px 0;background:#f5f5f7;border-radius:7px;min-width:0}
.roster-demand-targets li>span:not(.roster-sr-only){font-size:10px;line-height:1.4;color:#6e6e73}
.roster-demand-targets b{font-size:12px;line-height:1.5;color:#1d1d1f;font-weight:550;white-space:nowrap;font-variant-numeric:tabular-nums}
.roster-dialog-content .roster-demand-adopt{min-height:48px;width:100%;margin:4px 0 0;white-space:normal;background:#f5f5f7;color:#1d1d1f}
.roster-demand-day{min-width:0}
.roster-demand-day>summary{overflow-wrap:anywhere}
.roster-demand-table{width:100%;table-layout:fixed;border-collapse:collapse;min-width:0;font-size:12px;font-variant-numeric:tabular-nums}
.roster-demand-table th,.roster-demand-table td{padding:10px 4px;text-align:left;vertical-align:top;border-bottom:1px solid #e8e8ed;overflow-wrap:anywhere;font-weight:400;line-height:1.5}
.roster-demand-table th:first-child{width:30%}
.roster-demand-table thead th{font-size:11px;color:#6e6e73;font-weight:500}
.roster-demand-table span,.roster-demand-table small{display:block;font-size:10px;line-height:1.5;margin-top:3px;color:#6e6e73}
@media(max-width:350px){.roster-demand-table{font-size:11px}.roster-demand-table th,.roster-demand-table td{padding:9px 3px}.roster-demand-table span,.roster-demand-table small{font-size:9px}}

/* Preview prioritizes the current result. Its footer is outside the scroll body. */
#dialog:has(.roster-auto-preview) .sheet{display:flex;flex-direction:column;overflow:hidden}
#dialog:has(.roster-auto-preview) .sheethead{flex:none}
#dialog:has(.roster-auto-preview) .sheet>.roster-dialog-content{display:flex;flex:1;min-height:0}
.roster-auto-preview{display:flex;flex-direction:column;min-width:0;width:100%;max-height:calc(100dvh - 150px);min-height:0}
.roster-preview-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 2px 12px}
.roster-preview-result .roster-auto-summary{margin:0 0 8px;font-size:15px}
.roster-preview-result .roster-preview-counts{padding:4px 0 10px;gap:24px}
.roster-preview-result .roster-preview-counts b{font-size:25px}
.roster-preview-result .roster-day-gap{margin:10px 0 5px}
.roster-preview-result .roster-preview-gap{margin:3px 0}
.roster-preview-read-note{font-size:11px;color:#6e6e73;margin:3px 0 10px;line-height:1.5}
.roster-preview-body .roster-demand-reference{margin:16px 0 8px;padding-bottom:8px}
.roster-preview-body .roster-demand-reference h3{font-size:14px;margin-bottom:5px}
.roster-preview-body .roster-demand-reference>.roster-dialog-note{margin:5px 0;font-size:11px}
.roster-preview-body .roster-demand-group{margin:10px 0}
.roster-preview-body .roster-demand-group h4{margin:0 0 5px}
.roster-preview-body .roster-demand-targets li{padding:6px 0;gap:3px}
.roster-preview-footer{flex:none;display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:6px;border-top:1px solid #e8e8ed;padding:10px 0 calc(4px + env(safe-area-inset-bottom));background:#fff}
#dialog .roster-preview-footer .btn{min-height:48px;padding:8px 6px;font-size:12px;white-space:nowrap;min-width:0}
.roster-preview-footer small{grid-column:1/-1;text-align:center;color:#6e6e73;font-size:10px;line-height:1.4}
.roster-demand-validation h4{font-size:13px;font-weight:600;margin:12px 0 6px}

/* R76 directory navigation stays in the same sheet, with an explicit parent. */
.roster-management{min-width:0}.roster-management h3{font-size:16px;line-height:1.5;margin:20px 0 8px}.roster-management h3 small{font-size:12px;font-weight:400;color:#6e6e73}.roster-manager-tabs{display:flex;gap:4px;padding:3px;background:#ededf0;border-radius:11px;margin:0 0 14px}.roster-manager-tabs .btn{flex:1;min-height:44px;white-space:nowrap;font-size:13px;padding:8px}.roster-manager-tabs .btn[aria-pressed=true]{background:#fff;box-shadow:0 1px 3px #00000012;color:#1d1d1f}.roster-management .btn,.roster-manager-back{min-height:44px}.roster-manager-back{grid-column:1/-1;width:fit-content;margin:0 0 8px;font-size:13px;padding:8px 0;color:#1d1d1f}.roster-manager-filter{display:grid;gap:6px;font-size:12px;color:#6e6e73;margin:14px 0}.roster-manager-filter .select{width:100%;min-height:48px;color:#1d1d1f}.roster-department-link{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;width:100%;border:0;border-top:1px solid #e8e8ed;background:#fff;padding:10px 0;text-align:left;font-family:inherit;color:#1d1d1f;cursor:pointer}.roster-department-link>span:first-child{min-width:0;overflow-wrap:anywhere}.roster-department-link b{display:block;font-size:15px;font-weight:600;line-height:1.5}.roster-department-link small{display:block;font-size:12px;line-height:1.5;color:#6e6e73}.roster-department-link>span:last-child{font-size:22px;color:#6e6e73}.roster-manager-breadcrumb{font-size:13px;color:#6e6e73;line-height:1.6;overflow-wrap:anywhere;margin:0 0 12px}.roster-manager-done{width:100%;margin:18px 0 0;border-top:1px solid #e8e8ed}.roster-manager-cancel{display:contents}.roster-manager-leave{grid-column:1/-1;margin:0 0 12px;padding:12px}.roster-manager-leave p{font-size:13px;line-height:1.65;margin:0 0 8px}.roster-management .roster-manager-departments{border:0;margin:0}.roster-management .roster-department-block{padding-bottom:20px}.roster-management .roster-position-row{margin-left:12px}.roster-management :is(button,select):focus-visible,.roster-manager-back:focus-visible{outline:2px solid #0071e3;outline-offset:2px}
@media(max-width:600px){.roster-topline{gap:3px}.mo-roster .roster-text-action{width:60px;min-width:60px;font-size:12px}.roster-manager-toolbar{gap:6px}.roster-manager-toolbar .btn{font-size:12px;padding:8px 12px}.roster-management .roster-manager-row{min-height:52px}.roster-management .roster-manager-row .btn{min-width:44px}.roster-manager-tabs .btn{font-size:13px}}

.roster-share{display:grid;gap:14px;max-width:820px;margin:auto}.roster-share p{margin:0;line-height:1.6}.roster-share-state{font-weight:750;color:#254e3e}.roster-share-actions,.roster-share-pages{display:flex;align-items:center;gap:10px;justify-content:space-between}.roster-share-actions .btn{flex:1;min-height:46px}.roster-share-choice{display:grid;gap:10px}.roster-share-choice .btn{min-height:48px}.roster-share-image{display:block;width:100%;height:auto;background:#fff;border:1px solid #dce4df;border-radius:12px;-webkit-touch-callout:default;user-select:auto}.roster-share textarea{box-sizing:border-box;width:100%;font:inherit;line-height:1.6;padding:12px;border:1px solid #d5ded8;border-radius:10px}.roster-share-feedback{font-size:13px;color:#456253}.roster-share summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.roster-share-pages span{font-size:13px;white-space:nowrap}
/* The authenticated image flow shares the native roster palette. */
.roster-share-state{color:#1d1d1f;font-weight:600}.roster-share-feedback{color:#6e6e73}.roster-share-image{border-color:#e8e8ed}.roster-share textarea{border-color:#dedee3;background:#f7f7f9;color:#1d1d1f;border-radius:12px}.roster-share-choice .btn,.roster-share-actions .btn{border:1px solid #e8e8ed;background:#f5f5f7;color:#1d1d1f}.roster-share-choice .btn.primary,.roster-share-actions .btn.primary{background:#0071e3;color:#fff;border-color:#0071e3}

