/* ============================================================
   App shell - fixed sidebar (280px / 72px rail) + fixed header + content.
   Sidebar, tabbar and header markup use the source's Tailwind classes (original.css).
   ============================================================ */
.app-shell { min-height: 100vh; }

/* ---------- Brand (logo) ---------- */
.brand { display: inline-flex; align-items: center; gap: 1px; font-weight: 800; font-size: 29px; letter-spacing: -0.8px; color: #fff; line-height: 1; white-space: nowrap; }
.brand__p { width: 24px; height: 31px; flex-shrink: 0; margin-top: 2px; }
.brand__text { color: #fff; }

/* language list rows (LangModal) */
.nav-lang { display: flex; align-items: center; gap: 12px; height: 48px; width: 100%; padding: 0 12px 0 14px; border-radius: var(--r); font-weight: 600; font-size: 14px; text-align: left; transition: background var(--fast); }
.nav-lang:hover { background: var(--grey-8); }
.nav-lang img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.nav-lang .label { flex: 1; }

/* ---------- Header dropdown helpers ---------- */
.dropdown { position: absolute; top: 46px; z-index: 80; padding: 8px; background: var(--background-400); border: 1px solid var(--grey-24); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: scaleIn .2s var(--ease) both; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.switch { appearance: none; width: 38px; height: 22px; border-radius: 22px; background: var(--grey-300); position: relative; cursor: pointer; flex-shrink: 0; transition: background var(--fast); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--fast) var(--ease); }
.switch:checked { background: var(--primary-main); }
.switch:checked::after { transform: translateX(16px); }

/* ---------- Content (#page-content) ---------- */
.content { margin-left: var(--sidebar-w); padding-top: var(--header-h); min-height: 100vh; transition: margin-left 200ms ease-in-out; }
/* .page-max-width-wrapper of the source */
.view { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 640px) { .view { padding: 0; } }

/* collapsed rail (desktop burger) */
.app-shell.sidebar-collapsed { --sidebar-w: var(--sidebar-rail); }

/* Tablets (md..lg): the expanded 280px sidebar is too wide to push the content (it would leave ~480px and
   overflow the lobby). There it opens over the page, the content keeps the rail offset, and a backdrop closes it. */
.sidebar-backdrop { display: none; }
@media (min-width: 768px) and (max-width: 1023px) {
  .app-shell:not(.sidebar-collapsed) .content { margin-left: var(--sidebar-rail); }
  .app-shell:not(.sidebar-collapsed) .o-header-left { padding-left: var(--sidebar-rail) !important; }
  .app-shell:not(.sidebar-collapsed) > aside { box-shadow: 0 0 40px rgba(0, 0, 0, .6); }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(0, 0, 0, .5); animation: fadeIn .2s ease both; }
}
