/* Оболочка: вход, верхняя панель, меню (боковое на десктопе, нижнее на телефоне). */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px; color: var(--muted); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border-strong); border-top-color: var(--brand-a); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { padding: 24px; text-align: center; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap; }
.logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--grad); color: #fff; font-weight: 800; font-size: 17px; text-shadow: 0 1px 1px rgba(0,0,0,.2); }
.brand-lg { font-size: 18px; margin-bottom: 20px; }
.brand-lg .logo { width: 38px; height: 38px; font-size: 22px; border-radius: 11px; }

/* Вход */
.auth-root { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(900px 400px at 50% -10%, rgba(255, 87, 34, .16), transparent 70%), var(--bg); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px 24px; box-shadow: var(--shadow-2); }
.login-sub { color: var(--muted); margin: 6px 0 20px; font-size: 14px; }
.login-msg { min-height: 0; margin: 2px 0 12px; font-size: 13.5px; }
.login-msg:empty { display: none; }
.login-msg.err { color: var(--bad); background: var(--bad-soft); padding: 8px 12px; border-radius: var(--r-sm); }
.login-msg.ok { color: var(--ok); background: var(--ok-soft); padding: 8px 12px; border-radius: var(--r-sm); }
.login-card form .link-btn { display: block; margin: 10px auto 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Каркас */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--nav-w) 1fr; grid-template-rows: var(--topbar-h) 1fr;
  grid-template-areas: "top top" "nav main"; }
.topbar { grid-area: top; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--border); }
.venue-wrap { flex: 1; min-width: 0; }
.venue-name { color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.venue-select { max-width: 320px; min-height: 36px; padding: 4px 10px; font-weight: 600; }
.topbar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.signout { gap: 6px; }

.nav { grid-area: nav; padding: 16px 12px; border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto;
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); }
.nav-group + .nav-group { margin-top: 16px; }
.nav-label { padding: 4px 12px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 600; }
.nav-item:hover { background: var(--surface-2); }
.nav-item[aria-current="page"] { background: var(--grad); color: var(--on-grad); }

.content { grid-area: main; min-width: 0; padding: 24px; max-width: 1180px; width: 100%; }
.view { min-height: 40vh; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.notice { padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 16px; }
.notice.err { background: var(--bad-soft); color: var(--bad); }

/* Телефон: нижнее меню, компактная шапка */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; grid-template-areas: "top" "main"; }
  .nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; top: auto; height: var(--bottom-nav-h);
    border-right: 0; border-top: 1px solid var(--border); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); display: flex; gap: 2px; overflow-x: auto; }
  .nav-group { display: contents; }
  .nav-label { display: none; }
  .nav-item { flex: 1 0 64px; max-width: 140px; flex-direction: column; justify-content: center; gap: 2px; padding: 4px 6px; font-size: 11px; text-align: center; min-width: 64px; }
  .nav-item span { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content { padding: 16px 16px calc(var(--bottom-nav-h) + 24px); }
  .brand span:last-child { display: none; }
  .signout span { display: none; }
  .signout { padding: 4px 8px; }
  .venue-select { max-width: 100%; }
}
@media (max-width: 400px) { .topbar { padding: 0 10px; gap: 8px; } .seg-sm .seg-btn { padding: 4px 7px; } }
.login-lang { display: flex; justify-content: center; margin-top: 20px; }
