:root{--cream:#f5eedf;--card:#fffaf0;--red:#9e2d2c;--charcoal:#292b25;--tan:#e7dac0;--gold:#d3a95e;--ink:#2c302b;--muted:#71685c;color-scheme:light;font:14px/1.45 system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:var(--ink);background:var(--cream)}
*{box-sizing:border-box}body{margin:0}[hidden]{display:none!important}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0}button:disabled{opacity:.5;cursor:not-allowed}
.mast{background:var(--red);color:#fff4db;padding:15px max(15px,env(safe-area-inset-left));box-shadow:0 2px 8px #4222}
.topline{max-width:1080px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:10px}
.eyebrow{font-size:11px;letter-spacing:.18em;font-weight:800;margin:0 0 3px;opacity:.88}.eyebrow.dark{color:#825b2d}
h1{margin:0;font-size:clamp(20px,3vw,28px);line-height:1.15}h2{margin:0 0 8px;font-size:clamp(20px,3vw,24px)}h3{font-size:17px;margin:0 0 8px}h4{margin:0 0 5px}
.subtitle{margin:3px 0 0;color:#ffecd6;font-size:12px}.status-dot{font-size:11px;font-weight:700;white-space:nowrap;color:#fff5de}
.shell{max-width:1080px;margin:auto;padding:12px 12px 50px}.notice{padding:9px 12px;background:#f3e5c5;color:#604526;border:1px solid #d9c5a2;border-radius:9px;margin:0 0 10px;font-size:13px;line-height:1.35}.notice:empty{display:none}
.tabs{display:flex;gap:8px;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#c8a885 #f5eedf;padding:0 0 12px;white-space:nowrap}
.tab{background:#e7dac0;color:#493e33;border-radius:11px;padding:10px 13px;font-size:13px;font-weight:800;white-space:nowrap;min-height:43px}
.tab.active{background:var(--red);color:#fff5dd}
.screen{min-height:220px}.panel,.subpanel{background:var(--card);border:1px solid #e2d4ba;border-radius:16px;padding:15px;margin:0 0 12px;box-shadow:0 2px 6px #4332180c}.subpanel{margin:0;background:#fff8e8}
.panel.compact{padding:12px}.panel h2{font-size:17px}
.row,.welcome,.accountbar{display:flex;align-items:center;justify-content:space-between;gap:11px}.row{flex-wrap:wrap}
.welcome{padding:10px 3px 13px;align-items:flex-start}.welcome h2{font-size:22px;margin:3px 0}.muted{color:var(--muted);font-size:12px;margin:4px 0 10px;line-height:1.5}
.accountbar{padding:0 3px 9px;font-size:12px;color:#5b503f}
.columns{display:grid;grid-template-columns:1fr 1fr;gap:10px}.columns>*{min-width:0}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:11px}
.stat{background:#fffaf0;border:1px solid #ddcfb7;border-radius:12px;padding:10px;color:var(--charcoal);min-width:0}
.stat strong{font-size:21px;color:var(--red);display:block;line-height:1.1}.stat small{font-weight:700;color:#766a58;font-size:11px;line-height:1.2}
.dept-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.dept-unit{min-width:0}.dept-unit.expanded{grid-column:1/-1}.tile{border-radius:13px;padding:13px 10px;color:white;text-align:left;display:flex;flex-direction:column;justify-content:space-between;gap:7px;width:100%;min-height:88px;box-shadow:inset 0 -25px 40px #0001}
.tile strong{font-size:14px;line-height:1.2}.tile small{font-size:11px;opacity:.96}.tile:focus-visible{outline:3px solid #d8a648;outline-offset:2px}.dept-unit.expanded .tile{min-height:56px;border-radius:12px 12px 0 0}.dept-expanded{background:#fffaf0;border:2px solid #d2bd92;border-radius:0 0 12px 12px;padding:12px}
.dept-actions{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:8px}
.stack{display:grid;gap:9px}.task,.entry{border:1px solid #dfcfb4;border-left:5px solid var(--red);border-radius:12px;background:#fffdf8;padding:12px;overflow-wrap:anywhere}
.task[data-state="submitted"]{border-left-color:#b88824}.task[data-state="completed"]{border-left-color:#497a52}.task[data-state="corrections"]{border-left-color:#a7422e}
.task-title{font-size:14px;font-weight:800;margin:0}.task-meta{font-size:12px;color:#675f55;margin:4px 0}.task p,.entry p{font-size:13px;white-space:pre-wrap;margin:5px 0}
.task-actions,.actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:7px}
.pill{border-radius:30px;background:#e9dfcd;color:#5b503f;font-size:11px;font-weight:800;padding:4px 8px;white-space:nowrap}
.pill.red{background:#f7d6d2;color:#962b29}.pill.gold{background:#f4e3b5;color:#795b19}.pill.green{background:#dbebd9;color:#32603b}
.btn{background:var(--red);color:#fff9ec;border-radius:10px;padding:10px 13px;min-height:43px;font-weight:800;margin:3px 0}
.btn.secondary{background:#e7dac0;color:#453625}.btn.outline{background:transparent;color:#68462a;border:1px solid #c5ae88}
.btn.small{padding:7px 10px;min-height:36px;font-size:12px}.btn:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #d8a648;outline-offset:2px}
label{display:block;font-size:12px;font-weight:750;margin:9px 0 5px}
input,textarea,select{display:block;width:100%;min-height:42px;border:1px solid #d3c1a4;background:white;color:#292b25;border-radius:9px;padding:9px;margin-top:5px;min-width:0}
textarea{resize:vertical}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.code{white-space:pre-wrap;overflow-wrap:anywhere;font-family:ui-monospace,monospace;color:#634624;font-weight:700;padding:8px 0}
.crew-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.crew-card{background:#fffcf6;border:1px solid #dfcfb7;border-radius:13px;padding:12px}.crew-card strong{display:block;margin-bottom:5px}.crew-card small{color:#675d4d;display:block;line-height:1.6}
.entry strong{display:block}.empty{font-size:13px;color:#776b56;padding:10px 0}
.leader{display:grid;grid-template-columns:34px 1fr auto;gap:8px;border-bottom:1px solid #e3d4ba;padding:9px;align-items:center}
.leader b{color:#8e2a26}.score{font-weight:800;color:var(--red)}.warning{color:#aa3b2c;font-weight:700}
.foot{text-align:center;font-size:11px;color:#796f60;padding:10px}
@media(max-width:760px){.shell{padding:9px 10px 45px}.columns,.crew-grid{grid-template-columns:1fr}.dept-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.stat{padding:8px}.stat strong{font-size:19px}.stat small{font-size:10px}.tile{padding:10px;min-height:78px}.panel.compact{padding:10px}.welcome h2{font-size:21px}}
@media(min-width:761px){.screen[data-screen="manager-home"] .panel{margin-bottom:10px}}
@media(prefers-reduced-motion:no-preference){.tab,.btn,.tile{transition:filter .15s,transform .15s}.btn:active,.tile:active{transform:scale(.98)}}

details.subpanel{background:#faf1de}
details>summary{cursor:pointer;list-style-position:inside;font-weight:800;color:#7b3029;padding:9px 0;min-height:40px}
details[open]>summary{margin-bottom:13px}
.advanced{border-top:1px solid #d9c7a8;margin-top:14px;padding-top:10px}
.advanced form{padding-top:10px}
#gate .welcome{margin-bottom:9px}
#gate .columns{align-items:start}
#gate h2{color:var(--red)}
#manager-onboarding{box-shadow:none}

/* v0.42 Notification Center: quiet, readable, responsive, and role-scoped. */
.notification-settings{display:grid;gap:12px}
.notification-settings>label,.notification-settings .notice-manager-options>label,
.notification-settings .notice-employee-options>label,
.notification-quiet>label{display:flex;align-items:center;gap:10px;line-height:1.5;
  font-size:1rem;padding:9px 0}
.notification-settings input[type=checkbox]{width:18px;height:18px;
  flex:0 0 auto;accent-color:var(--red)}
.notification-settings .notice-manager-options,
.notification-settings .notice-employee-options{display:grid;gap:3px}
.notification-settings .notice-manager-options[hidden],
.notification-settings .notice-employee-options[hidden]{display:none}
.notification-quiet{border-top:1px solid var(--tan);padding-top:10px}
.notification-quiet .formgrid{margin-top:10px}
#notification-list .entry{border-left:4px solid transparent}
#notification-list .entry.unread{border-left-color:var(--red);background:#fff6e9}
#notification-list .entry .btn{margin-top:8px;margin-right:8px}
#notify-bell{white-space:nowrap}
#push-status{line-height:1.45}
@media(max-width:580px){
 .accountbar{align-items:flex-start;gap:10px}
 .accountbar .actions{display:flex;flex-wrap:wrap;justify-content:flex-end}
 .notification-settings .formgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* v0.43 foreground activity banner. Does not obscure forms or navigation. */
.live-activity{
  position:sticky;top:8px;z-index:20;
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;flex-wrap:wrap;margin:0 0 12px;padding:12px 14px;
  border:1px solid #bba071;border-left:5px solid var(--red);
  background:#fff6e4;border-radius:10px;
  color:var(--charcoal);box-shadow:0 1px 4px #342b2015;
}
.live-activity>span{flex:1 1 190px;font-weight:600}
.live-activity .btn{white-space:nowrap}
.live-activity[hidden]{display:none}
@media(max-width:580px){
  .live-activity{gap:8px}
  .live-activity>span{flex:1 0 100%}
}

/* Notification tap deep-link: find the right inbox item immediately,
 * while keeping the original warm-cream employee/manager palette. */
#notification-list .entry.notification-target{
  border-left:5px solid #a52e2c;
  background:#fff0d7;
  outline:2px solid #a52e2c;
  outline-offset:2px;
  box-shadow:0 0 0 5px #f0d8b9;
}
#notification-list .entry.notification-target:focus{
  outline:3px solid #a52e2c;
}
