/* styles-critical.css — критична підмножина для першого paint.
   Каркас: токени, тема, sidebar-shell, видимість вкладок. Потрібна, бо повний
   styles.css вантажиться async (не блокує рендер) — без цього був би FOUC.
   Повний styles.css застосовується одразу після і перекриває ці правила;
   тут — лише те, що визначає перший екран (шелл + активна вкладка). */
:root { --text-muted: #94a3b8; --text-dim: #64748b; --side-w: 240px; }
html[data-theme-effective="light"] { --text-muted: #64748b; --text-dim: #94a3b8; }

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0; min-height: 100vh; display: block; padding: 0;
}
html[data-theme-effective="light"] body {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); color: #1e293b;
}

.container {
  width: 100%; max-width: none; margin: 0; border: 0; border-radius: 0;
  box-shadow: none; background: transparent; min-height: 100vh;
  padding: 24px 32px 64px calc(var(--side-w) + 32px);
}
.container > h1, .container > p.subtitle { display: none; }

.main-tabs-wrap {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w);
  background: #0a0f1b; border-right: 1px solid #1c2740;
  padding: 18px 14px 76px; overflow-y: auto; z-index: 40;
  display: flex; flex-direction: column;
}
html[data-theme-effective="light"] .main-tabs-wrap { background: #f8fafc; border-right-color: #e2e8f0; }
.main-tabs { display: flex; flex-direction: column; gap: 3px; }
.main-tab {
  width: 100%; text-align: left; padding: 11px 14px; border-radius: 11px;
  font-size: 14px; display: flex; align-items: center; gap: 11px;
  border: 0; background: transparent; color: var(--text-muted); cursor: pointer;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
#userInfo {
  position: fixed; left: 0; bottom: 0; width: var(--side-w);
  padding: 12px 14px; z-index: 41; background: #0a0f1b; border-top: 1px solid #1c2740;
}
html[data-theme-effective="light"] #userInfo { background: #f8fafc; border-top-color: #e2e8f0; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

@media (max-width: 900px) {
  .container { padding: 14px 14px 84px; }
  .main-tabs-wrap {
    top: auto; right: 0; bottom: 0; width: auto; height: auto;
    flex-direction: row; padding: 6px; overflow-x: auto; overflow-y: hidden;
    border-right: 0; border-top: 1px solid #1c2740;
  }
  .main-tabs { flex-direction: row; gap: 3px; }
  .main-tab { width: auto; flex-direction: column; gap: 3px; font-size: 11px; padding: 7px 10px; }
  #userInfo { position: static; width: auto; background: transparent; border-top: 0; padding: 0; }
}
