/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .2s var(--ease); }
.shell.collapsed { grid-template-columns: var(--sidebar-w-collapsed) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 12px 10px; z-index: 40; }
.biz-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; margin-bottom: 14px; transition: .12s; }
.biz-switch:hover { background: var(--surface-2); border-color: var(--line-strong); }
.biz-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; flex: none; background: var(--accent-soft-2); overflow: hidden; }
.biz-mark img { width: 100%; height: 100%; object-fit: cover; }
.biz-switch .nm { font-weight: 700; line-height: 1.2; font-size: 14px; } .biz-switch .tp { font-size: 12px; color: var(--ink-3); }
.nav-label { padding: 14px 12px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); white-space: nowrap; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); font-weight: 550; text-decoration: none; white-space: nowrap; position: relative; margin-bottom: 1px; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 650; }
.nav-item .icon { width: 19px; height: 19px; }
.nav-item .pill { margin-left: auto; font-size: 11px; font-weight: 700; background: var(--danger); color: #fff; padding: 1px 7px; border-radius: 99px; }
.sidebar-foot { margin-top: auto; padding-top: 12px; }
.collapse-btn { width: 100%; justify-content: flex-start; }
.shell.collapsed .nav-item span.lbl, .shell.collapsed .nav-label, .shell.collapsed .biz-switch .meta, .shell.collapsed .biz-switch .chev { display: none; }
/* icon-only menu: a badge becomes a dot on the icon so counts are not lost */
.shell.collapsed .nav-item { position: relative; }
.shell.collapsed .nav-item .pill { position: absolute; top: 7px; right: calc(50% - 19px); width: 9px; height: 9px; min-width: 0; padding: 0; font-size: 0; border: 2px solid var(--surface); box-sizing: content-box; }
.shell.collapsed .nav-item { justify-content: center; padding: 0; } .shell.collapsed .biz-switch { justify-content: center; padding: 6px; }
.shell.collapsed .nav-label { display: block; height: 10px; padding: 0; visibility: hidden; }
.shell.collapsed .collapse-btn span.lbl { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: color-mix(in oklab, var(--page) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .title { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.search-trigger { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; color: var(--ink-3); min-width: 260px; font-size: 13.5px; }
.search-trigger:hover { border-color: var(--ink-4); color: var(--ink-2); }
.search-trigger .kbd { margin-left: auto; }
.page { padding: 24px; width: 100%; max-width: 1380px; margin: 0 auto; flex: 1; }
.page.fluid { max-width: none; padding: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.shift-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 600; }
.shift-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in oklab, var(--good) 25%, transparent); }
.shift-pill.closed .dot { background: var(--ink-4); box-shadow: none; }
.progress-bar { position: fixed; left: 0; top: 0; height: 3px; z-index: 500; background: var(--accent-solid); transition: width .3s, opacity .3s; box-shadow: 0 0 8px var(--accent); }

.bottom-nav { display: none; }
.menu-btn { display: none; }
@media (max-width: 1000px) {
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s var(--ease); box-shadow: var(--shadow-3); }
  .sidebar.open { transform: none; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 35; background: var(--overlay); animation: fade .15s; }
  .shell.collapsed .nav-item span.lbl, .shell.collapsed .nav-label, .shell.collapsed .biz-switch .meta { display: initial; }
  .shell.collapsed .nav-item { justify-content: flex-start; padding: 0 12px; }
  .menu-btn { display: inline-flex; }
  .collapse-btn { display: none; }
  .topbar { padding: 0 14px; } .page { padding: 16px 14px 96px; }
  .search-trigger { flex: none; min-width: 0; width: 36px; padding: 0; justify-content: center; gap: 0; } .search-trigger .icon { flex: none; } .search-trigger span, .search-trigger .kbd { display: none; }
  .page.fluid { padding: 0 0 calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-3); font-size: 11px; font-weight: 600; padding: 4px 2px; border: 0; background: none; text-decoration: none; border-radius: 10px; }
  .bottom-nav a.active, .bottom-nav button.active { color: var(--accent-text); }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .hide-tablet { display: none !important; }
  .page-head h1 { font-size: 21px; }
}
@media (max-width: 640px) { .hide-mobile { display: none !important; } }
@media (min-width: 1001px) { .only-tablet { display: none !important; } }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-art { background: linear-gradient(150deg, var(--accent-solid), color-mix(in oklab, var(--accent-solid) 55%, #000)); color: var(--accent-ink); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -160px; top: -140px; background: rgba(255,255,255,.10); }
.auth-art::after { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; left: -90px; bottom: -110px; background: rgba(255,255,255,.08); }
.auth-art h2 { font-size: 36px; line-height: 1.12; letter-spacing: -0.03em; max-width: 440px; position: relative; z-index: 1; }
.auth-art p { opacity: .85; max-width: 420px; margin-top: 14px; font-size: 16px; position: relative; z-index: 1; }
.auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.auth-art li { display: flex; gap: 10px; align-items: center; font-weight: 550; }
.auth-art .brandline { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; position: relative; z-index: 1; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
@media (max-width: 900px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-art { display: none; } .auth-form { align-items: start; padding-top: 12vh; } }
