/* ==========================================================================
   Собесы — стили
   ========================================================================== */
:root {
  --bg: #f5f4f0;
  --bg-2: #eceae4;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --surface-3: #f2f0ec;
  --border: #e5e2da;
  --border-strong: #d4d0c6;
  --text: #16151b;
  --text-2: #4f4d57;
  --muted: #8a8792;
  --accent: #5b4bf5;
  --accent-2: #7a6bff;
  --accent-soft: rgba(91, 75, 245, .10);
  --accent-ring: rgba(91, 75, 245, .28);
  --on-accent: #ffffff;
  --danger: #e5484d;

  --sel: #1d84f5;
  --st-planned: #2f7cf6;
  --st-waiting: #d98e04;
  --st-next: #0f9f78;
  --st-offer: #9b4df5;
  --st-rejected: #e5484d;
  --st-canceled: #8a8792;

  --shadow-sm: 0 1px 2px rgba(22, 21, 27, .05);
  --shadow: 0 1px 2px rgba(22, 21, 27, .04), 0 6px 20px rgba(22, 21, 27, .06);
  --shadow-lg: 0 24px 70px rgba(22, 21, 27, .22);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0f; --bg-2: #111117; --surface: #14141b; --surface-2: #191921; --surface-3: #1f1f29;
    --border: #25252f; --border-strong: #33333f; --text: #edecf3; --text-2: #b4b2bf; --muted: #7c7a88;
    --accent: #7b6cff; --accent-2: #9c90ff; --accent-soft: rgba(123, 108, 255, .15); --accent-ring: rgba(123, 108, 255, .35);
    --sel: #3b95ff; --st-planned: #4d93ff; --st-waiting: #f2a91f; --st-next: #20c092; --st-offer: #b37bff; --st-rejected: #ff6369; --st-canceled: #7c7a88;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 80px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0f; --bg-2: #111117; --surface: #14141b; --surface-2: #191921; --surface-3: #1f1f29;
  --border: #25252f; --border-strong: #33333f; --text: #edecf3; --text-2: #b4b2bf; --muted: #7c7a88;
  --accent: #7b6cff; --accent-2: #9c90ff; --accent-soft: rgba(123, 108, 255, .15); --accent-ring: rgba(123, 108, 255, .35);
  --sel: #3b95ff; --st-planned: #4d93ff; --st-waiting: #f2a91f; --st-next: #20c092; --st-offer: #b37bff; --st-rejected: #ff6369; --st-canceled: #7c7a88;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 80px rgba(0,0,0,.6);
  color-scheme: dark;
}

.st-planned  { --st: var(--st-planned); }
.st-waiting  { --st: var(--st-waiting); }
.st-next     { --st: var(--st-next); }
.st-offer    { --st: var(--st-offer); }
.st-rejected { --st: var(--st-rejected); }
.st-canceled { --st: var(--st-canceled); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14.5px/1.5 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.2; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 550; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 4px 14px var(--accent-ring); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn kbd { font: 11px var(--mono); padding: 1px 5px; border-radius: 5px; background: rgba(255,255,255,.2); }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--text-2);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }

/* ---------- Поля ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--surface); }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input-wrap { position: relative; }
.input-wrap .prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: flex; }
.input-wrap .input { padding-left: 32px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8792' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
input[type="date"].input, input[type="time"].input { min-width: 0; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--border); }
.seg button { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-weight: 550; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* Выбор статуса */
.status-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.status-pick button {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 550; font-size: 13px;
  transition: all .15s;
}
.status-pick button:hover { border-color: var(--st); color: var(--text); }
.status-pick button.on { background: color-mix(in srgb, var(--st) 14%, transparent); border-color: color-mix(in srgb, var(--st) 55%, transparent); color: var(--st); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--muted)); flex: none; }

.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px dashed var(--border-strong); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 550; }
.chip-btn:hover { border-style: solid; border-color: var(--accent); color: var(--accent); }

/* ---------- Бейджи ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--st, var(--muted)) 13%, transparent); color: var(--st, var(--muted));
  font-size: 12px; font-weight: 650; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 550; white-space: nowrap; }
.tg-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 550; white-space: nowrap; }
.tg-link svg { width: 14px; height: 14px; }

/* ---------- Экран входа ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
  position: relative; overflow: hidden; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(1200px 600px at 0% 0%, #7b6cff 0%, transparent 60%), radial-gradient(900px 600px at 100% 100%, #1fc49a 0%, transparent 55%), #2a1f8f;
  color: #fff;
}
.auth-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000, transparent 85%); pointer-events: none; }
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero h1 { font-size: clamp(34px, 4vw, 54px); font-weight: 780; letter-spacing: -.035em; max-width: 12ch; }
.auth-hero p.lead { font-size: 17px; opacity: .85; max-width: 44ch; margin: 18px 0 0; }
.auth-feats { display: grid; gap: 14px; margin-top: 40px; max-width: 460px; }
.auth-feat { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.09); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.14); }
.auth-feat svg { margin-top: 2px; }
.auth-feat b { display: block; font-weight: 650; }
.auth-feat span { opacity: .8; font-size: 13.5px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; }
.auth-brand img { width: 34px; height: 34px; }
.auth-side { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 26px; font-weight: 750; }
.auth-card .sub { color: var(--muted); margin: 6px 0 24px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .seg { width: 100%; margin-bottom: 22px; }
.auth-card .seg button { flex: 1; justify-content: center; }
.form-error { padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); font-size: 13.5px; font-weight: 550; }
.auth-foot { margin-top: 18px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 760; font-size: 17px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.tabs { display: flex; gap: 2px; margin-left: 12px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 13px; border-radius: 10px; color: var(--text-2); font-weight: 580; }
.tabs a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--accent-2), var(--accent)); border: 0; text-transform: uppercase; }
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 6px; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: pop .14s ease-out;
}
.menu .menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu .menu-head b { display: block; }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text); text-align: left; }
.menu button:hover { background: var(--surface-3); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

.page { max-width: 1360px; margin: 0 auto; padding: 24px 24px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 28px; font-weight: 760; display: flex; align-items: center; gap: 10px; }
.page-head .count { font-size: 15px; font-weight: 650; color: var(--muted); background: var(--surface-3); padding: 2px 10px; border-radius: 999px; }
.page-head .sub { color: var(--muted); margin-top: 6px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 10px; }
.card-head h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 4px 18px 18px; }

/* ---------- Сводка сверху ---------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello h1 { font-size: 26px; font-weight: 760; }
.hello p { margin: 4px 0 0; color: var(--text-2); }
.hello p b { color: var(--text); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.pill .n { font-size: 18px; font-weight: 750; min-width: 26px; height: 32px; display: grid; place-items: center; padding: 0 6px; border-radius: 8px; background: color-mix(in srgb, var(--st, var(--accent)) 13%, transparent); color: var(--st, var(--accent)); }
.pill .t { font-size: 12.5px; color: var(--text-2); line-height: 1.25; }

/* ---------- Календарь ---------- */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.cal { overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cal-head h2 { font-size: 20px; font-weight: 740; text-transform: capitalize; }
.cal-head h2 span { color: var(--muted); font-weight: 600; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd { padding: 10px 10px 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); }
.cal-wd.we { color: color-mix(in srgb, var(--st-rejected) 70%, var(--muted)); }
.cal-cell {
  position: relative; min-height: 118px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.other { background: color-mix(in srgb, var(--bg) 55%, var(--surface)); }
.cal-cell.other .cal-num { color: var(--muted); opacity: .6; }
.cal-cell.selected { background: color-mix(in srgb, var(--sel) 9%, transparent); box-shadow: inset 0 0 0 2px var(--sel); }
.cal-num { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 650; color: var(--text-2); padding: 2px 4px; }
.cal-num span { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; }
.cal-cell.today .cal-num span { background: var(--sel); color: #fff; }
.cal-add { opacity: 0; width: 22px; height: 22px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; }
.cal-cell:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--surface-3); color: var(--accent); }
.ev {
  display: flex; flex-direction: column; gap: 1px; width: 100%; min-width: 0; padding: 4px 6px 5px; border-radius: 8px;
  border: 1.5px solid var(--k); background: var(--kbg); color: var(--kfg); font-size: 12px; font-weight: 600; line-height: 1.25; text-align: left;
  transition: filter .12s, transform .08s;
}
.ev:hover { filter: brightness(1.08); }
.ev .r1 { display: flex; align-items: center; gap: 5px; min-width: 0; }
.ev .k { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--kfg) 15%, transparent); flex: none; }
.ev .t { font-weight: 750; font-variant-numeric: tabular-nums; flex: none; }
.ev .star { font-size: 11px; line-height: 1; flex: none; }
.ev { position: relative; }
.ev .sd { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--st); box-shadow: 0 0 0 1.5px #fff; flex: none; }
.ev .c { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.ev.done { opacity: .5; }
.ev.done .c { text-decoration: line-through; }
.ev-more { font-size: 11.5px; font-weight: 650; color: var(--muted); padding: 0 6px; }
.cal-dots { display: none; gap: 2px; flex-wrap: wrap; justify-content: center; padding-top: 2px; }
.cal-dots .kd { width: 15px; height: 15px; border-radius: 4px; background: var(--kbg); color: var(--kfg); border: 1.5px solid var(--k); font-size: 9.5px; font-weight: 800; display: grid; place-items: center; line-height: 1; }

.side { display: grid; gap: 16px; }
.attn { border-color: color-mix(in srgb, var(--st-waiting) 45%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--st-waiting) 7%, var(--surface)), var(--surface)); }
.attn .card-head h3 { color: var(--st-waiting); }
.attn-item { padding: 12px 0; border-top: 1px solid var(--border); }
.attn-item:first-child { border-top: 0; padding-top: 4px; }
.attn-item .top { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; }
.attn-item .top b { font-weight: 650; }
.attn-item .quick { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.quick button { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; font-weight: 600; color: var(--text-2); }
.quick button:hover { border-color: var(--st); color: var(--st); background: color-mix(in srgb, var(--st) 8%, var(--surface)); }

.agenda { display: grid; gap: 2px; }
.ag {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 10px; margin: 0 -10px; border-radius: 12px; cursor: pointer; transition: background .12s;
}
.ag:hover { background: var(--surface-2); }
.ag-time { font-weight: 720; font-variant-numeric: tabular-nums; font-size: 15px; line-height: 1.2; }
.ag-time small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 550; margin-top: 2px; }
.ag-title { display: flex; align-items: center; gap: 8px; font-weight: 650; min-width: 0; }
.ag-title .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-meta { color: var(--text-2); font-size: 13px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ag-bar { width: 3px; align-self: stretch; border-radius: 3px; background: var(--st); }
.day-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 2px; }
.day-label:first-child { margin-top: 0; }
.day-label.today { color: var(--accent); }
.empty-mini { padding: 18px 0 8px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty-mini .btn { margin-top: 10px; }

/* ---------- Список ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { width: 300px; max-width: 100%; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filter {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 580; font-size: 13px;
}
.filter:hover { border-color: var(--border-strong); color: var(--text); }
.filter.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter.on .dot { box-shadow: 0 0 0 2px var(--bg); }
.filter .n { font-size: 12px; opacity: .65; font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl .date b { display: block; font-weight: 650; }
.tbl .date small { color: var(--muted); }
.tbl .co b { font-weight: 680; }
.tbl .co small { display: block; color: var(--muted); }
.tbl tr.future td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.month-row td { background: var(--bg) !important; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 16px 14px 8px !important; cursor: default; }

.month-title { font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 2px 10px; display: flex; align-items: center; gap: 10px; }
.month-title:first-child { margin-top: 0; }
.month-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.iv-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 14px 19px; cursor: pointer; overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.iv-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--k, var(--st)); }
.iv-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.iv-card .row1 { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.iv-card h3 { font-size: 17px; font-weight: 720; overflow-wrap: anywhere; }
.iv-card .pos { color: var(--text-2); font-size: 13.5px; margin-top: 2px; }
.nw { white-space: nowrap; }
.iv-card .when { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.iv-card .rec { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13.5px; }
.iv-card .rec .ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font-weight: 700; font-size: 12.5px; flex: none; }
.iv-card .rec .who { min-width: 0; flex: 1; }
.iv-card .rec .who b { display: block; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iv-card .fb { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.iv-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }

.empty { text-align: center; padding: 60px 20px; }
.empty .ico { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.empty h3 { font-size: 18px; font-weight: 700; }
.empty p { color: var(--muted); margin: 6px auto 18px; max-width: 40ch; }

/* ---------- Статистика ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 16px 18px; }
.kpi .v { font-size: 30px; font-weight: 780; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .v small { font-size: 16px; color: var(--muted); font-weight: 650; }
.kpi .l { color: var(--text-2); font-size: 13px; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.kpi.accent { background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #1fc49a)); border-color: transparent; color: #fff; }
.kpi.accent .l, .kpi.accent .v small { color: rgba(255,255,255,.82); }
.stats-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.span-8 { grid-column: span 8; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-12 { grid-column: span 12; }

.weeks { display: flex; align-items: flex-end; gap: 8px; height: 220px; }
.week { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.week .col { flex: 1; width: 100%; max-width: 44px; display: flex; flex-direction: column-reverse; justify-content: flex-start; border-radius: 8px 8px 4px 4px; overflow: hidden; position: relative; background: var(--surface-3); }
.week .col i { display: block; background: var(--kbg); box-shadow: inset 0 0 0 1px var(--k); min-height: 0; }
.week .num { height: 16px; font-size: 12px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.week .lbl { font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.week.cur .lbl { color: var(--accent); font-weight: 700; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

.stack { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.stack i { background: var(--st); }
.bars { display: grid; gap: 12px; }
.bar-row .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 5px; }
.bar-row .top b { font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .top span { color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.bar-row .track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 999px; background: var(--st, var(--accent)); }

.funnel { display: grid; gap: 8px; }
.funnel .f { display: flex; align-items: center; gap: 12px; }
.funnel .f .bar { height: 36px; border-radius: 10px; display: flex; align-items: center; padding: 0 12px; color: #fff; font-weight: 700; min-width: 44px; background: var(--st); font-variant-numeric: tabular-nums; }
.funnel .f .name { font-size: 13.5px; color: var(--text-2); }

/* ---------- Админка ---------- */
.admin-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.code-box .code { font: 700 22px/1.2 var(--mono); letter-spacing: .04em; overflow-wrap: anywhere; }
.meter { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 8px 0 4px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .avatar { width: 30px; height: 30px; font-size: 12.5px; }
.admin-tag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ---------- Модалки ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(12, 11, 20, .45); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto;
  animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 720px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: var(--shadow-lg); animation: rise .18s cubic-bezier(.2,.9,.3,1.2); margin-bottom: 6vh;
}
.modal.sm { max-width: 440px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 6px; }
.modal-head h2 { font-size: 19px; font-weight: 740; }
.modal-body { padding: 12px 20px 8px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; border-top: 1px solid var(--border); margin-top: 8px; }
.modal-foot .left { margin-right: auto; font-size: 12px; color: var(--muted); }
.fsec { padding: 14px 0; border-top: 1px solid var(--border); }
.fsec:first-child { border-top: 0; padding-top: 4px; }
.fsec-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.span2 { grid-column: span 2; }
.autofill-note { font-size: 12.5px; color: var(--st-next); display: flex; align-items: center; gap: 6px; margin-top: 8px; }

/* Боковая панель собеса */
.overlay.drawer-ov { justify-content: flex-end; align-items: stretch; padding: 0; }
.drawer {
  width: 100%; max-width: 520px; height: 100vh; background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .22s cubic-bezier(.2,.9,.3,1);
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 18px 20px 16px; border-bottom: 1px solid var(--border); position: relative; }
.drawer-head::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--k); }
.drawer-head .row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.drawer-head h2 { font-size: 24px; font-weight: 770; overflow-wrap: anywhere; }
.drawer-head .pos { color: var(--text-2); margin-top: 4px; }
.drawer-when { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.drawer-when .big { font-weight: 700; font-size: 15px; }
.drawer-when .rel { font-size: 12.5px; color: var(--muted); }
.drawer-when .rel.soon { color: var(--accent); font-weight: 650; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; display: grid; gap: 18px; align-content: start; }
.drawer-foot { display: flex; gap: 8px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); flex-wrap: wrap; }
.drawer-foot .grow { flex: 1; }
.dsec h4 { font-size: 12px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.info { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 14px; font-size: 14px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.info dd a { display: inline-flex; align-items: center; gap: 5px; }
.rec-actions { display: flex; align-items: center; gap: 6px; }
.rec-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); }
.rec-card .ava { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; color: #fff; background: linear-gradient(135deg, #1fc49a, #2f7cf6); flex: none; }
.rec-card .who { flex: 1; min-width: 0; }
.rec-card .who b { display: block; font-weight: 680; }
.rec-card .who span { font-size: 13px; color: var(--text-2); }
.textblock { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; }
.timeline { position: relative; display: grid; gap: 4px; }
.tl { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px 8px 6px; border-radius: 10px; cursor: pointer; }
.tl:hover { background: var(--surface-2); }
.tl.cur { background: var(--accent-soft); }
.tl .dot { width: 10px; height: 10px; margin-left: 4px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--st) 20%, transparent); }
.tl .what b { font-weight: 620; font-size: 13.5px; }
.tl .what small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Тосты ---------- */
#toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; background: var(--text); color: var(--bg);
  box-shadow: var(--shadow-lg); font-weight: 550; font-size: 14px; animation: rise .2s ease-out;
}
.toast.err { background: var(--danger); color: #fff; }
.toast button { border: 0; background: rgba(127,127,127,.25); color: inherit; font-weight: 700; padding: 5px 10px; border-radius: 8px; }

/* ---------- Нижняя навигация (мобилка) ---------- */
.bottom-nav { display: none; }
.fab { display: none; }

@media (max-width: 1100px) {
  .cal-layout { grid-template-columns: 1fr; }
  .side { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
  .span-8, .span-4, .span-6 { grid-column: span 12; }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { height: 56px; padding: 0 14px; }
  .tabs { display: none; }
  .top-actions .btn.primary { height: 36px; padding: 0 12px; }
  .page { padding: 16px 14px 110px; }
  .page-head h1, .hello h1 { font-size: 23px; }
  .pills { width: 100%; }
  .pill { flex: 1; min-width: 0; padding: 8px; }
  .pill .t { font-size: 11.5px; }
  .cal-head { padding: 12px; }
  .cal-head h2 { font-size: 18px; }
  .cal-wd { padding: 8px 0; text-align: center; font-size: 10.5px; }
  .cal-cell { min-height: 58px; padding: 4px 2px; align-items: center; }
  .cal-num { justify-content: center; padding: 0; }
  .cal-add, .ev, .ev-more { display: none; }
  .cal-dots { display: flex; }
  .side { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .toolbar { width: 100%; }
  .toolbar .seg { flex: none; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 14px; padding: 0 14px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
  .cards { grid-template-columns: 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: 20px 20px 0 0; margin: 0; max-height: 94vh; overflow-y: auto; animation: sheet .24s cubic-bezier(.2,.9,.3,1); }
  @keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
  .modal-foot { position: sticky; bottom: 0; background: var(--surface); padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-foot .left { display: none; }
  .overlay.drawer-ov { align-items: flex-end; }
  .drawer { max-width: none; height: 94vh; border-radius: 20px 20px 0 0; border-left: 0; animation: sheet .24s cubic-bezier(.2,.9,.3,1); overflow: hidden; }
  .info { grid-template-columns: 110px minmax(0, 1fr); }
  .rec-card { flex-wrap: wrap; }
  .rec-actions { width: 100%; }
  .rec-actions .btn { flex: 1; height: 38px; }
  .hide-sm { display: none; }
  .drawer-foot { flex-wrap: nowrap; }
  .drawer-foot .btn.primary { flex: 1; }
  .drawer-foot .grow { display: none; }
  .pills { display: grid; grid-template-columns: repeat(4, 1fr); }
  .pill { flex-direction: column; gap: 4px; padding: 10px 4px; text-align: center; }
  .weeks { gap: 4px; height: 170px; }
  .week .lbl { font-size: 9.5px; }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 22px; }
  .auth-feats { display: none; }
  .auth-hero p.lead { font-size: 15px; }
  .auth-hero h1 { margin-top: 26px; }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 10px; }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a.on { color: var(--accent); }
  .fab {
    display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 55;
    width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--accent); color: #fff; box-shadow: 0 10px 30px var(--accent-ring);
  }
  .fab svg { width: 26px; height: 26px; }
  #toasts { bottom: calc(90px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ==========================================================================
   Этап (скрин / тех) и тип (целевое / не целевое)
   ========================================================================== */
.cat-hr { --k: #bf8d00; --kbg: #fad03e; --kfg: #463200; }   /* скрин — жёлтый */
.cat-tt { --k: #7065d0; --kbg: #afacff; --kfg: #2f2a66; }   /* целевой тех — черника */
.cat-tn { --k: #1da758; --kbg: #85e3a0; --kfg: #00421c; }   /* не целевой тех — зелёный */
.kind {
  display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 6px; flex: none;
  background: var(--kbg); color: var(--kfg); box-shadow: inset 0 0 0 1px var(--k); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.tgt { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; white-space: nowrap; flex: none; }
.tgt.target { background: var(--text); color: var(--bg); }
.tgt.nontarget { border: 1.5px dashed var(--border-strong); color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tags.big .kind, .tags.big .tgt { height: 26px; padding: 0 10px; font-size: 12.5px; }
.tags.big .kind { text-transform: none; letter-spacing: 0; }

.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.cal-legend .lg, .legend > span { display: inline-flex; align-items: center; gap: 7px; }
.lg-sep { width: 1px; height: 18px; background: var(--border); }
.lg-chip { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border: 1.5px solid var(--k); background: var(--kbg); color: var(--kfg); }
.lg-box { width: 26px; height: 16px; border-radius: 5px; border: 1.5px solid var(--text-2); }
.lg-box.solid { background: var(--text-2); }
.lg-box.dashed { border-style: dashed; background: var(--surface-2); }
.lg-box.hatched { border-color: var(--text-2); background: repeating-linear-gradient(45deg, var(--text-2) 0 3px, transparent 3px 6px); }

.ag-tags { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.ag-tags .kind { height: 19px; font-size: 10px; padding: 0 5px; }
.ag-tags .tgt { height: 19px; font-size: 11px; }
.ag-tags .badge { height: 19px; font-size: 11px; }
.ag-title .name { font-size: 15px; }
.attn-name { display: inline-flex; align-items: center; gap: 8px; }
.attn-name .kind { height: 19px; font-size: 10px; padding: 0 5px; }

.filters .flabel { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-right: 2px; flex: none; }
.filters .fsep { width: 1px; background: var(--border); margin: 4px 8px; flex: none; }
.filter .kind { height: 19px; font-size: 10px; padding: 0 5px; }
.filters + .filters { margin-top: -8px; }

.tbl tr[class*="cat-"] td:first-child { background-image: linear-gradient(var(--k), var(--k)); background-size: 4px 100%; background-repeat: no-repeat; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice button {
  height: 46px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2);
  font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .12s;
}
.choice button:hover { border-color: var(--k, var(--text-2)); color: var(--text); }
.choice button[class*="cat-"]:not(.on) { border-color: color-mix(in srgb, var(--k) 55%, var(--border)); color: var(--text); }
.choice button.on[class*="cat-"] { background: var(--kbg); border-color: var(--k); color: var(--kfg); }
.choice .c-target.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.choice .c-nontarget { border-style: dashed; }
.choice .c-nontarget.on { border-color: var(--text); color: var(--text); background: var(--surface-3); }

.kpi.kk { background: var(--kbg); border-color: var(--k); color: var(--kfg); }
.kpi.kk .l { color: inherit; opacity: .85; }
.matrix td[class*="cat-"] { background: var(--kbg); color: var(--kfg); box-shadow: inset 0 0 0 1px var(--k); }
.bar-row .top .kind { color: var(--kfg); }
.types { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 6px; margin: -6px; }
.matrix th { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.matrix tbody th { text-align: left; }
.matrix td { text-align: center; font-size: 22px; font-weight: 780; font-variant-numeric: tabular-nums; padding: 12px 6px; border-radius: 10px; background: var(--surface-2); }
.matrix td.mt { background: var(--text); color: var(--bg); }
.matrix td.mn { background: transparent; border: 1.5px dashed var(--border-strong); color: var(--text-2); }
.matrix tr.tot td, .matrix td.tot { font-size: 16px; color: var(--text-2); background: transparent; }
.matrix tr.tot th { color: var(--muted); }
.info-link { display: flex; align-items: center; gap: 6px; }
.info-link a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.tl .what b { display: inline-flex; align-items: center; gap: 6px; }
.tl .what .kind { height: 18px; font-size: 9.5px; padding: 0 5px; }
.iv-card .row1 .tags .kind { text-transform: none; letter-spacing: 0; font-size: 12px; height: 23px; }
.iv-card .row1 .tags .tgt { height: 23px; }

@media (max-width: 760px) {
  .cal-legend { gap: 6px 12px; padding: 10px 12px; font-size: 11.5px; }
  .lg-sep { display: none; }
  .types { grid-template-columns: 1fr; }
  .filters .fsep { display: none; }
  .filters + .filters { margin-top: -6px; }
  .brand span, .brand { font-size: 16px; }
}
