/* VERIFPAY · design tokens + base styles */

:root {
  /* Surfaces — тёмная база с лёгким мятным оттенком (нежно) */
  --bg-0: #080c0b;
  --bg-1: #0b110f;
  --bg-2: #0f1613;

  --surface-1: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.045);
  --surface-3: rgba(255, 255, 255, 0.07);
  --surface-hover: rgba(255, 255, 255, 0.055);

  --border-soft: rgba(255, 255, 255, 0.045);
  --border-1: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.22);

  --text-0: #f6f8fc;
  --text-1: #d6dae6;
  --text-2: #8d92a6;
  --text-3: #5a5f74;
  --text-4: #3d4255;

  /* Brand — MintWave (mint/teal), визуально отличается от VerifPay (синий) */
  --brand-blue: #2ee6d0;
  --brand-blue-2: #16c2c2;
  --brand-blue-soft: rgba(46, 230, 208, 0.16);
  --brand-blue-glow: rgba(46, 230, 208, 0.35);
  --accent-sel: rgba(22, 194, 194, 0.5);   /* фон выделения текста (насыщенный) */

  --brand-gold: #f5b942;
  --brand-gold-2: #ffd96a;
  --brand-gold-soft: rgba(245, 185, 66, 0.15);

  --accent: var(--brand-blue);
  --accent-2: var(--brand-blue-2);
  --accent-soft: var(--brand-blue-soft);
  --accent-glow: var(--brand-blue-glow);

  /* Status colors */
  --success: #10c98a;
  --success-soft: rgba(16, 201, 138, 0.14);
  --warning: #f5b942;
  --warning-soft: rgba(245, 185, 66, 0.14);
  --danger: #f4456e;
  --danger-soft: rgba(244, 69, 110, 0.14);
  --info: #8b87ff;
  --info-soft: rgba(139, 135, 255, 0.14);
  --pending: #c39bff;

  /* Geometry */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;

  --glass-blur: 22px;

  /* Density (overridable via tweaks) */
  --row-pad-y: 10px;
  --row-pad-x: 14px;

  --font-ui: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="light"] {
  color-scheme: light;   /* нативные контролы/скроллбары/автозаполнение — светлые */
  --accent-sel: rgba(37, 150, 255, 0.3);
  --bg-0: #f6f7fb;
  --bg-1: #ffffff;
  --bg-2: #eef0f6;
  --surface-1: rgba(0, 0, 0, 0.03);
  --surface-2: rgba(0, 0, 0, 0.045);
  --surface-3: rgba(0, 0, 0, 0.07);
  --surface-hover: rgba(0, 0, 0, 0.055);
  --border-soft: rgba(0, 0, 0, 0.05);
  --border-1: rgba(0, 0, 0, 0.08);
  --border-2: rgba(0, 0, 0, 0.14);
  --text-0: #0a0c14;
  --text-1: #2b3142;
  --text-2: #5a607a;
  --text-3: #8a90a8;
  --text-4: #b1b6c8;
}

/* ─── Бирюзовая (teal) ─── */
[data-theme="teal"] {
  --bg-0: #04100f; --bg-1: #071817; --bg-2: #0a201f;
  --brand-blue: #2ee6d0; --brand-blue-2: #16c2c2;
  --brand-blue-soft: rgba(46,230,208,0.16); --brand-blue-glow: rgba(46,230,208,0.35);
  --accent: #2ee6d0; --accent-2: #16c2c2;
  --accent-soft: rgba(46,230,208,0.16); --accent-glow: rgba(46,230,208,0.35);
  --accent-sel: rgba(22,194,194,0.5);
  --info: #2ee6d0; --info-soft: rgba(46,230,208,0.14);
}
/* ─── Фиолетовая (violet) ─── */
[data-theme="violet"] {
  --bg-0: #0c0a1a; --bg-1: #110d24; --bg-2: #16112e;
  --brand-blue: #b794ff; --brand-blue-2: #8b87ff;
  --brand-blue-soft: rgba(183,148,255,0.16); --brand-blue-glow: rgba(183,148,255,0.35);
  --accent: #b794ff; --accent-2: #8b87ff;
  --accent-soft: rgba(183,148,255,0.16); --accent-glow: rgba(183,148,255,0.35);
  --accent-sel: rgba(139,135,255,0.5);
  --info: #b794ff; --info-soft: rgba(183,148,255,0.14);
}
/* ─── Розовая (rose) ─── */
[data-theme="rose"] {
  --bg-0: #160810; --bg-1: #1e0b16; --bg-2: #26101c;
  --brand-blue: #ff7eb6; --brand-blue-2: #ff5fa2;
  --brand-blue-soft: rgba(255,126,182,0.16); --brand-blue-glow: rgba(255,126,182,0.35);
  --accent: #ff7eb6; --accent-2: #ff5fa2;
  --accent-soft: rgba(255,126,182,0.16); --accent-glow: rgba(255,126,182,0.35);
  --accent-sel: rgba(255,95,162,0.5);
  --info: #ff7eb6; --info-soft: rgba(255,126,182,0.14);
}
/* ─── Полночь (deep blue) ─── */
[data-theme="midnight"] {
  --bg-0: #03060f; --bg-1: #060b1a; --bg-2: #091022;
  --brand-blue: #5b8cff; --brand-blue-2: #3a6bff;
  --brand-blue-soft: rgba(91,140,255,0.16); --brand-blue-glow: rgba(91,140,255,0.4);
  --accent: #5b8cff; --accent-2: #3a6bff;
  --accent-soft: rgba(91,140,255,0.16); --accent-glow: rgba(91,140,255,0.4);
  --accent-sel: rgba(58,107,255,0.55);
  --info: #5b8cff; --info-soft: rgba(91,140,255,0.14);
}

/* ─── Base ────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow: hidden; }
html { color-scheme: dark; }

body {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-1);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  height: var(--vp-app-height, 100dvh);
  overscroll-behavior: none;
  touch-action: manipulation;
}

#root {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  height: 100dvh;
  height: var(--vp-app-height, 100dvh);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

html.vp-standalone body {
  background: #080910;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer; background: none; border: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;   /* убираем белую вспышку на тач/клик */
  touch-action: manipulation;
  -webkit-touch-callout: none;
}
/* Убираем «прилипший» светлый фокус-прямоугольник после клика; ринг только для клавиатуры */
button:focus { outline: none; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.emoji-btn:hover { background: var(--surface-2) !important; }

input, textarea {
  outline: none;
  border: 0;
  background: transparent;
}

/* Выделение текста: насыщенный фон (не translucent --accent-soft, который был
   почти невидим) + контрастный текст. --accent-sel задаётся на тему ниже. */
::selection { background: var(--accent-sel, rgba(76,196,255,0.45)); color: #fff; }

/* ─── Backdrop / app gradient ─────────────────────────────────────── */
.app-bg {
  position: fixed;
  inset: 0;
  background: var(--bg-0);
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.app-bg::before, .app-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.42;
  pointer-events: none;
}
.app-bg::before {
  width: 720px; height: 720px;
  left: -180px; top: -260px;
  background: radial-gradient(circle, rgba(46, 230, 208, 0.42), transparent 60%);
}
.app-bg::after {
  width: 620px; height: 620px;
  right: -140px; bottom: -180px;
  background: radial-gradient(circle, rgba(22, 194, 194, 0.30), transparent 65%);
}
.app-bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ─── Glass primitives ─────────────────────────────────────────────── */
.glass {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.25);
}
.glass-2 {
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 8px rgba(0, 0, 0, 0.35);
}

.divider { height: 1px; background: var(--border-soft); border: 0; margin: 0; }
.divider-v { width: 1px; align-self: stretch; background: var(--border-soft); }

/* ─── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: 10px;
  font-size: 13px; font-weight: 500;
  color: var(--text-1);
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  transition: background .18s cubic-bezier(.22,.61,.36,1), border-color .18s cubic-bezier(.22,.61,.36,1), transform .12s cubic-bezier(.22,.61,.36,1), color .18s cubic-bezier(.22,.61,.36,1), box-shadow .18s cubic-bezier(.22,.61,.36,1), filter .18s cubic-bezier(.22,.61,.36,1);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.btn:hover { background: var(--surface-3); color: var(--text-0); border-color: var(--border-2); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled, button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; gap: 6px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 11.5px; border-radius: 7px; gap: 5px; }

.btn-primary {
  color: #061222;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-2) 100%);
  border: 1px solid rgba(76, 196, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(76, 196, 255, 0.25),
    0 6px 18px rgba(37, 150, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-weight: 600;
}
.btn-primary:hover {
  filter: brightness(1.08);
  border-color: rgba(76, 196, 255, 0.85);
}

.btn-gold {
  color: #1a1108;
  background: linear-gradient(135deg, var(--brand-gold-2) 0%, var(--brand-gold) 100%);
  border: 1px solid rgba(245, 185, 66, 0.6);
  box-shadow:
    0 0 0 1px rgba(245, 185, 66, 0.2),
    0 6px 18px rgba(245, 185, 66, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-weight: 600;
}
.btn-gold:hover { filter: brightness(1.08); }

.btn-success {
  color: #04150e;
  background: linear-gradient(135deg, #18e29a 0%, #10c98a 100%);
  border: 1px solid rgba(16, 201, 138, 0.55);
  box-shadow: 0 6px 18px rgba(16, 201, 138, 0.28);
  font-weight: 600;
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ff5882 0%, #f4456e 100%);
  border: 1px solid rgba(244, 69, 110, 0.55);
  box-shadow: 0 6px 18px rgba(244, 69, 110, 0.28);
  font-weight: 600;
}

.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-1); }

.btn-icon {
  width: 36px; padding: 0; justify-content: center;
}
.btn-icon.btn-sm { width: 30px; }
.btn-icon.btn-xs { width: 26px; }

/* ─── Inputs ──────────────────────────────────────────────────────── */
.input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  color: var(--text-0);
  font-size: 13px;
  transition: border-color 0.14s, background 0.14s;
}
.input::placeholder { color: var(--text-3); }
.input:focus, .input:focus-visible {
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-sm { height: 30px; font-size: 12px; padding: 0 10px; border-radius: 8px; }

/* Native <select>: keep the control + its dropdown list dark (no white flash). */
select.input, select.input-sm {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-color: var(--surface-1);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%238d92a6' d='M0 0h10L5 6z'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center;
  padding-right: 24px; cursor: pointer;
}
select.input option, select.input-sm option, select option {
  background: #14161d; color: var(--text-0);
}
/* Range sliders use the accent colour instead of the OS white default. */
input[type="range"] { accent-color: var(--accent); background: transparent; }

/* Add-bookmaker list rows */
.bk-add-row { transition: background 0.12s, border-color 0.12s; }
.bk-add-row:hover { background: var(--surface-2) !important; border-color: var(--accent) !important; }

.input-search {
  padding-left: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238d92a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: 12px center;
}

/* ─── Badges / chips ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  color: var(--text-1);
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

.badge-success { color: var(--success); background: var(--success-soft); border-color: rgba(16, 201, 138, 0.25); }
.badge-warning { color: var(--warning); background: var(--warning-soft); border-color: rgba(245, 185, 66, 0.25); }
.badge-danger  { color: var(--danger);  background: var(--danger-soft);  border-color: rgba(244, 69, 110, 0.28); }
.badge-info    { color: var(--info);    background: var(--info-soft);    border-color: rgba(139, 135, 255, 0.28); }
.badge-accent  { color: var(--accent);  background: var(--accent-soft);  border-color: rgba(76, 196, 255, 0.28); }
.badge-gold    { color: var(--brand-gold); background: var(--brand-gold-soft); border-color: rgba(245, 185, 66, 0.25); }
.badge-muted   { color: var(--text-2); background: var(--surface-2); border-color: var(--border-1); }

/* ─── Avatar ──────────────────────────────────────────────────────── */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text-0);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  position: relative;
  flex-shrink: 0;
  border: 1px solid var(--border-1);
}
.avatar-sm { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
.avatar-lg { width: 44px; height: 44px; border-radius: 14px; font-size: 15px; }
.avatar-xl { width: 56px; height: 56px; border-radius: 16px; font-size: 18px; }
.avatar-online::after {
  content: ""; position: absolute; right: -2px; bottom: -2px;
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 2px var(--bg-1), 0 0 8px var(--success);
}
.avatar-offline::after {
  content: ""; position: absolute; right: -2px; bottom: -2px;
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--text-3);
  box-shadow: 0 0 0 2px var(--bg-1);
}

/* ─── Scrollbars ──────────────────────────────────────────────────── */
.scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll::-webkit-scrollbar-track { background: transparent; }
.scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.scroll::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); background-clip: content-box; }

.scroll-x { overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.scroll-x::-webkit-scrollbar { height: 6px; }
.scroll-x::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 4px; }

/* ─── Layout primitives ───────────────────────────────────────────── */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; }

.muted { color: var(--text-2); }
.dim   { color: var(--text-3); }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.text-xs  { font-size: 11px; }
.text-sm  { font-size: 12px; }
.text-md  { font-size: 13px; }
.text-lg  { font-size: 15px; }
.text-xl  { font-size: 18px; font-weight: 600; }
.text-2xl { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.text-3xl { font-size: 28px; font-weight: 700; letter-spacing: -0.015em; }
.text-4xl { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
}

/* ─── Gradient text & glow ────────────────────────────────────────── */
.text-grad-brand {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-grad-blue {
  background: linear-gradient(135deg, #b8e5ff 0%, var(--brand-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glow-blue { box-shadow: 0 0 24px var(--accent-glow); }

/* ─── Logo ────────────────────────────────────────────────────────── */
.logo-mark {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 12px rgba(76,196,255,0.45));
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ─── Sidebar nav ──────────────────────────────────────────────────── */
.nav-item {
  display: flex; align-items: center; gap: 12px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  transition: background 0.14s, color 0.14s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text-0); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(76,196,255,0.12), rgba(76,196,255,0.04));
  color: var(--text-0);
  box-shadow: inset 0 0 0 1px rgba(76,196,255,0.18);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -10px; top: 8px; bottom: 8px;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue-2));
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--accent-glow);
}

.nav-icon-only {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  color: var(--text-2);
  position: relative;
  transition: background 0.14s, color 0.14s;
}
.nav-icon-only:hover { background: var(--surface-2); color: var(--text-0); }
.nav-icon-only.active {
  background: linear-gradient(135deg, rgba(76,196,255,0.16), rgba(76,196,255,0.04));
  color: var(--text-0);
  box-shadow: inset 0 0 0 1px rgba(76,196,255,0.25);
}
.nav-icon-only.active::before {
  content: "";
  position: absolute;
  left: -8px; top: 12px; bottom: 12px;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue-2));
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ─── Tables ──────────────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table thead th {
  position: sticky; top: 0;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding: 12px 16px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-soft);
  z-index: 1;
}
.table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  color: var(--text-1);
  vertical-align: middle;
}
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: var(--surface-1); }
.table tbody tr:last-child td { border-bottom: 0; }

/* ─── Tooltip ─────────────────────────────────────────────────────── */
.tt { position: relative; }
.tt::after {
  content: attr(data-tt);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%; transform: translateX(-50%) translateY(4px);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-0);
  background: rgba(20, 22, 32, 0.96);
  border: 1px solid var(--border-1);
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s, transform 0.12s;
  z-index: 50;
}
.tt:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── Animations ──────────────────────────────────────────────────── */
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes fade-in-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slide-in-r { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.92); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bg-pan {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.anim-fade-in { animation: fade-in 0.28s ease both; }
.anim-fade-in-up { animation: fade-in-up 0.36s ease both; }
.anim-slide-in-r { animation: slide-in-r 0.22s ease both; }
.anim-pulse { animation: pulse-dot 1.6s ease-in-out infinite; }
.anim-spin { animation: spin 1s linear infinite; }

/* ─── Skeleton / shimmer ──────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.03) 0%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.03) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 6px;
}

/* ─── Hover lift ──────────────────────────────────────────────────── */
.lift { transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s; }
.lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  border-color: var(--border-2);
}

/* ─── Chat bubble ─────────────────────────────────────────────────── */
.bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.45;
  width: fit-content;          /* пузырь по ширине текста, не растягивается и не схлопывается */
  max-width: 100%;             /* предел задаёт обёртка (75%) */
  overflow-wrap: anywhere;     /* перенос ТОЛЬКО если одно слово реально не влезает */
  white-space: pre-wrap;
  position: relative;
}
.bubble-client {
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  color: var(--text-0);
  border-bottom-left-radius: 6px;
}
.bubble-curator {
  background: linear-gradient(135deg, rgba(76,196,255,0.22), rgba(37,150,255,0.16));
  border: 1px solid rgba(76,196,255,0.32);
  color: #eaf6ff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 18px rgba(37,150,255,0.18);
}
.bubble-system {
  background: var(--surface-1);
  border: 1px dashed var(--border-1);
  color: var(--text-2);
  font-size: 12px;
  padding: 8px 12px;
  max-width: 80%;
  border-radius: 10px;
  font-style: italic;
}

/* ─── Kanban card ─────────────────────────────────────────────────── */
.kanban-col {
  display: flex; flex-direction: column;
  width: 296px;
  flex-shrink: 0;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 100%;
}
.kanban-card {
  background: var(--surface-2);
  border: 1px solid var(--border-1);
  border-radius: var(--radius);
  padding: 12px;
  cursor: grab;
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
}
.kanban-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}
.kanban-card.dragging {
  opacity: 0.4;
  transform: scale(0.96) rotate(-1deg);
  cursor: grabbing;
}
.kanban-col.drop-target { background: rgba(76,196,255,0.08); }
.kanban-col.drop-target .kanban-col-body { box-shadow: inset 0 0 0 1px rgba(76,196,255,0.35); }

/* ─── Switch / toggle ────────────────────────────────────────────── */
.switch {
  position: relative;
  width: 38px; height: 22px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-1);
  transition: background 0.18s;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-1);
  transition: transform 0.18s, background 0.18s;
}
.switch.on {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  border-color: rgba(76,196,255,0.4);
  box-shadow: 0 0 14px var(--accent-glow);
}
.switch.on::after { transform: translateX(16px); background: white; }
.switch-lg { width: 46px; height: 26px; }
.switch-lg::after { width: 20px; height: 20px; }
.switch-lg.on::after { transform: translateX(20px); }

/* ─── Status pill colors (semantic) ──────────────────────────────── */
.status-new      { color: #b8e5ff; background: rgba(76,196,255,0.12); border-color: rgba(76,196,255,0.28); }
.status-active   { color: #f5b942; background: rgba(245,185,66,0.12); border-color: rgba(245,185,66,0.28); }
.status-pending  { color: #c39bff; background: rgba(195,155,255,0.14); border-color: rgba(195,155,255,0.28); }
.status-paid     { color: #10c98a; background: rgba(16,201,138,0.14); border-color: rgba(16,201,138,0.28); }
.status-rejected { color: #ef6f8e; background: rgba(244,69,110,0.12); border-color: rgba(244,69,110,0.28); }

/* ─── Card meta row ───────────────────────────────────────────────── */
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  border-radius: 4px;
  background: var(--surface-3);
  border: 1px solid var(--border-1);
  color: var(--text-1);
}

/* ─── Notification dot ───────────────────────────────────────────── */
.unread-dot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2));
  color: #061222;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ─── Misc ───────────────────────────────────────────────────────── */
.no-select { user-select: none; }
.hidden { display: none !important; }

/* prevent layout jank under transitions */
.no-anim, .no-anim * { transition: none !important; animation: none !important; }

/* ─── Mobile adaptations ─────────────────────────────────────────── */
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@media (max-width: 760px) {
  /* Touch targets — buttons & inputs get min 36px height */
  .btn    { min-height: 42px; padding-left: 13px; padding-right: 13px; }
  .btn-sm { min-height: 38px; }
  .btn-xs { min-height: 34px; }
  .btn-icon { width: 42px !important; min-width: 42px !important; padding: 0 !important; }
  .btn-icon.btn-sm { width: 38px !important; min-width: 38px !important; }
  .btn-icon.btn-xs { width: 34px !important; min-width: 34px !important; }
  input, textarea, select { font-size: 16px !important; /* prevent iOS zoom */ }
  .input { min-height: 42px; }
  .input-sm { min-height: 38px; }
  /* Modals fill more of the screen on phones */
  .modal-shell { width: 92vw !important; max-width: 92vw !important; }
  /* Tighten Glass card paddings */
  .glass-1 { padding: 12px !important; }
  /* Tweaks panel doesn't make sense on mobile — hide it */
  .tweaks-fab, .tweaks-panel { display: none !important; }
  /* Reduce ambient bg cost */
  .app-bg-grid { opacity: 0.4; }
  /* Curator cards / billing controls stack full-width on phones */
  .bk-add-row { padding: 10px 12px; }
  /* Team chat: wider bubbles, comfortable tap targets */
  select.input, select.input-sm { background-position: right 10px center; }
  /* Скрываем подписи на узких экранах */
  .hide-mobile { display: none !important; }
  .tt::after { display: none !important; }
  .glass, .glass-2 { border-radius: 12px; }
}

/* ── Mobile shell: bottom nav reserve + fullscreen chat ─────────────────── */
/* Контент над фиксированным нижним таб-баром (высота ~62px + safe-area). */
.vp-main-mobile { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
/* Внутри открытого диалога (телефон) прячем таб-бар: композер во всю высоту,
   без двойного safe-area и лишней полосы снизу. */
html.vp-chat-fs .vp-mobile-nav { display: none !important; }
html.vp-chat-fs .vp-main-mobile { padding-bottom: 0; }
/* iOS: гасим rubber-band и scroll-chaining на прокручиваемых областях. */
.scroll, [data-chat-scroll], .vp-mobile-more-list { overscroll-behavior: contain; }

/* Клавиатура открыта (телефон): освобождаем место списку сообщений —
   прячем панель макросов и ужимаем шапку чата, чтобы переписка не «схлопывалась». */
/* Полноэкранные модалки на телефоне: кнопки футера растягиваются во всю ширину. */
.vp-modal-foot-mobile > .btn { flex: 1; min-height: 46px; font-size: 14px; }

html.vp-keyboard-open .vp-macrosbar { display: none !important; }
html.vp-keyboard-open .vp-chat-hdr {
  min-height: 0 !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

@media (hover: none) {
  .btn:hover,
  .nav-item:hover,
  .vp-iconbtn:hover,
  .vp-filter-chip:hover,
  .vp-macro:hover,
  .vp-mobile-tab:hover,
  .vp-mobile-more-item:hover {
    transform: none !important;
  }
}

/* ─── Tasteful motion (умеренные анимации) ─────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  /* Кнопки слегка «подпрыгивают» при наведении */
  .btn-primary, .btn-gold, .btn-success, .btn-danger {
    transition: filter .14s, border-color .14s, transform .1s, box-shadow .14s;
  }
  .btn-primary:hover, .btn-gold:hover, .btn-success:hover, .btn-danger:hover {
    transform: translateY(-1px);
  }
  .btn-primary:active, .btn-gold:active, .btn-success:active, .btn-danger:active {
    transform: translateY(0);
  }
  /* Пункты навигации мягко сдвигаются */
  .nav-item { transition: background .14s, color .14s, transform .12s; }
  .nav-item:hover { transform: translateX(2px); }
  /* Свотчи тем */
  .vp-theme-dot { transition: transform .12s, box-shadow .14s, border-color .14s; }
  .vp-theme-dot:hover { transform: scale(1.14); }
  /* Пульс непрочитанных и онлайн-индикатора */
  .unread-dot { animation: vp-pulse 2.4s ease-in-out infinite; }
  /* Появление карточек/строк */
  .vp-rise { animation: vp-rise .28s cubic-bezier(.22,.61,.36,1) both; }
  /* Аватар-онлайн мягко дышит — задаётся инлайн, но добавим класс-хелпер */
  .vp-breathe { animation: vp-breathe 2.6s ease-in-out infinite; }
}

@keyframes vp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%      { box-shadow: 0 0 0 4px transparent; }
}
@keyframes vp-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes vp-breathe {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.06); opacity: .85; }
}
@keyframes vp-screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.vp-screen-page {
  animation: vp-screen-in .22s cubic-bezier(.22,.61,.36,1) both;
}

/* Плавные переходы фона при смене темы */
body, .glass-1, .glass-2 { transition: background-color .25s ease, border-color .25s ease; }

/* Кнопка «закрепить» в общем чате — появляется при наведении на сообщение */
.vp-pin-btn { transition: opacity .12s; }
.vp-tcrow:hover .vp-pin-btn { opacity: .6 !important; }
.vp-tcrow:hover .vp-pin-btn:hover { opacity: 1 !important; }


/* ═══════════════════════════════════════════════════════════════
   REDESIGN 2026 — ported from Claude Design bundle (additive vp-* classes)
   ═══════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════
   SHELL — redesigned sidebar + topbar
   ═══════════════════════════════════════════════════════════════════ */

.vp-sidebar {
  flex-shrink: 0; position: relative; z-index: 5;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(10,11,20,0.72), rgba(7,8,15,0.66));
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}

.vp-brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 14px; text-align: left; }
.vp-brand .logo-mark { width: 34px; height: 34px; }
.vp-wordmark { font-size: 15px; font-weight: 800; letter-spacing: .04em; color: var(--text-0); line-height: 1; }
.vp-wordmark .pay { color: var(--brand-blue); }
.vp-brand-sub { font-size: 9.5px; letter-spacing: .18em; color: var(--text-3); font-weight: 700; margin-top: 4px; }

.vp-navgroup-label { padding: 14px 20px 7px; }
.vp-nav { display: flex; flex-direction: column; gap: 3px; padding: 0 12px; }

.nav-item {
  display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px;
  border-radius: var(--radius); color: var(--text-2); font-size: 13px; font-weight: 500;
  position: relative; transition: background .14s, color .14s, transform .12s; width: 100%; text-align: left;
}
.nav-item .nav-ico { color: var(--text-3); transition: color .14s; flex-shrink: 0; display: flex; }
.nav-item:hover { background: var(--surface-2); color: var(--text-0); }
.nav-item:hover .nav-ico { color: var(--text-1); }
.nav-item.active {
  background: linear-gradient(100deg, var(--accent-soft), rgba(76,196,255,0.03) 70%);
  color: var(--text-0);
  box-shadow: inset 0 0 0 1px rgba(76,196,255,0.2);
}
.nav-item.active .nav-ico { color: var(--accent); }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px;
  background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue-2));
  border-radius: 0 3px 3px 0; box-shadow: 0 0 12px var(--accent-glow);
}
.nav-item .nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-2)); color: #061222;
  box-shadow: 0 0 10px var(--accent-glow);
}
.nav-item .nav-badge.warn { background: linear-gradient(135deg,#ffd96a,#f5b942); color: #1a1108; box-shadow: 0 0 10px rgba(245,185,66,0.4); }

/* rail (icon-only) */
.vp-sidebar.rail { width: 70px; align-items: center; }
.vp-sidebar.rail .vp-brand { justify-content: center; padding: 18px 0 14px; }
.vp-sidebar.rail .vp-nav { padding: 0 11px; align-items: center; }
.vp-sidebar.rail .nav-item { width: 48px; height: 48px; justify-content: center; padding: 0; border-radius: 13px; }
.vp-sidebar.rail .nav-item.active::before { left: -11px; top: 13px; bottom: 13px; }

/* operator card (sidebar footer) */
.vp-operator {
  margin: 10px 12px 14px; padding: 12px; border-radius: var(--radius-lg);
  background: var(--surface-1); border: 1px solid var(--border-1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.vp-operator-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.vp-stat { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 10px; padding: 7px 9px; }
.vp-stat-num { font-size: 17px; font-weight: 700; color: var(--text-0); line-height: 1.1; }
.vp-stat-lbl { font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; font-weight: 600; }

/* ─── Topbar ──────────────────────────────────────────────────────── */
.vp-topbar {
  height: 66px; padding: 0 22px; display: flex; align-items: center; gap: 16px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(8,9,16,0.4); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  position: relative; z-index: 4; flex-shrink: 0;
}
html.vp-standalone .vp-topbar {
  height: calc(66px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
}

.vp-mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-soft);
  background: rgba(8,9,16,0.96);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 -12px 36px rgba(0,0,0,0.28);
  contain: layout paint;
}
.vp-mobile-tab {
  min-width: 0;
  min-height: 48px;
  padding: 5px 2px 4px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  border: 1px solid transparent;
  transition: background .16s cubic-bezier(.22,.61,.36,1), color .16s cubic-bezier(.22,.61,.36,1), transform .1s cubic-bezier(.22,.61,.36,1), border-color .16s cubic-bezier(.22,.61,.36,1);
}
.vp-mobile-tab:active { transform: scale(.97); }
.vp-mobile-tab.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 26%, transparent);
}
.vp-mobile-tab-icon { position: relative; display: flex; align-items: center; justify-content: center; }
.vp-mobile-tab-badge {
  position: absolute;
  top: -7px;
  right: -13px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#ffd96a,#f5b942);
  color: #1a1108;
  font-size: 9px;
  font-weight: 800;
  box-shadow: 0 0 0 2px rgba(8,9,16,0.96);
}
.vp-mobile-tab-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 700;
}
.vp-mobile-more-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.vp-mobile-more-sheet {
  width: 100%;
  max-height: min(72vh, 560px);
  padding: 8px 10px calc(14px + env(safe-area-inset-bottom, 0px));
  border-radius: 18px 18px 0 0;
  border: 1px solid var(--border-1);
  border-bottom: 0;
  background: rgba(12,14,22,0.98);
  box-shadow: 0 -22px 70px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.vp-mobile-more-grabber {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  margin: 0 auto 10px;
}
.vp-mobile-more-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}
.vp-mobile-more-head > div { flex: 1; min-width: 0; }
.vp-mobile-more-title { font-size: 15px; font-weight: 800; color: var(--text-0); }
.vp-mobile-more-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.vp-mobile-more-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0 0;
}
.vp-mobile-more-group {
  padding: 10px 8px 6px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.vp-mobile-more-item {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-1);
  text-align: left;
  border: 1px solid transparent;
}
.vp-mobile-more-item.active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 26%, transparent);
}
.vp-mobile-more-item .nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.vp-mobile-more-item .nav-badge.warn {
  background: linear-gradient(135deg,#ffd96a,#f5b942);
  color: #1a1108;
}
.vp-search {
  flex: 1; max-width: 460px; height: 40px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; border-radius: 12px; background: var(--surface-1); border: 1px solid var(--border-1);
  color: var(--text-3); transition: border-color .14s, background .14s; cursor: text;
}
.vp-search:hover { border-color: var(--border-2); background: var(--surface-2); }
.vp-pulse {
  display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px 0 11px;
  border-radius: 12px; background: var(--surface-1); border: 1px solid var(--border-1);
}
.vp-pulse .num { font-size: 15px; font-weight: 700; color: var(--text-0); font-variant-numeric: tabular-nums; }
.vp-pulse .lbl { font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; line-height: 1.2; }
.vp-iconbtn {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-1); border: 1px solid var(--border-1); color: var(--text-2);
  transition: background .14s, color .14s, border-color .14s; position: relative;
}
.vp-iconbtn:hover { background: var(--surface-3); color: var(--text-0); border-color: var(--border-2); }

.kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 19px; padding: 0 5px;
  font-family: var(--font-mono); font-size: 10.5px; border-radius: 5px;
  background: var(--surface-3); border: 1px solid var(--border-1); color: var(--text-2);
}

/* ─── Shift toggle ────────────────────────────────────────────────── */
.vp-shift {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 10px; border-radius: 12px;
  transition: all .2s;
}
.vp-shift.on { background: linear-gradient(135deg, rgba(16,201,138,0.18), rgba(16,201,138,0.07)); border: 1px solid rgba(16,201,138,0.35); box-shadow: 0 0 24px rgba(16,201,138,0.16); }
.vp-shift.off { background: var(--surface-1); border: 1px solid var(--border-1); }
.vp-shift-led { width: 24px; height: 24px; border-radius: 8px; display: flex; align-items: center; justify-content: center; position: relative; }
.vp-shift.on .vp-shift-led { background: var(--success); color: #04150e; }
.vp-shift.off .vp-shift-led { background: var(--surface-3); color: var(--text-3); }

/* ─── Tooltip ─────────────────────────────────────────────────────── */
.tt { position: relative; }
.tt::after {
  content: attr(data-tt); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%) translateX(-4px);
  padding: 5px 9px; font-size: 11px; font-weight: 600; color: var(--text-0);
  background: rgba(20,22,32,0.97); border: 1px solid var(--border-1); border-radius: 7px;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s, transform .12s; z-index: 60;
}
.tt:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }
.tt-down::after { left: 50%; top: calc(100% + 8px); transform: translateX(-50%) translateY(-4px); }
.tt-down:hover::after { transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════════════════════════════
   LIVE CHAT — three panes
   ═══════════════════════════════════════════════════════════════════ */
.vp-livechat { flex: 1; display: flex; min-height: 0; gap: 0; }
.vp-pane { display: flex; flex-direction: column; min-height: 0; }
.vp-pane-dialogs { width: 340px; flex-shrink: 0; border-right: 1px solid var(--border-soft); }
.vp-pane-chat { flex: 1; min-width: 0; background: linear-gradient(180deg, rgba(255,255,255,0.008), transparent 30%); }
.vp-pane-client { width: 308px; flex-shrink: 0; border-left: 1px solid var(--border-soft); }
.vp-pane-head { height: 56px; flex-shrink: 0; padding: 0 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border-soft); }

/* dialog rows */
.vp-dialog {
  display: flex; gap: 11px; padding: 11px 14px; border-radius: 13px; cursor: pointer; position: relative;
  transition: background .12s; width: 100%; text-align: left; align-items: flex-start;
}
.vp-dialog:hover { background: var(--surface-1); }
.vp-dialog.active { background: linear-gradient(100deg, var(--accent-soft), rgba(76,196,255,0.03)); box-shadow: inset 0 0 0 1px rgba(76,196,255,0.2); }
.vp-dialog.active::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--brand-blue), var(--brand-blue-2)); box-shadow: 0 0 10px var(--accent-glow); }
.vp-dialog-name { font-size: 13px; font-weight: 600; color: var(--text-0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-dialog-preview { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.vp-offer-chip { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: 5px; font-size: 10px; font-weight: 700; letter-spacing: .02em; flex-shrink: 0; }
.vp-unread { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg,var(--brand-blue),var(--brand-blue-2)); color: #061222; box-shadow: 0 0 8px var(--accent-glow); }

.vp-filter-chip { height: 28px; padding: 0 11px; border-radius: 9px; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-1); border: 1px solid var(--border-soft); transition: all .12s; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.vp-filter-chip:hover { color: var(--text-0); background: var(--surface-2); }
.vp-filter-chip.active { color: var(--accent); background: var(--accent-soft); border-color: rgba(76,196,255,0.3); }
.vp-filter-chip .cnt { font-size: 10px; opacity: .8; }

/* messages */
.vp-msgs { flex: 1; min-height: 0; padding: 18px 22px; display: flex; flex-direction: column; gap: 9px; }

/* Появление сообщения: лёгкий «всплыв» снизу со стороны отправителя. */
@keyframes vp-bubble-in-left  { from { opacity: 0; transform: translate3d(-10px, 6px, 0) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes vp-bubble-in-right { from { opacity: 0; transform: translate3d(10px, 6px, 0) scale(.985); }  to { opacity: 1; transform: none; } }

.bubble { width: fit-content; max-width: 100%; padding: 9px 13px; border-radius: 18px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; position: relative; transition: transform .14s cubic-bezier(.22,.61,.36,1), box-shadow .18s ease; }
.bubble-client { align-self: flex-start; background: linear-gradient(165deg, rgba(32,36,52,0.94), rgba(21,24,36,0.94)); border: 1px solid var(--border-1); color: var(--text-0); border-bottom-left-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,0.26); animation: vp-bubble-in-left .26s cubic-bezier(.22,1,.36,1) both; }
.bubble-curator { align-self: flex-end; background: linear-gradient(135deg, rgba(46,230,208,0.30), rgba(22,194,194,0.20)); border: 1px solid rgba(46,230,208,0.44); color: #eafffb; border-bottom-right-radius: 6px; box-shadow: 0 6px 24px rgba(22,194,194,0.24), inset 0 1px 0 rgba(255,255,255,0.10); animation: vp-bubble-in-right .26s cubic-bezier(.22,1,.36,1) both; }
.bubble-system { align-self: center; background: var(--surface-1); border: 1px dashed var(--border-1); color: var(--text-2); font-size: 11.5px; padding: 6px 12px; border-radius: 9px; font-style: italic; max-width: 80%; text-align: center; }
@media (hover: hover) {
  .bubble-client:hover  { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.34); }
  .bubble-curator:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(22,194,194,0.30), inset 0 1px 0 rgba(255,255,255,0.12); }
}
.bubble-meta { font-size: 10px; margin-top: 4px; display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.bubble-client .bubble-meta { color: var(--text-3); justify-content: flex-start; }
.bubble-curator .bubble-meta { color: rgba(234,255,250,0.66); }

.vp-composer { flex-shrink: 0; padding: 12px 16px 16px; border-top: 1px solid var(--border-soft); background: linear-gradient(0deg, rgba(8,9,16,0.55), transparent); }
.vp-composer-box { display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 18px; background: var(--surface-1); border: 1px solid var(--border-1); transition: border-color .14s, box-shadow .14s; box-shadow: 0 2px 14px rgba(0,0,0,0.22); }
.vp-composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 8px 26px rgba(22,194,194,0.18); }
.vp-composer-box textarea { flex: 1; resize: none; background: transparent; color: var(--text-0); font-size: 13.5px; line-height: 1.4; max-height: 120px; padding: 8px 0; }
.vp-composer-box textarea::placeholder { color: var(--text-3); }

.vp-macro { height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--text-1); background: var(--surface-2); border: 1px solid var(--border-1); transition: all .12s; white-space: nowrap; }
.vp-macro:hover { color: var(--accent); border-color: rgba(76,196,255,0.4); background: var(--accent-soft); }

/* client card */
.vp-clientcard { padding: 18px 16px; display: flex; flex-direction: column; gap: 16px; }
.vp-info-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.vp-info-row:last-child { border-bottom: 0; }
.vp-info-k { font-size: 12px; color: var(--text-3); }
.vp-info-v { font-size: 12.5px; color: var(--text-1); font-weight: 500; text-align: right; }

/* photo / voice placeholders in chat */
.vp-photo { border-radius: 12px; overflow: hidden; position: relative; border: 1px solid var(--border-1); display: block; }
.vp-photo .ph { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: rgba(255,255,255,0.55); font-size: 11px; font-family: var(--font-mono); }
.vp-voice { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.vp-voice-wave { display: flex; align-items: center; gap: 2px; height: 26px; flex: 1; }
.vp-voice-wave i { width: 2.5px; border-radius: 2px; background: currentColor; opacity: .8; }

/* status pill */
.status-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid transparent; }
.status-active { color: var(--warning); background: var(--warning-soft); border-color: rgba(245,185,66,0.28); }
.status-pending { color: var(--pending); background: rgba(195,155,255,0.14); border-color: rgba(195,155,255,0.28); }
.status-completed { color: var(--success); background: var(--success-soft); border-color: rgba(16,201,138,0.28); }
.status-rejected { color: var(--danger); background: var(--danger-soft); border-color: rgba(244,69,110,0.28); }

/* ─── Stat cards (Stats screen) ──────────────────────────────────── */
.vp-kpi { padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface-1); border: 1px solid var(--border-1); position: relative; overflow: hidden; transition: transform .16s, border-color .16s, box-shadow .16s; }
.vp-kpi:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow-2); }
.vp-kpi-ico { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }

/* ─── Table ──────────────────────────────────────────────────────── */
.vp-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.vp-table thead th { position: sticky; top: 0; text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); padding: 13px 16px; background: var(--bg-1); border-bottom: 1px solid var(--border-soft); z-index: 1; }
.vp-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border-soft); font-size: 13px; color: var(--text-1); }
.vp-table tbody tr { transition: background .12s; }
.vp-table tbody tr:hover { background: var(--surface-1); }

/* ─── Animations ──────────────────────────────────────────────────── */
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes fade-in-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-ring { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.85); } }
/* transform-only so rows/bubbles stay visible even if the animation is frozen
   (e.g. a backgrounded tab with animation-fill-mode holding frame 0). */
@keyframes vp-rise { from { transform: translateY(9px); } to { transform: none; } }
.anim-fade-in { animation: fade-in .22s cubic-bezier(.22,.61,.36,1) both; }
.anim-fade-in-up { animation: fade-in-up .3s cubic-bezier(.22,.61,.36,1) both; }
.anim-spin { animation: spin 1s linear infinite; }
.live-dot { animation: pulse-ring 1.8s ease-in-out infinite; }
.vp-rise { animation: vp-rise .24s cubic-bezier(.22,.61,.36,1) both; }

.lift { transition: transform .16s, box-shadow .16s, border-color .16s; }
.lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-2); }
.no-select { user-select: none; }
.hidden { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .nav-item:hover { transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .vp-pane-client { display: none; }
}
@media (max-width: 760px) {
  input, textarea, select { font-size: 16px !important; }
  .btn:not(.btn-icon) {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    text-align: center;
    line-height: 1.18;
  }
  .vp-livechat { width: 100%; min-width: 0; }
  .vp-pane { width: 100%; min-width: 0; }
  .vp-pane-dialogs { width: 100%; }
  .vp-msgs { padding: 14px 10px; }
  .bubble { font-size: 13.5px; line-height: 1.42; }
  .bubble-system { max-width: 92%; }
}

/* ═══ Обучение куратора (training.jsx) ═══ */
.tr-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 42px; border-radius: 12px; background: var(--surface-1); border: 1px solid var(--border-1); color: var(--text-3); position: sticky; top: 0; z-index: 3; }
.tr-search input { flex: 1; background: transparent; border: 0; outline: none; color: var(--text-0); font-size: 14px; }
.tr-search input::placeholder { color: var(--text-3); }
.tr-clear { color: var(--text-3); display: flex; padding: 4px; border-radius: 8px; }
.tr-clear:hover { color: var(--text-0); background: var(--surface-2); }
.tr-card { border: 1px solid var(--border-1); border-radius: 14px; background: var(--surface-1); overflow: hidden; }
.tr-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; text-align: left; color: var(--text-0); font-size: 15px; font-weight: 700; }
.tr-head:hover { background: var(--surface-2); }
.tr-head-title { flex: 1; }
.tr-chev { color: var(--text-3); transition: transform .18s ease; display: flex; }
.tr-chev.open { transform: rotate(180deg); }
.tr-body { padding: 4px 18px 18px; color: var(--text-1); font-size: 13.6px; line-height: 1.6; border-top: 1px solid var(--border-soft); animation: fade-in .18s ease both; }
.tr-body h4 { color: var(--text-0); font-size: 14px; font-weight: 700; margin: 16px 0 6px; }
.tr-body p { margin: 8px 0; }
.tr-body ul { margin: 6px 0 6px; padding-left: 20px; }
.tr-body li { margin: 4px 0; }
.tr-body a { color: var(--accent); }
.tr-body code { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: 6px; padding: 1px 6px; font-family: var(--font-mono, monospace); font-size: 12.5px; color: var(--text-0); }
.tr-body i { color: var(--text-2); }
.tr-body b { color: var(--text-0); }
.tr-lead { color: var(--text-2); font-size: 13.6px; background: var(--accent-soft); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; padding: 10px 12px; }
.tr-quote { background: var(--surface-2); border: 1px dashed var(--border-1); border-radius: 10px; padding: 12px 14px; margin: 8px 0; color: var(--text-1); }
.tr-tablewrap { overflow-x: auto; margin: 8px 0; border-radius: 10px; border: 1px solid var(--border-1); }
.tr-table { width: 100%; border-collapse: collapse; font-size: 12.8px; min-width: 560px; }
.tr-table th { background: var(--surface-2); color: var(--text-2); text-align: left; padding: 9px 11px; font-weight: 700; white-space: nowrap; }
.tr-table td { padding: 9px 11px; border-top: 1px solid var(--border-soft); color: var(--text-1); vertical-align: top; }
.tr-faq { margin: 8px 0; }
.tr-faq dt { color: var(--text-0); font-weight: 700; margin-top: 12px; }
.tr-faq dd { margin: 3px 0 0; padding-left: 0; color: var(--text-2); }
/* фикс: не сжимать карточки обучения в flex-колонке (иначе свёрнутые становятся 20px) */
.tr-root > * { flex-shrink: 0; }

/* ═══ Пузыри чата: следуют выбранному акценту + 3 стиля (data-bubble) ═══ */
.bubble-client { background: var(--surface-1); box-shadow: 0 1px 8px rgba(0,0,0,0.18); }
.bubble-curator { color: var(--text-0); background: none; border: 1px solid transparent; box-shadow: none; }
[data-bubble="gradient"] .bubble-curator, html:not([data-bubble]) .bubble-curator {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 34%, transparent), color-mix(in srgb, var(--accent-2) 20%, transparent));
  border-color: color-mix(in srgb, var(--accent) 44%, transparent);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 22%, transparent), inset 0 1px 0 rgba(255,255,255,0.10);
}
[data-bubble="solid"] .bubble-curator {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06121c;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 32%, transparent);
}
[data-bubble="solid"] .bubble-curator .bubble-meta { color: rgba(6,18,28,0.6); }
[data-bubble="soft"] .bubble-curator {
  background: color-mix(in srgb, var(--accent) 13%, var(--surface-1));
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
@media (hover: hover) {
  .bubble-curator:hover { box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 30%, transparent); }
}

/* ═══ MintWave: чистый фон (без «клетки») + кастомный фон ВСЕЙ панели (data-chatbg) ═══ */
.app-bg-grid { display: none; }
/* убираем жёсткие блобы-«пятна» — фон задаётся мягкими пресетами ниже */
.app-bg::before, .app-bg::after { display: none !important; }
[data-chat-scroll] { background: transparent; }   /* чат прозрачный — виден общий фон */

/* Пресеты применяются к глобальному .app-bg, поэтому меняют фон везде, мягко. */
[data-chatbg="aurora"] .app-bg, html:not([data-chatbg]) .app-bg {
  background:
    radial-gradient(80% 60% at 50% -8%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 62%),
    var(--bg-0);
}
[data-chatbg="mesh"] .app-bg {
  background:
    radial-gradient(38% 42% at 14% 6%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    radial-gradient(42% 46% at 86% 30%, color-mix(in srgb, var(--accent-2) 6%, transparent), transparent 72%),
    var(--bg-0);
}
[data-chatbg="waves"] .app-bg {
  background:
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--accent) 3.5%, transparent) 0 2px, transparent 2px 26px),
    radial-gradient(90% 60% at 50% -8%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    var(--bg-0);
}
[data-chatbg="plain"] .app-bg { background: var(--bg-0); }
