/* Оформление — как analytics.crmtimbale.com (токены брендбука Timbale CRM 1.0, шрифт Inter). */
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/inter-cyrillic-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/inter-cyrillic-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F2EFE9; --surface: #FFFFFF; --surface-subtle: #F7F6F2; --text: #0B0B0C; --muted: #62615B;
  --line: #DEDBD3; --control: #87877E; --acid: #D9FF3F; --acid-hover: #CAE92F; --ink: #0B0B0C;
  --success: #146B4A; --success-bg: #E8F4EC; --warning: #875009; --warning-bg: #FFF1D6;
  --danger: #B13539; --danger-bg: #FCEBEB; --focus: #4558B8;
  --sidebar: #0B0B0C; --on-sidebar: #F5F3ED; --sidebar-muted: #AEAEA4; --radius: 10px;
  color-scheme: light;
}
.dark {
  --bg: #101212; --surface: #191C1B; --surface-subtle: #222623; --text: #F3F1EB; --muted: #B5B9AE;
  --line: #363C35; --control: #7D887C; --success: #91D9AC; --success-bg: #203B2D; --warning: #F3CD7C;
  --warning-bg: #3C311C; --danger: #FFADB1; --danger-bg: #43272B; --focus: #C0BDFF;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 "Inter Variable", Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ── вход ─────────────────────────────────────────────────────────────────────────────────────────────── */
.auth { display: grid; min-height: 100dvh; }
@media (min-width: 1024px) { .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.auth-hero { display: none; position: relative; overflow: hidden; flex-direction: column; justify-content: space-between;
  padding: 48px; background: var(--sidebar); color: var(--on-sidebar); }
@media (min-width: 1024px) { .auth-hero { display: flex; } }
.auth-hero .logo { width: 180px; }
.bars { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 32px; }
.bars span { width: 36px; border-radius: 6px 6px 0 0; background: #2A2D27; }
.bars span:last-child { background: var(--acid); }
.bars span:nth-child(1) { height: 48px; } .bars span:nth-child(2) { height: 64px; } .bars span:nth-child(3) { height: 56px; }
.bars span:nth-child(4) { height: 88px; } .bars span:nth-child(5) { height: 76px; } .bars span:nth-child(6) { height: 104px; }
.bars span:nth-child(7) { height: 132px; }
.auth-hero h1 { max-width: 28rem; font-size: 44px; line-height: 1.08; letter-spacing: -1.6px; font-weight: 500; }
.auth-hero p { max-width: 28rem; margin-top: 16px; font-size: 14px; line-height: 24px; color: var(--sidebar-muted); }
.auth-hero .eyebrow, .auth-hero .foot { color: var(--sidebar-muted); }
.auth-hero .eyebrow { margin-bottom: 16px; }
.auth-hero .foot { font-size: 11px; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form .logo-sm { width: 150px; margin-bottom: 40px; }
@media (min-width: 1024px) { .auth-form .logo-sm { display: none; } }
.dark .auth-form .logo-sm { filter: invert(1); }
.lock { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 24px; border: 1px solid var(--line);
  border-radius: 16px; background: var(--surface); }
.auth-form h2 { font-size: 26px; line-height: 32px; letter-spacing: -.8px; font-weight: 500; }
.auth-form .sub { margin: 8px 0 28px; font-size: 13px; color: var(--muted); }
.alert { margin-bottom: 20px; padding: 12px 14px; border-radius: 8px; background: var(--danger-bg); color: var(--danger);
  font-size: 13px; line-height: 20px; }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; }
.input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--control); border-radius: var(--radius);
  background: var(--surface); outline: none; }
.input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.pw { position: relative; }
.pw .input { padding-right: 44px; }
.pw button { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); padding: 8px; border: 0; border-radius: 6px;
  background: none; color: var(--muted); cursor: pointer; display: grid; }
.pw button:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer;
  font-size: 13px; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--surface-subtle); }
.btn-primary { width: 100%; height: 44px; margin-top: 8px; border-color: var(--acid); background: var(--acid); color: var(--ink);
  font-size: 14px; }
.btn-primary:hover { background: var(--acid-hover); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn svg, .lock svg, .pw svg { width: 16px; height: 16px; }
.lock svg { width: 20px; height: 20px; }

/* ── стена ────────────────────────────────────────────────────────────────────────────────────────────── */
.app { display: flex; flex-direction: column; height: 100dvh; }
.top { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 16px; background: var(--sidebar);
  color: var(--on-sidebar); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: 8px; }
.brand img { width: 28px; height: 28px; }
.brand b { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.brand .eyebrow { color: var(--sidebar-muted); font-size: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border-radius: 999px;
  background: #1C1E1B; color: var(--on-sidebar); font-size: 12px; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: #6B6E66; }
.chip.on i { background: var(--acid); box-shadow: 0 0 0 3px rgba(217, 255, 63, .18); }
.chip.off i { background: #E5484D; }
.chip .hint { color: var(--sidebar-muted); }
.actions { display: flex; align-items: center; gap: 8px; }
.top .btn { height: 32px; border-color: #2A2D27; background: #1C1E1B; color: var(--on-sidebar); }
.top .btn:hover { background: #262924; }
.top .btn:disabled { opacity: .6; cursor: default; }
.user { font-size: 12px; color: var(--sidebar-muted); }
.stage { position: relative; flex: 1; min-height: 0; background: #000; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.stage .wait { position: absolute; inset: 0; display: grid; place-items: center; color: #8A8D84; font-size: 13px; }
@media (max-width: 640px) { .user, .chip .hint { display: none; } }
