/* Shared visual system for authenticated workspaces. */
.shell {
  --navy: #102247;
  --blue: #245bea;
  --ink: #192c4c;
  --muted: #5c6b83;
  --line: #e0e6f0;
  --soft-blue: #edf3ff;
  --focus: #2e66f4;
  --radius: 19px;
  grid-template-columns: 264px minmax(0, 1fr);
  background: radial-gradient(ellipse at 95% 0, #e5eeff 0, transparent 45%), #f3f6fb;
}
.shell .sidebar {
  top: 12px;
  height: calc(100dvh - 24px);
  margin: 12px 0 12px 12px;
  padding: 25px 15px 15px;
  gap: 22px;
  border: 1px solid #243958;
  border-radius: 22px;
  background: radial-gradient(ellipse at 0 0, #223e73, transparent 57%), linear-gradient(165deg, #112443, #0c1830);
  box-shadow: 0 16px 40px #14284b15, inset 0 1px #ffffff15;
  scrollbar-width: thin;
  scrollbar-color: #40577d transparent;
}
.shell .sidebar-brand { padding: 0 10px 2px; }
.shell .sidebar-brand .brand { gap: 12px; }
.shell .sidebar-brand .brand img { width: 45px; height: 45px; border-radius: 13px; box-shadow: 0 4px 20px #040d2560; }
.shell .sidebar-company { display: flex; align-items: center; gap: 10px; padding: 13px 10px; border-color: #ffffff1c; background: #ffffff06; border-radius: 13px; font-size: .84rem; }
.sidebar-company > div { min-width: 0; }
.sidebar-company small { display: block; margin-top: 3px; color: #a5b8d5; font-size: .73rem; }
.company-emblem { display: grid; place-items: center; width: 35px; height: 38px; flex: none; border-radius: 10px; background: #ffffff0c; color: #a9c4fc; }
.shell .sidebar-nav { gap: 5px; }
.shell .sidebar .shell-link { position: relative; min-height: 44px; padding: 10px 12px; color: #bfcee5; font-size: .85rem; font-weight: 550; border-radius: 11px; transition: background .18s, color .18s, transform .18s; }
.shell .sidebar .shell-link:hover { color: white; background: #ffffff0c; transform: translateX(2px); }
.shell .sidebar .shell-link.is-active { color: #fff; border-color: #5f8bff80; background: linear-gradient(115deg, #2860ed, #204cc3); box-shadow: 0 5px 15px #020b2b30, inset 0 1px #ffffff20; }
.shell .sidebar .shell-link.is-active .icon { color: white; }
.shell .sidebar-footer { border-color: #ffffff19; padding-top: 13px; }
.shell .sidebar .context-picker { font-size: .76rem; }
.shell .sidebar .context-picker select { color: #eef4ff; border-color: #425578; background: #192c4b; font-size: .8rem; }
.shell .topbar { min-height: 82px; padding-inline: clamp(20px, 3.3vw, 48px); background: #f5f8fce6; backdrop-filter: blur(16px); border-color: #dfe7f180; }
.shell .topbar-section { display: flex; align-items: center; gap: 12px; font-size: .85rem; }
.topbar-area { color: var(--muted); font-weight: 500; }
.topbar-divider { color: #9aa8be; font-weight: 400; }
.topbar-section > .icon { color: #6c80a3; }
.shell .topbar-user { gap: 11px; }
.shell .user-avatar { width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(145deg, #fff, #e1eaff); border-color: #d6e1f4; color: #2449a7; box-shadow: 0 3px 7px #26486d0b; }
.shell .user-label { font-size: .82rem; }
.shell .user-label small { margin-top: 4px; font-size: .71rem; }
.shell .main-content { padding: 28px clamp(20px, 3.3vw, 48px) 44px; min-height: calc(100svh - 82px); max-width: 1530px; }
.shell .page-title { letter-spacing: -.045em; font-weight: 760; }
.shell .card { box-shadow: 0 3px 8px #1f3c6804, 0 10px 30px #1f3c6804; }
.shell .btn { border-radius: 12px; font-size: .88rem; min-height: 46px; padding: 11px 17px; transition: box-shadow .18s, background .18s, border-color .18s, transform .18s; }
.shell .btn-primary { background: linear-gradient(120deg, #2865f0, #2354d6); border-color: #2558dd; color: #fff; box-shadow: 0 5px 12px #2358db22, inset 0 1px #ffffff26; }
.shell .btn-primary:not(:disabled):hover { background: #1d4ac3; box-shadow: 0 6px 16px #2358db32; transform: translateY(-1px); }
.shell .btn:not(:disabled):active { transform: translateY(1px); }
.shell :is(.field input, .field select, .field textarea) { border-color: #cdd8e8; border-radius: 11px; }
.shell :is(.field input, .field select, .field textarea):focus-visible { outline: 2px solid #2962e8; outline-offset: 2px; border-color: #2962e8; }
.shell .loading-state { min-height: 280px; font-size: .9rem; }
.shell .loading-ring { width: 25px; height: 25px; }
.shell #mobile-menu { border: 1px solid #e0e7f2; padding: 22px 18px max(22px, env(safe-area-inset-bottom)); box-shadow: 0 -12px 60px #11244326; }
.shell .drawer-nav { gap: 5px; }
.shell .drawer-nav .shell-link { padding: 12px; border-radius: 12px; font-size: .92rem; }
.shell .drawer-nav .shell-link.is-active { color: #245bea; background: #eaf1ff; border-color: #d7e4ff; }
@media (prefers-reduced-motion: no-preference) {
  .shell .management-page, .shell .worker-area { animation: workspace-enter .28s ease-out backwards; }
  .shell #mobile-menu[open] { animation: drawer-enter .2s ease-out both; }
  @keyframes workspace-enter { from { opacity: .4; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
  @keyframes drawer-enter { from { opacity: .5; transform: translateY(25px); } to { opacity: 1; transform: translateY(0); } }
}
@media (min-width: 851px) and (max-height: 800px) {
  .shell .sidebar { gap: 14px; padding-top: 18px; }
  .shell .sidebar-nav { gap: 2px; }
  .shell .sidebar .shell-link { padding-block: 8px; }
}
@media (max-width: 1100px) and (min-width: 851px) {
  .shell { grid-template-columns: 235px minmax(0, 1fr); }
  .shell .sidebar { padding-inline: 10px; }
  .shell .main-content { padding-inline: 22px; }
}
@media (max-width: 850px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .shell .topbar { min-height: 67px; padding: 10px 18px; background: #ffffffed; }
  .shell .topbar-section { display: none; }
  .shell .topbar-brand { color: var(--navy); }
  .shell .main-content { padding: 20px 18px calc(102px + env(safe-area-inset-bottom)); }
  .shell .mobile-nav { margin: 0 10px max(9px, env(safe-area-inset-bottom)); padding: 6px; gap: 3px; border: 1px solid #dce4f0; border-radius: 19px; background: #fffffff5; backdrop-filter: blur(16px); box-shadow: 0 6px 32px #15305b20; }
  .shell .mobile-nav .shell-link { min-height: 54px; border-radius: 13px; gap: 4px; font-size: .68rem; font-weight: 650; }
  .shell .mobile-nav .shell-link.is-active { color: #2355d4; background: #eaf1ff; }
  .shell .mobile-nav .shell-link.is-active .icon { stroke-width: 2; }
}
@media (max-width: 420px) {
  .shell .main-content { padding-inline: 14px; }
  .shell .topbar { padding-inline: 14px; }
  .shell .mobile-nav { margin-inline: 7px; }
  .shell .btn { padding-inline: 13px; }
}
