/* App shell (7 October 2026): folded icon rail, open tabs, Flowbite-style tokens, olive accent. Loaded after portal.css. */
:root{
  --bg:#f9fafb;--surface:#fff;--paper:#fff;--cream:#f3f4f6;--line:#e5e7eb;--line-strong:#d1d5db;--text:#111827;--muted:#6b7280;
  --clay:#6b704f;--clay-dark:#565b3e;--radius:8px;--radius-lg:8px;--shadow:0 1px 2px #0000000d;
  --sans:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;--display:var(--sans);
}
h1,h2,h3,h4{font-family:var(--sans);font-weight:700}
h1{font-size:22px}
.page-tabs button[aria-current=page]{color:var(--olive-dark);border-bottom-color:var(--olive)}
table th{text-transform:uppercase;font-size:11.5px;letter-spacing:.03em;color:var(--muted);background:#f9fafb}
.badge,.chip,.pill{border-radius:999px}
#open-tabs{display:none}
@media(min-width:961px){
  :root{--sidebar:76px}
  body.bb-rail .sidebar{background:var(--espresso);border-right:0}
  body.bb-rail .app-brand,body.bb-rail #app-nav,body.bb-rail .sidebar-foot .user-chip span:not(.avatar),body.bb-rail #sign-out,body.bb-rail .close-nav{display:none}
  body.bb-rail .sidebar-foot{border:0;display:flex;justify-content:center;padding:10px 0 14px}
  body.bb-rail .sidebar-foot .user-chip{padding:0;border:0;background:transparent;min-height:0}
  #rail{display:flex;flex-direction:column;align-items:center;gap:2px;padding:14px 0 6px;flex:1;overflow-y:auto;scrollbar-width:none}
  #rail .rail-logo{width:34px;height:34px;margin-bottom:12px;display:block}
  #rail button{width:66px;min-height:0;padding:7px 0 5px;border:0;border-radius:8px;background:transparent;color:#cdbfae;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px;font-weight:500;position:relative}
  #rail button:hover{background:#ffffff14;color:#fff}
  #rail button[aria-current=true]{background:var(--olive);color:#fff}
  #rail button svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  #rail button[data-count]::after{content:attr(data-count);position:absolute;top:2px;right:8px;min-width:16px;padding:0 4px;border-radius:9px;background:#e02424;color:#fff;font-size:10px;font-weight:700;line-height:16px}
  #rail .rail-gap{flex:1}
  #open-tabs{display:flex;align-self:flex-end;gap:2px;min-width:0;flex:1;overflow-x:auto;scrollbar-width:none}
  #open-tabs::-webkit-scrollbar{display:none}
  #open-tabs .otab{display:flex;align-items:center;gap:6px;flex:none;max-width:220px;padding:0 6px 0 12px;height:38px;border:1px solid transparent;border-bottom:0;border-radius:8px 8px 0 0;color:var(--muted);font-weight:500;font-size:14px;cursor:pointer;background:transparent}
  #open-tabs .otab span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #open-tabs .otab:hover{color:var(--text)}
  #open-tabs .otab[aria-current=true]{background:var(--bg);border-color:var(--line);color:var(--text);margin-bottom:-1px;height:39px}
  #open-tabs .otab button{min-height:0;width:20px;height:20px;padding:0;border:0;border-radius:4px;background:transparent;color:#9ca3af;font-size:15px;line-height:1}
  #open-tabs .otab button:hover{background:var(--cream);color:var(--text)}
  body.bb-rail #toggle-nav,body.bb-rail #crumb{display:none}
  body.bb-rail .app-topbar{padding-left:12px;gap:8px}
  #area-strip{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:0 0 18px;overflow-x:auto;scrollbar-width:none}
  #area-strip::-webkit-scrollbar{display:none}
  #area-strip button{flex:none;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;min-height:40px;padding:8px 14px;color:var(--muted);font-weight:500;white-space:nowrap}
  #area-strip button:hover{color:var(--text);background:transparent}
  #area-strip button[aria-current=true]{color:var(--olive-dark);border-bottom-color:var(--olive)}
  #area-strip button[data-count]::after{content:attr(data-count);margin-left:6px;padding:0 6px;border-radius:9px;background:var(--cream);color:var(--text);font-size:11.5px}
  body.bb-rail .page-tabs{border-bottom:0;margin-top:-8px;gap:6px}
  body.bb-rail .page-tabs button{border:0;border-radius:999px;min-height:32px;padding:5px 12px}
  body.bb-rail .page-tabs button[aria-current=page]{background:var(--espresso);color:#fff}
}
@media(max-width:960px){#rail,#area-strip{display:none}}
