/* Каркас: светлое меню слева с двумя постоянными кнопками, бегущая строка заявок, верхняя строка с контекстом рынка.
   Утверждено 19.10.2026 (главная «Два входа»). Только токены base.css. */

.shell { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; }

/* ---------- Меню ---------- */
.sb { position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: var(--z-sidebar); color: var(--ink-2); }
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 14px 14px 18px; flex: 0 0 auto; }
.brand { display: inline-flex; align-items: center; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.lockup { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { display: block; flex: 0 0 auto; color: var(--brand); }
.lockup-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.wordmark { font-weight: 780; font-size: 24px; line-height: 0.9; letter-spacing: -0.055em; color: inherit; white-space: nowrap; }
.wordmark-yo { position: relative; display: inline-block; }
.wordmark-yo i { position: absolute; top: 0.1em; width: 0.13em; height: 0.13em; border-radius: 50%; background: var(--signal); }
.wordmark-yo i:first-child { left: 0.09em; }
.wordmark-yo i:last-child { left: 0.31em; }
.tagline { font-size: 10.5px; font-weight: 500; line-height: 1.2; color: var(--muted); white-space: nowrap; }

.sb-nav { flex: 1 1 auto; overflow-y: auto; padding: 4px 14px 16px; scrollbar-width: thin; }
.sb-group + .sb-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sb-title { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 12px 6px; }
.sb-link { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm);
  color: var(--ink-2); font-weight: 500; font-size: 15px; white-space: nowrap; transition: background-color .15s var(--ease), color .15s var(--ease); }
.sb-link .ico { color: var(--faint); transition: color .15s var(--ease); }
.sb-link:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.sb-link.is-active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.sb-link.is-active .ico { color: var(--brand); }
.sb-label { overflow: hidden; text-overflow: ellipsis; }
.sb-count { margin-left: auto; font-size: 12px; font-weight: 650; background: var(--signal); color: oklch(0.25 0.05 65); border-radius: var(--r-pill); padding: 1px 8px; }

.sb-foot { flex: 0 0 auto; padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); color: var(--ink); }
.sb-user:hover { background: var(--surface-3); text-decoration: none; color: var(--ink); }
.sb-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sb-user-text strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-text small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-verified { margin-left: auto; color: var(--brand); display: inline-flex; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.sb-acts { display: flex; flex-direction: column; gap: 8px; }
.sb-acts .btn { width: 100%; justify-content: flex-start; min-height: 44px; padding: 0 14px; }
.sb-scrim { display: none; }

/* ---------- Бегущая строка ---------- */
.tk { display: flex; align-items: stretch; background: var(--wood-deep); color: oklch(0.82 0.02 60); font-size: 13.5px; overflow: hidden; }
.tk-l { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 0 16px 0 24px; font-weight: 700; color: var(--signal);
  background: var(--wood-deep); position: relative; z-index: 1; box-shadow: 12px 0 16px var(--wood-deep); }
.tk-l i { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); animation: tk-pulse 1.6s ease-in-out infinite; }
.tk-w { overflow: hidden; flex: 1; }
.tk-in { display: inline-flex; white-space: nowrap; animation: tk-run 140s linear infinite; padding: 11px 0; }
.tk:hover .tk-in, .tk:focus-within .tk-in { animation-play-state: paused; }
.tk-i { display: inline-flex; align-items: baseline; gap: 8px; padding: 0 22px; border-right: 1px solid oklch(0.32 0.03 40); color: oklch(0.82 0.02 60); }
.tk-i:hover { text-decoration: none; color: oklch(0.92 0.02 60); }
.tk-i b { color: oklch(0.99 0.005 60); font-weight: 600; }
.tk-i em { font-style: normal; font-family: var(--mono); color: var(--signal); font-weight: 600; font-variant-numeric: tabular-nums; }
.tk-i u { text-decoration: none; color: oklch(0.65 0.03 60); font-family: var(--mono); }
@keyframes tk-run { to { transform: translateX(-50%); } }
@keyframes tk-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .tk-in, .tk-l i { animation: none; } }

/* ---------- Верхняя строка ---------- */
.topbar { position: sticky; top: 0; z-index: var(--z-topbar); min-height: 52px; display: flex; align-items: center; gap: 16px; padding: 8px 24px;
  background: oklch(1 0 0 / 0.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-title { font-weight: 650; font-size: 15px; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; }
.ctx { display: flex; align-items: center; gap: 6px 24px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); min-width: 0; flex: 1 1 auto; }
.ctx-d { font-weight: 700; color: var(--ink); padding-right: 18px; border-right: 1px solid var(--line); white-space: nowrap; }
.ctx-i { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.ctx-i .ico { color: var(--wood); }
.ctx-i b { color: var(--ink); font-weight: 650; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.topbar-actions form { margin: 0; }
.mtop { display: none; }

/* ---------- Рабочее поле и подвал ---------- */
.content { flex: 1 1 auto; width: 100%; padding: 24px 24px 48px; }
.content-public { max-width: 1320px; }
.foot { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface); padding: 32px 24px 22px; }
.foot-g { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.foot-brand p { font-size: 14px; color: var(--muted); margin: 12px 0 0; max-width: 34ch; line-height: 1.5; }
.foot h5 { font-size: 13px; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.foot-g a { display: block; font-size: 14.5px; color: var(--ink-2); padding: 4px 0; }
.foot-g a:hover { color: var(--ink); }
.foot-g .brand { display: inline-flex; padding: 0; }
.foot-b { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Адаптив ---------- */
@media (max-width: 1280px) { .ctx .desktop-only { display: none !important; } }
@media (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sb { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .26s var(--ease); box-shadow: var(--shadow-3); }
  .shell.mobile-open .sb { transform: none; }
  .shell.mobile-open .sb-scrim { display: block; position: fixed; inset: 0; background: oklch(0.2 0.02 155 / 0.45); z-index: var(--z-scrim); }
  .mtop { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .mtop .brand-compact { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); margin-right: auto; }
  .mtop .wordmark { font-size: 21px; }
  .mtop .btn { min-height: 38px; }
  .tk-l { padding: 0 12px; }
  .topbar { position: static; padding: 8px 12px; flex-wrap: wrap; }
  .ctx { font-size: 13px; gap: 4px 14px; }
  .ctx-d { border: 0; padding: 0; width: 100%; }
  .content { padding: 18px 14px 40px; }
  .foot { padding: 24px 14px 20px; }
  .foot-g { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .foot-g { grid-template-columns: 1fr; }
  .topbar-actions .btn-sm { min-height: 36px; }
}
