/* ============ Tokens ============ */
/* Тема "blue" — базовая, синие акценты (по умолчанию) */
:root,
[data-theme="blue"] {
  --bg: #0a0d16;
  --bg-soft: #0d111c;
  --surface: #12161f;
  --surface-rgb: 18, 22, 31;
  --surface-2: #171c28;
  --border: #232a3a;
  --text: #eef1f6;
  --text-dim: #98a1b5;
  --text-faint: #5c6478;

  --glow-1: rgba(77, 141, 255, 0.18);
  --glow-2: rgba(34, 211, 238, 0.12);

  --shadow-soft: 0 20px 60px rgba(0,0,0,0.4);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset;
}

/* Тема "dark" — насыщенные нейтральные тёмные оттенки, ближе к T.Technology */
[data-theme="dark"] {
  --bg: #121213;
  --bg-soft: #161617;
  --surface: #1b1b1d;
  --surface-rgb: 27, 27, 29;
  --surface-2: #212123;
  --border: #2c2c2f;
  --text: #f3f2ef;
  --text-dim: #a9a9ae;
  --text-faint: #6f6f76;

  --glow-1: rgba(77, 141, 255, 0.10);
  --glow-2: rgba(34, 211, 238, 0.07);

  --shadow-soft: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02) inset;
}

/* Тема "light" — мягкий серовато-белый фон, не бьёт по глазам */
[data-theme="light"] {
  --bg: #f1f2f6;
  --bg-soft: #eaecf1;
  --surface: #ffffff;
  --surface-rgb: 255, 255, 255;
  --surface-2: #f5f6fa;
  --border: #e2e4ec;
  --text: #14151c;
  --text-dim: #565b6c;
  --text-faint: #8a8fa0;

  --glow-1: rgba(77, 141, 255, 0.10);
  --glow-2: rgba(34, 211, 238, 0.08);

  --shadow-soft: 0 20px 50px rgba(20, 26, 50, 0.08);
  --shadow-card: none;
}

:root {
  --accent: #4d8dff;
  --accent-rgb: 77, 141, 255;
  --accent-2: #22d3ee;
  --accent-soft: rgba(77, 141, 255, 0.14);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent);
  --wa: #2fd170;
  --tg: #4d8dff;
  --max: #a97bff;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Unbounded", var(--font);
}

[data-theme="light"] { --accent-soft: rgba(77, 141, 255, 0.10); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background .4s ease, color .4s ease;
  overflow-x: hidden;
  min-height: 100vh;
  touch-action: manipulation;
}

a, button { color: inherit; text-decoration: none; touch-action: manipulation; }
button { font-family: inherit; -webkit-appearance: none; appearance: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ Scroll progress ============ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 100;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .1s linear;
}

/* ============ Ambient background ============ */
.bg-glow {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 900px;
  background:
    radial-gradient(600px 400px at 15% 10%, var(--glow-1), transparent 60%),
    radial-gradient(500px 400px at 85% 0%, var(--glow-2), transparent 60%);
  pointer-events: none;
  z-index: 0;
  transition: background .4s ease;
  animation: drift 26s ease-in-out infinite alternate;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.bg-glow--2 {
  inset: 30% -15% auto auto;
  height: 700px;
  background: radial-gradient(500px 380px at 70% 40%, var(--glow-2), transparent 65%);
  animation: drift2 32s ease-in-out infinite alternate;
}
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(3%, 4%) scale(1.06); }
}
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="light"] .bg-grain {
  opacity: 0.03;
  mix-blend-mode: multiply;
}

@keyframes drift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-4%, -3%) scale(1.08); }
}

/* ============ Typography ============ */
h1, h2, h3, .brand__name, .nav a, .btn, .steps__num, .stat__num {
  font-family: var(--font-display);
}
h1, h2, h3,
.hero__title,
.section__head h2,
.cabinet-app__heading {
  text-wrap: balance;
}
.about__text p,
.cabinet-app__lead,
.plan-card__features li {
  text-wrap: pretty;
}

/* ============ Header ============ */
.header {
  position: sticky;
  top: 14px;
  z-index: 50;
  margin: 14px auto 0;
  max-width: 1180px;
  width: calc(100% - 32px);
  border-radius: 26px;
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  background: rgba(var(--surface-rgb), 0.72);
  box-shadow: var(--shadow-soft);
  transition: background .4s ease, border-color .4s ease, box-shadow .4s ease;
  transform: translateZ(0);
}
.header.is-nav-open {
  z-index: 80;
}

body.nav-open {
  overflow: hidden;
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 72px;
  padding: 0 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  text-decoration: none;
}

.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--accent-soft), transparent);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.brand__mark::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  animation: pulse-glow 3.5s ease-in-out infinite;
}
.brand__mark img { width: 26px; height: 26px; object-fit: contain; position: relative; z-index: 1; }
@keyframes pulse-glow {
  0%, 100% { opacity: .5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand__name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.brand__sub {
  font-size: 10.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-family: var(--font);
  white-space: nowrap;
}

.nav {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 8px;
}
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  color: var(--text-dim);
  border-radius: 999px;
  transition: color .25s ease, background .25s ease;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.nav a span { position: relative; }
.nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--surface-2);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity .25s ease, transform .25s ease;
  z-index: -1;
}
.nav a:hover { color: var(--text); }
.nav a:hover::before { opacity: 1; transform: scale(1); }

.nav__cabinet {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1px;
  font-family: var(--font);
  color: #06101f;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 16px rgba(77, 141, 255, 0.22);
  transition: transform .25s ease, box-shadow .25s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav__cabinet-text { position: relative; }
.nav__cabinet-text--short { display: none; }
.nav__cabinet:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(77, 141, 255, 0.28);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.icon-btn:focus { outline: none; }
.icon-btn:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.icon-btn:active { transform: scale(0.96); }
.burger { display: none; }

/* ---- Theme switch ---- */
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  min-width: max-content;
}
.theme-switch__btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s ease, box-shadow .2s ease;
}
.theme-switch__btn.active {
  background: var(--surface-2);
}
.theme-switch__btn.active .theme-swatch {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 3px var(--accent);
}
.theme-switch__btn:focus { outline: none; }
.theme-switch__btn:focus-visible {
  box-shadow: var(--focus-ring);
}
.theme-switch__btn.active:focus-visible .theme-swatch {
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 3px var(--accent),
    var(--focus-ring);
}
.theme-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
}
.theme-swatch--blue {
  background: linear-gradient(135deg, #4d8dff, #22d3ee);
  border-color: rgba(77, 141, 255, 0.45);
}
.theme-swatch--light { background: linear-gradient(135deg, #ffffff, #d8dbe4); }
.theme-swatch--dark { background: linear-gradient(135deg, #2b2b2e, #121213); }

/* ============ Hero ============ */
.hero {
  position: relative;
  z-index: 1;
  padding: 84px 24px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
  animation: fade-up .7s ease both;
}
.hero__badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.hero__title {
  font-family: var(--font);
  font-size: clamp(30px, 4.9vw, 50px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 900px;
  width: 100%;
  animation: fade-up .7s ease .08s both;
}

.accent-text {
  background: linear-gradient(120deg, var(--accent) 20%, var(--accent-2) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(var(--accent-rgb), 0.22));
}

.hero__desc {
  max-width: 620px;
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 17px;
  animation: fade-up .7s ease .16s both;
}

.hero__cta {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fade-up .7s ease .24s both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.1px;
  cursor: pointer;
  border: 1px solid transparent;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.98); transition-duration: 0.08s; }
.btn:focus { outline: none; }
.btn:focus-visible {
  box-shadow: var(--focus-ring);
}
.btn--primary:focus-visible {
  box-shadow: var(--focus-ring), 0 12px 30px rgba(77, 141, 255, 0.28);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}
.btn::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left .6s ease;
}
.btn:hover::after { left: 130%; }

.btn--primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #06101f;
  box-shadow: 0 12px 30px rgba(77,141,255,0.28);
}
.btn--ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); }

/* ---- chat mock ---- */
.hero__frame {
  margin-top: 56px;
  width: 100%;
  display: flex;
  justify-content: center;
  animation: fade-up .8s ease .3s both;
}

.chat-mock {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  text-align: left;
  transition: transform .4s ease;
}
.chat-mock:hover { transform: translateY(-4px); }

.chat-mock__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot--wa { background: var(--wa); }
.dot--tg { background: var(--tg); }
.dot--max { background: var(--max); }
.chat-mock__title { margin-left: 8px; font-size: 13px; font-weight: 700; color: var(--text-dim); font-family: var(--font); }

.chat-mock__body {
  padding: 22px 20px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.45;
  opacity: 0;
  animation: rise .5s ease forwards;
}
.bubble--in {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bubble--out {
  align-self: flex-end;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #06101f;
  font-weight: 600;
  border-bottom-right-radius: 4px;
}
.delay1 { animation-delay: .5s; }
.delay2 { animation-delay: 1s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---- stats ---- */
.stats {
  margin-top: 64px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.stat {
  background: var(--bg-soft);
  padding: 26px 18px;
  text-align: center;
  transition: background .25s ease;
}
.stat:hover { background: var(--surface-2); }
.stat__num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(120deg, var(--accent) 20%, var(--accent-2) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.4;
}

/* ============ Sections ============ */
.section {
  position: relative;
  z-index: 1;
  padding: 92px 24px;
}

.section__head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}

.section__head h2 {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.3;
}

/* ---- About ---- */
.about__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}
.about__text p {
  color: var(--text-dim);
  font-size: 16px;
  margin-bottom: 18px;
}
.about__points { display: flex; flex-direction: column; gap: 26px; }
.about__points li { display: flex; gap: 16px; }
.about__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--accent-2);
  flex-shrink: 0;
  padding-top: 2px;
}
.about__points h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.about__points p { color: var(--text-dim); font-size: 14.5px; }

/* ---- Cards / Services ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
  box-shadow: var(--shadow-card);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 30px rgba(0,0,0,0.16);
}
.card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  transition: transform .35s ease, background .35s ease;
}
.card:hover .card__icon { transform: rotate(-8deg) scale(1.08); }
.card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.2px; }
.card p { color: var(--text-dim); font-size: 14.5px; }

/* ---- Channels ---- */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.channel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  text-align: center;
  transition: transform .3s ease, border-color .3s ease;
}
.channel:hover { transform: translateY(-6px); border-color: var(--accent); }
.channel__icon {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .35s ease;
}
.channel:hover .channel__icon { transform: scale(1.12); }
.channel__icon--tg { color: var(--tg); }
.channel__icon--wa { color: var(--wa); }
.channel__icon--max { color: var(--max); }
.channel h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.2px; }
.channel p { color: var(--text-dim); font-size: 14.5px; }

/* ---- Why us ---- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.why {
  padding: 22px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .3s ease, border-color .3s ease;
}
.why:hover { transform: translateY(-4px); border-color: var(--accent); }
.why__num { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--text-faint); }
.why h4 { margin-top: 10px; font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }
.why p { margin-top: 6px; font-size: 13.5px; color: var(--text-dim); }

/* ---- Steps ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 40px;
}
.steps li {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: padding-left .3s ease;
}
.steps li:hover { padding-left: 8px; }
.steps__num {
  font-size: 21px;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--accent);
  flex-shrink: 0;
  width: 46px;
}
.steps h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.2px; }
.steps p { font-size: 14px; color: var(--text-dim); }

/* ---- CTA ---- */
.cta { padding: 20px 24px 100px; position: relative; z-index: 1; }
.cta__box {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta__box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 50% 0%, var(--accent-soft), transparent 70%);
  pointer-events: none;
  animation: pulse-glow 4s ease-in-out infinite;
}
.cta__box h2 {
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.5px;
  position: relative;
}
.cta__box p {
  margin-top: 14px;
  color: var(--text-dim);
  position: relative;
}
.cta__box .btn { margin-top: 28px; position: relative; }

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 24px 30px;
  position: relative;
  z-index: 1;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer__brand p { margin-top: 14px; color: var(--text-dim); font-size: 14px; max-width: 280px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h5 { font-family: var(--font-display); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .8px; color: var(--text-faint); margin-bottom: 4px; }
.footer__col a, .footer__col span { font-size: 14.5px; color: var(--text-dim); }
.footer__col a:hover { color: var(--accent-2); }

.footer__bottom {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
}
.footer__bottom--legal {
  justify-content: center;
  gap: 8px 16px;
}
.footer__bottom a { color: var(--text-dim); }
.footer__bottom a:hover { color: var(--accent-2); }

/* ============ Legal pages (реквизиты, оферта) ============ */
.legal-back {
  padding: 8px 14px;
  font-size: 13px;
}

.legal-page {
  padding: 48px 24px 64px;
  max-width: 720px;
}

.legal-page__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 8px 0 12px;
  line-height: 1.15;
}

.legal-page__lead {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 28px;
  line-height: 1.55;
}

.legal-page__note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.5;
}
.legal-page__note a { color: var(--accent); }

.legal-card {
  padding: 20px 22px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.legal-card h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.legal-dl {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-dl__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 20px;
  align-items: baseline;
}

.legal-dl dt {
  font-size: 13px;
  color: var(--text-faint);
  font-weight: 500;
}

.legal-dl dd {
  margin: 0;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.45;
}

.legal-dl a {
  color: var(--accent);
}
.legal-dl a:hover { color: var(--accent-2); }

.legal-prose {
  padding: 24px 26px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.legal-prose h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 24px 0 10px;
  color: var(--text);
}
.legal-prose h2:first-child { margin-top: 0; }

.legal-prose p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 10px;
}

.legal-prose a { color: var(--accent); }
.legal-prose a:hover { color: var(--accent-2); }

.legal-prose__date {
  margin-top: 24px !important;
  font-size: 13px !important;
  color: var(--text-faint) !important;
}

@media (max-width: 560px) {
  .legal-dl__row { grid-template-columns: 1fr; gap: 4px; }
  .legal-page { padding-top: 32px; }
  .legal-back { display: none; }
}

/* ============ Reveal-on-scroll stagger ============ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .55s ease;
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.card:nth-child(1) { --i: 1; } .card:nth-child(2) { --i: 2; } .card:nth-child(3) { --i: 3; }
.card:nth-child(4) { --i: 4; } .card:nth-child(5) { --i: 5; } .card:nth-child(6) { --i: 6; }
.channel:nth-child(1) { --i: 1; } .channel:nth-child(2) { --i: 2; } .channel:nth-child(3) { --i: 3; }
.why:nth-child(1) { --i: 1; } .why:nth-child(2) { --i: 2; } .why:nth-child(3) { --i: 3; }
.why:nth-child(4) { --i: 4; } .why:nth-child(5) { --i: 5; }
.stat:nth-child(1) { --i: 1; } .stat:nth-child(2) { --i: 2; } .stat:nth-child(3) { --i: 3; } .stat:nth-child(4) { --i: 4; }
.steps li:nth-child(odd) { --i: 1; } .steps li:nth-child(even) { --i: 2; }

/* ============ Responsive ============ */
@media (min-width: 1100px) {
  .nav { display: flex; }
  .burger { display: none !important; }
}

@media (min-width: 1100px) and (max-width: 1360px) {
  .brand__sub { display: none; }
  .nav__link--optional { display: none; }
  .nav a { padding: 8px 10px; font-size: 12.5px; }
}

@media (min-width: 1100px) and (max-width: 1240px) {
  .nav__cabinet-text--full { display: none; }
  .nav__cabinet-text--short { display: inline; }
}

@media (max-width: 1099px) {
  .burger { display: flex; }
  .brand__sub { display: none; }

  .nav {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    left: 10px;
    right: 10px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 12px;
    gap: 4px;
    z-index: 70;
    background: rgba(var(--surface-rgb), 0.96);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.9);
    transform-origin: calc(100% - 28px) 0;
    transition:
      opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0.42s;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
  }

  .nav a {
    width: 100%;
    padding: 12px 16px;
    opacity: 0;
    transform: translateY(-6px);
    transition:
      opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
      color 0.25s ease,
      background 0.25s ease;
  }

  .nav.open a {
    opacity: 1;
    transform: translateY(0);
  }

  .nav.open a:nth-child(1) { transition-delay: 0.05s; }
  .nav.open a:nth-child(2) { transition-delay: 0.08s; }
  .nav.open a:nth-child(3) { transition-delay: 0.11s; }
  .nav.open a:nth-child(4) { transition-delay: 0.14s; }
  .nav.open a:nth-child(5) { transition-delay: 0.17s; }
  .nav.open a:nth-child(6) { transition-delay: 0.2s; }

  .nav:not(.open) a {
    transition-delay: 0s;
  }

  .nav .nav__link--optional {
    display: inline-flex;
  }

  .burger svg {
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .burger[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
    color: var(--accent);
    background: var(--accent-soft);
  }

  .burger[aria-expanded="true"] svg {
    transform: rotate(90deg);
  }
}

@media (max-width: 1080px) {
  .about__grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .channels-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .cards-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .hero { padding-top: 50px; }
  .hero__title {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.12;
    overflow-wrap: break-word;
  }
  .hero__desc { font-size: 15px; }
  .hero__cta { flex-direction: column; width: 100%; }
  .btn { justify-content: center; width: 100%; }
  .section__head h2 {
    font-size: clamp(22px, 6vw, 32px);
    line-height: 1.15;
    overflow-wrap: break-word;
  }
  .header {
    width: calc(100% - 20px);
    border-radius: 20px;
    top: 10px;
    margin-top: 10px;
  }
  .header__inner {
    height: 60px;
    padding: 0 12px;
    gap: 8px;
  }
  .brand__name { font-size: 16px; }
  .brand__mark { width: 36px; height: 36px; }
  .header__actions { gap: 6px; }
  .theme-switch { padding: 3px; gap: 2px; }
  .theme-switch__btn { width: 26px; height: 26px; }
  .theme-swatch { width: 12px; height: 12px; }
  .nav__cabinet {
    padding: 7px 11px;
    font-size: 12px;
    box-shadow: none;
  }
  .nav__cabinet-text--full { display: none; }
  .nav__cabinet-text--short { display: inline; }
  /* padding-left/right only — a shorthand `padding` here would zero out
     .section's vertical padding on elements combining both classes,
     collapsing the gap between sections (eyebrow labels overlapping
     the previous section's text). */
  .container { padding-left: 16px; padding-right: 16px; }
  .section { padding: 56px 20px; }
  .section, #contacts { scroll-margin-top: 90px; }
}

@media (max-width: 480px) {
  .header { width: calc(100% - 16px); }
  .header__inner { padding: 0 10px; gap: 6px; }
  .nav__cabinet { padding: 7px 9px; }
}

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

/* Меньше нагрузки на слабых мобильных GPU: упрощаем декоративные слои */
@media (max-width: 640px), (hover: none) and (pointer: coarse) {
  .bg-glow { height: 600px; }
  .bg-glow--2 { height: 480px; animation-duration: 40s; }
  .header { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .card:hover, .channel:hover, .why:hover, .chat-mock:hover { transform: none; }
}

/* Safari/iOS: страховка на случай отсутствия поддержки backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header { background: var(--surface); }
}

/* ============ Personal cabinet overlay ============ */
body.cabinet-open {
  overflow: hidden;
}
body.cabinet-open main,
body.cabinet-open .header,
body.cabinet-open .footer {
  transform: scale(0.98);
  filter: blur(4px);
  transition: transform .45s cubic-bezier(.22,1,.36,1), filter .45s ease;
  pointer-events: none;
}
@media (max-width: 560px) {
  body.cabinet-open main,
  body.cabinet-open .header,
  body.cabinet-open .footer {
    transform: none;
    filter: none;
  }
}

.cabinet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
}
.cabinet.is-open {
  opacity: 1;
  visibility: visible;
}

.cabinet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.cabinet__panel {
  position: relative;
  width: min(440px, 100%);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: 32px 28px 28px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: rgba(var(--surface-rgb), 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
  transform: translateY(24px) scale(0.94);
  opacity: 0;
  transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .45s ease, width .35s ease, max-height .35s ease;
}
.cabinet.is-open .cabinet__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.cabinet__panel--wide {
  width: min(960px, 100%);
  max-height: min(88vh, 780px);
  padding: 0;
  overflow: hidden;
  border-radius: 28px;
}
.cabinet__panel--wide .cabinet-app {
  border-radius: inherit;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 100% 0%, rgba(var(--accent-rgb), 0.05), transparent 55%),
    rgba(var(--surface-rgb), 0.4);
}
.cabinet__panel--wide .cabinet__close {
  top: 12px;
  right: 12px;
}
.cabinet__step--app {
  height: min(88vh, 780px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cabinet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.cabinet__close:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-2);
}
.cabinet__close:focus { outline: none; }
.cabinet__close:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.cabinet__close svg {
  display: block;
  flex-shrink: 0;
}

.cabinet__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  margin-bottom: 10px;
}
.cabinet__title {
  font-family: var(--font);
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  padding-right: 44px;
}
.cabinet__desc {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.55;
}

.cabinet__step[hidden] { display: none; }
.cabinet__step:not([hidden]) {
  animation: cabinet-step-in .45s cubic-bezier(.22,1,.36,1) both;
}
@keyframes cabinet-step-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.cabinet__form {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cabinet__choice {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cabinet__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cabinet__field span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
}
.cabinet__optional {
  font-style: normal;
  font-weight: 500;
  opacity: 0.65;
}
.cabinet__field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cabinet__field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.cabinet__submit { width: 100%; justify-content: center; margin-top: 4px; }
.cabinet__back, .cabinet__logout { justify-content: center; }

.cabinet__error {
  font-size: 13.5px;
  color: #ff6b7a;
  line-height: 1.4;
}
.cabinet__dev-hint {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
}
.cabinet__empty,
.cabinet__loading {
  padding: 20px;
  border-radius: 16px;
  border: 1px dashed var(--border);
  color: var(--text-dim);
  text-align: center;
  font-size: 14.5px;
}

.cabinet-app__stat-value.is-loading {
  display: inline-block;
  min-width: 2.4em;
  border-radius: 6px;
  color: transparent;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.cabinet__bookings {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cabinet__booking {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}
.cabinet__booking-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.cabinet__booking-service {
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font);
  overflow-wrap: break-word;
  word-break: break-word;
}
.cabinet__booking-company {
  font-size: 13px;
  color: var(--text-dim);
}
.cabinet__booking-date {
  font-size: 13.5px;
  color: var(--text-faint);
}
.cabinet__booking-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.cabinet__status {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}
.cabinet__status--confirmed { background: rgba(47,209,112,0.15); color: var(--wa); }
.cabinet__status--cancelled { background: rgba(255,107,122,0.12); color: #ff6b7a; }
.cabinet__status--completed { background: rgba(152,161,181,0.15); color: var(--text-dim); }
.cabinet__cancel {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: border-color .2s ease, color .2s ease;
}
.cabinet__cancel:hover { border-color: #ff6b7a; color: #ff6b7a; }
.cabinet__cancel:focus { outline: none; }
.cabinet__cancel:focus-visible {
  border-color: #ff6b7a;
  box-shadow: 0 0 0 3px color-mix(in srgb, #ff6b7a 35%, transparent);
}
.cabinet__confirm {
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.cabinet__confirm:hover { border-color: var(--accent); color: var(--accent); }
.cabinet__confirm:focus { outline: none; }
.cabinet__confirm:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.cabinet-app__badge--ok {
  color: #7ee787;
  background: rgba(126, 231, 135, 0.1);
  border-color: rgba(126, 231, 135, 0.25);
}
.cabinet-app__manager-item {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 6px;
}
.cabinet-app__manager-item code {
  font-size: 12px;
  color: var(--text);
}
.cabinet-app__card--wide {
  grid-column: 1 / -1;
}
.cabinet-staff__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.cabinet-staff__panel {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, var(--accent) 15%);
  background:
    linear-gradient(165deg, rgba(var(--accent-rgb), 0.05), transparent 45%),
    rgba(var(--surface-rgb), 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cabinet-staff__form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.cabinet-staff__field--phone {
  grid-column: 1 / -1;
}
.cabinet-staff__role-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cabinet-staff__role-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
}
.cabinet-staff__roles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cabinet-staff__role-btn {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.cabinet-staff__role-btn:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}
.cabinet-staff__role-btn.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent);
}
.cabinet-staff__role-btn:focus {
  outline: none;
}
.cabinet-staff__role-btn:focus-visible {
  box-shadow: var(--focus-ring);
}
.cabinet-staff__form-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.cabinet-staff__submit {
  min-width: 200px;
}
.cabinet-staff__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cabinet-staff__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, var(--accent) 12%);
  border-radius: 16px;
  background:
    linear-gradient(165deg, rgba(var(--accent-rgb), 0.04), transparent 50%),
    rgba(var(--surface-rgb), 0.45);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.cabinet-staff__item:hover {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
  transform: translateY(-1px);
}
.cabinet-staff__avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(155deg, var(--accent-soft), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  text-transform: uppercase;
}
.cabinet-staff__info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.cabinet-staff__name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.cabinet-staff__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.cabinet-staff__role-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface);
}
.cabinet-staff__role-badge--owner,
.cabinet-staff__role-badge--director {
  color: var(--accent-2);
  border-color: color-mix(in srgb, var(--accent-2) 30%, var(--border));
  background: color-mix(in srgb, var(--accent-2) 10%, transparent);
}
.cabinet-staff__role-badge--administrator {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  background: var(--accent-soft);
}
.cabinet-staff__meta {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}
.cabinet-staff__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.cabinet-staff__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  white-space: nowrap;
}
.cabinet-staff__status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}
.cabinet-staff__status.is-connected {
  color: #7ee787;
  border-color: rgba(126, 231, 135, 0.25);
  background: rgba(126, 231, 135, 0.08);
}
.cabinet-staff__status.is-connected::before {
  opacity: 1;
  background: #7ee787;
}
.cabinet-staff__actions button {
  font-size: 12px;
  padding: 6px 10px;
}
.cabinet-staff__empty {
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px dashed color-mix(in srgb, var(--border) 70%, var(--accent) 30%);
  background: rgba(var(--surface-rgb), 0.28);
  text-align: center;
}
.cabinet-staff__empty p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
}
.cabinet-staff__empty code {
  font-size: 11px;
  color: var(--accent-2);
}
@media (max-width: 700px) {
  .cabinet-staff__form-grid {
    grid-template-columns: 1fr;
  }
  .cabinet-staff__field--phone {
    grid-column: auto;
  }
  .cabinet-staff__item {
    grid-template-columns: auto 1fr;
  }
  .cabinet-staff__aside {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .cabinet-staff__submit {
    width: 100%;
  }
}
.cabinet__cancel:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ Cabinet app (sidebar dashboard) ============ */
.cabinet-app {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100%;
  min-height: 0;
  min-width: 0;
  flex: 1;
}

.cabinet-app__sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 14px 16px;
  border-right: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(var(--surface-rgb), 0.72), rgba(var(--surface-rgb), 0.48));
}

.cabinet-app__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 12px;
}
.cabinet-app__brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cabinet-app__brand-mark img { width: 22px; height: 22px; object-fit: contain; }
.cabinet-app__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
  flex: 1;
}

.cabinet-app__brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 22px;
}

.cabinet-app__brand-title strong {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.cabinet-app__brand-text .cabinet-app__plan-badge {
  margin-top: 0;
  flex-shrink: 0;
  align-self: center;
}

.cabinet-app__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.cabinet-app__nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.cabinet-app__nav-btn svg { flex-shrink: 0; opacity: 0.85; }
.cabinet-app__nav-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}
.cabinet-app__nav-btn:focus { outline: none; }
.cabinet-app__nav-btn:focus-visible {
  box-shadow: var(--focus-ring);
  color: var(--text);
}
.cabinet-app__nav-btn.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.25);
}
.cabinet-app__nav-btn:active {
  transform: scale(0.98);
}

.cabinet-app__sidebar-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cabinet-app__user {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
  min-width: 0;
}
.cabinet-app__user-name {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cabinet-app__user-email {
  font-size: 11.5px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cabinet-app__logout {
  width: 100%;
  justify-content: center;
  padding: 10px 14px;
  font-size: 13px;
}
.cabinet-app__logout-alt {
  display: none;
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.cabinet-app__view .btn {
  max-width: 100%;
  box-sizing: border-box;
}

.cabinet-app__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 45% at 12% -8%, rgba(var(--accent-rgb), 0.07), transparent 58%),
    transparent;
}
.cabinet-app__top {
  margin: 18px 20px 0;
  padding: 16px 20px;
  flex-shrink: 0;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, var(--accent) 15%);
  background:
    linear-gradient(165deg, rgba(var(--accent-rgb), 0.07), transparent 48%),
    rgba(var(--surface-rgb), 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 8px 24px rgba(0, 0, 0, 0.08);
}
.cabinet-app__heading {
  margin-top: 6px;
  font-family: var(--font);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cabinet-app__view {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 20px 22px;
  overscroll-behavior: contain;
  animation: cabinet-step-in .35s cubic-bezier(.22,1,.36,1) both;
}
.cabinet-app__view[hidden] { display: none; }

.cabinet-app__lead {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 18px;
  overflow-wrap: break-word;
  word-break: break-word;
}
.cabinet-app__lead strong { color: var(--text); }

.cabinet-app__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.cabinet-app__stat {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--border) 88%, var(--accent) 12%);
  background:
    linear-gradient(165deg, rgba(var(--accent-rgb), 0.05), transparent 50%),
    var(--surface-2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.cabinet-app__stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.cabinet-app__stat-value {
  font-size: clamp(22px, 7vw, 28px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}

.cabinet-app__cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.cabinet-app__card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, var(--accent) 15%);
  background:
    linear-gradient(165deg, rgba(var(--accent-rgb), 0.05), transparent 45%),
    var(--surface-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 8px 24px rgba(0, 0, 0, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.cabinet-app__card:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 28px rgba(0, 0, 0, 0.1);
}
.cabinet-app__card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.cabinet-app__card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.cabinet-app__card-head h3 { margin-bottom: 0; }

.cabinet-app__checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cabinet-app__checklist li {
  position: relative;
  padding-left: 22px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.cabinet-app__checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
}
.cabinet-app__checklist li.is-done {
  color: var(--text);
}
.cabinet-app__checklist li.is-done::before {
  border-color: var(--wa);
  background: rgba(47, 209, 112, 0.2);
  box-shadow: inset 0 0 0 3px var(--surface-2);
}

.cabinet-app__hint,
.cabinet-app__field-note {
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.45;
  margin-bottom: 10px;
}
.cabinet-app__field-note { margin-top: 8px; margin-bottom: 0; }

.cabinet-app__copy {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}
.cabinet-app__copy code {
  flex: 1 1 160px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 12px;
  color: var(--accent-2);
  word-break: break-all;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.cabinet-app__copy-btn {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.cabinet-app__copy-btn:hover { border-color: var(--accent); color: var(--accent); }
.cabinet-app__copy-btn:focus { outline: none; }
.cabinet-app__copy-btn:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.cabinet-app__settings {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
  margin-top: 4px;
}
.cabinet-app__settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cabinet-app__field--full { grid-column: 1 / -1; }

.cabinet-app__saved {
  font-size: 13px;
  color: var(--wa);
  font-weight: 600;
}
.cabinet-app__saved.is-error {
  color: #ff6b7a;
}

.cabinet-app__plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  line-height: 1;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
}
.cabinet-app__plan-badge--pro {
  color: #7ee787;
  background: rgba(126, 231, 135, 0.1);
  border-color: rgba(126, 231, 135, 0.25);
}
.cabinet-app__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(255, 107, 122, 0.12);
  color: #ff8a98;
  white-space: nowrap;
}
.cabinet-app__badge--muted {
  background: var(--accent-soft);
  color: var(--accent);
}

.cabinet-app__steps {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cabinet-app__steps code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
}

.cabinet-app__empty-inline {
  font-size: 14px;
  color: var(--text-faint);
}

.cabinet-app__template-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cabinet-app__template-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cabinet-app__template-group-head h3 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 4px;
}

.cabinet-app__template-group-head p {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 1.45;
}

.cabinet-app__template-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cabinet-app__template-channel {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-faint);
}

.cabinet-app__template-channel--client {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.25);
}

.cabinet-app__template-channel--telegram {
  color: #7ee787;
  background: rgba(126, 231, 135, 0.08);
  border-color: rgba(126, 231, 135, 0.22);
}
.cabinet-app__template {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.cabinet-app__template h3 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 4px;
}
.cabinet-app__template p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

.cabinet-app__template-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.cabinet-app__template-editor-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.cabinet-app__template-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cabinet-app__template-editor-head .cabinet-app__toggle {
  margin-top: 0;
}

.cabinet-app__template-editor h3 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cabinet-app__template-editor p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

.cabinet-app__template-text {
  width: 100%;
  min-height: 110px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
}

.cabinet-app__template-text:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.cabinet-app__template-placeholders {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5;
}

.cabinet-app__template-legend {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.cabinet-app__template-legend-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.cabinet-app__template-legend-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cabinet-app__template-legend-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.4;
}

.cabinet-app__template-legend-list code {
  flex-shrink: 0;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--accent-2);
}

.cabinet-app__template-legend-list span {
  color: var(--text-dim);
}

.cabinet-app__template-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cabinet-app__template-saved {
  margin: 0;
}

.cabinet-app__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  cursor: pointer;
}

.cabinet-app__toggle-input {
  accent-color: var(--accent);
}

/* ============ Plans panel (Trial / Pro) ============ */
#pricing {
  scroll-margin-top: 88px;
}

.plans-panel {
  margin-bottom: 20px;
}

.plans-panel--landing {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.plans-panel__frame {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--border) 85%, var(--accent) 15%);
  background:
    linear-gradient(165deg, rgba(var(--accent-rgb), 0.06), transparent 42%),
    var(--surface-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 30px rgba(0, 0, 0, 0.12);
  position: relative;
  isolation: isolate;
}

.plans-panel__highlight {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 0;
  border-radius: 16px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translateY(0);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  background:
    linear-gradient(155deg, rgba(var(--accent-rgb), 0.12), transparent 58%),
    rgba(var(--surface-rgb), 0.35);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent),
    0 14px 34px rgba(0, 0, 0, 0.16),
    0 0 28px rgba(var(--accent-rgb), 0.14);
  transition:
    transform 0.52s cubic-bezier(0.16, 1, 0.3, 1),
    height 0.52s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.32s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease,
    background 0.45s ease;
}

.plans-panel__frame.is-highlight-ready .plans-panel__highlight {
  opacity: 1;
}

.plans-panel__frame.is-highlight-pro .plans-panel__highlight {
  border-color: color-mix(in srgb, #7ee787 52%, var(--border));
  background:
    linear-gradient(155deg, rgba(126, 231, 135, 0.14), transparent 58%),
    rgba(var(--surface-rgb), 0.35);
  box-shadow:
    0 0 0 1px color-mix(in srgb, #7ee787 26%, transparent),
    0 14px 34px rgba(0, 0, 0, 0.16),
    0 0 28px rgba(126, 231, 135, 0.12);
}

.plans-panel__frame.is-highlight-max .plans-panel__highlight {
  border-color: color-mix(in srgb, var(--max) 52%, var(--border));
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--max) 14%, transparent), transparent 58%),
    rgba(var(--surface-rgb), 0.35);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--max) 26%, transparent),
    0 14px 34px rgba(0, 0, 0, 0.16),
    0 0 28px color-mix(in srgb, var(--max) 12%, transparent);
}

/* ---- Billing period toggle (Помесячно / Год) ---- */
.plans-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.plans-toggle {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.plans-toggle button {
  position: relative;
  z-index: 1;
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.plans-toggle button em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  color: #7ee787;
}
.plans-toggle button.is-active { color: #06101f; }
.plans-toggle button.is-active em { color: #06101f; opacity: 0.75; }
.plans-toggle__thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.plans-toggle[data-period="annual"] .plans-toggle__thumb {
  transform: translateX(100%);
}

.plan-card {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(var(--surface-rgb), 0.45);
  position: relative;
  z-index: 1;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.plan-card--max { border-color: color-mix(in srgb, var(--max) 30%, var(--border)); }

.plan-card.is-preview {
  transform: translateY(-2px);
}

.plan-card.is-active {
  border-color: transparent;
  background: rgba(var(--surface-rgb), 0.2);
  box-shadow: none;
}

.plans-panel__frame .plan-card.is-active + .plan-card,
.plans-panel__frame .plan-card + .plan-card.is-active {
  border-top-color: var(--border);
}

.plan-card--pro.is-active {
  border-color: transparent;
  background: rgba(var(--surface-rgb), 0.2);
  box-shadow: none;
}

.plans-panel__frame .plan-card + .plan-card {
  border-top: none;
  margin-top: 0;
  border-radius: 16px;
  padding-top: 16px;
}

.plan-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.plan-card__head h3 {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.plan-card__name {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  line-height: 1;
}

.plan-card__name--trial {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
}

.plan-card__name--pro {
  color: #7ee787;
  background: rgba(126, 231, 135, 0.1);
  border: 1px solid rgba(126, 231, 135, 0.28);
}

.plan-card__name--max {
  color: var(--max);
  background: color-mix(in srgb, var(--max) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--max) 30%, transparent);
}

.plan-card__status {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  line-height: 1;
}

.plan-card__status--active {
  color: #7ee787;
  background: rgba(126, 231, 135, 0.1);
  border: 1px solid rgba(126, 231, 135, 0.28);
}

.plan-card__status--inactive {
  color: var(--text-faint);
  background: var(--surface);
  border: 1px solid var(--border);
}

.plan-card__badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px solid var(--border);
}

.plan-card__badge--pro {
  color: #7ee787;
  background: rgba(126, 231, 135, 0.08);
  border-color: rgba(126, 231, 135, 0.22);
}

.plan-card__badge--max {
  color: var(--max);
  background: color-mix(in srgb, var(--max) 10%, transparent);
  border-color: color-mix(in srgb, var(--max) 24%, transparent);
}

.plan-card__badge--active,
.plan-card.is-active .plan-card__badge {
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.3);
}

.plan-card--pro.is-active .plan-card__badge {
  color: #7ee787;
  background: rgba(126, 231, 135, 0.1);
  border-color: rgba(126, 231, 135, 0.28);
}

.plan-card__price {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 10px;
  line-height: 1.4;
}

.plan-card__price strong {
  color: var(--text);
  font-size: 18px;
  font-family: var(--font-display);
}

.plan-card__note {
  font-size: 12.5px;
  color: var(--accent);
  margin: -4px 0 10px;
  line-height: 1.4;
}

.plan-card__features {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-card__features li {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.45;
}

.plan-card__cta {
  width: 100%;
  max-width: 100%;
  margin-top: 14px;
  justify-content: center;
  box-sizing: border-box;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}

.plan-card--pro.is-preview .plan-card__cta,
.plan-card--pro:hover .plan-card__cta {
  transform: translateY(-1px) scale(1.015);
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .plans-panel__highlight,
  .plan-card,
  .plan-card__cta {
    transition: none !important;
  }

  .plan-card.is-preview {
    transform: none;
  }
}

.plans-panel--compact .plan-card {
  padding: 14px 16px;
}

.plans-panel--compact .plan-card__features li {
  font-size: 13px;
}

.plans-panel--cabinet {
  margin-bottom: 16px;
}

/* ============ Cabinet calendar ============ */
.cabinet-calendar {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 16px;
  align-items: start;
}

.cabinet-calendar__main,
.cabinet-calendar__side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.cabinet-calendar__main {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.cabinet-calendar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cabinet-calendar__month {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cabinet-calendar__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.cabinet-calendar__nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.cabinet-calendar__nav-btn:focus { outline: none; }
.cabinet-calendar__nav-btn:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.cabinet-calendar__nav-btn:active {
  transform: scale(0.94);
}

.cabinet-calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-align: center;
}

.cabinet-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cabinet-calendar__cell {
  position: relative;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.cabinet-calendar__cell--empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
  min-height: 42px;
}
.cabinet-calendar__cell:hover:not(.cabinet-calendar__cell--empty) {
  border-color: var(--border);
}
.cabinet-calendar__cell.is-today {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.cabinet-calendar__cell.is-selected {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  border-color: var(--accent);
  color: var(--text);
}
.cabinet-calendar__cell.has-events .cabinet-calendar__day-num {
  font-weight: 800;
}
.cabinet-calendar__dot {
  position: absolute;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.cabinet-calendar__day-panel,
.cabinet-calendar__form {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.cabinet-calendar__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cabinet-calendar__form .cabinet__field {
  min-width: 0;
}

.cabinet-calendar__form .btn {
  width: 100%;
  max-width: 100%;
  justify-content: center;
  box-sizing: border-box;
  margin-top: 2px;
}

.cabinet-calendar__day-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}

.cabinet-calendar__day-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.cabinet-calendar__event {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.cabinet-calendar__event-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}
.cabinet-calendar__event-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.cabinet-calendar__event-body strong {
  font-size: 13.5px;
  color: var(--text);
}

.cabinet-calendar__form h3 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cabinet-calendar__form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.cabinet-calendar__form-row .cabinet__field {
  min-width: 0;
}

.cabinet-calendar__form-row input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .cabinet__backdrop {
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
  .cabinet { padding: 0; align-items: flex-end; }
  body.cabinet-open { overflow: hidden; }
  .cabinet__panel {
    padding: 0;
    border-radius: 20px 20px 0 0;
    max-height: 96dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .cabinet__panel--wide {
    /* Личный кабинет (dashboard) занимает весь экран на мобильных —
       не урезанный лист снизу, а полноценное приложение на весь вьюпорт. */
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .cabinet__panel--wide .cabinet-app {
    border-radius: inherit;
  }
  .cabinet__close { top: 12px; right: 12px; }
  .cabinet__panel--wide .cabinet__close {
    top: max(12px, env(safe-area-inset-top));
  }
  .cabinet__booking {
    flex-direction: column;
    align-items: stretch;
  }
  .cabinet__booking-meta {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }
  .cabinet__confirm,
  .cabinet__cancel {
    flex: 1 1 auto;
    min-width: 120px;
    text-align: center;
  }

  .cabinet-app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 0;
    height: 100%;
  }
  .cabinet__step--app {
    min-height: 0;
    height: auto;
    flex: 1;
    max-height: 100dvh;
  }
  .cabinet-app__sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 10px 8px;
    gap: 8px;
    flex-shrink: 0;
    /* Without min-width:0 this flex item's automatic minimum size is its
       content's min-content — the horizontally-scrolling nav row below
       refuses to shrink and inflates the whole dashboard body width,
       pushing cards (e.g. the Pro plan card) off the right edge. */
    min-width: 0;
  }
  .cabinet-app__brand { padding: 0 4px 2px; }
  .cabinet-app__brand-text strong { max-width: none; }
  .cabinet-app__nav {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 0 0 auto;
    min-width: 0;
  }
  .cabinet-app__nav::-webkit-scrollbar { display: none; }
  .cabinet-app__nav-btn {
    flex: 0 0 auto;
    padding: 8px 10px;
    font-size: 12px;
    white-space: nowrap;
    gap: 6px;
    min-height: 44px;
  }
  .cabinet-app__nav-btn svg {
    width: 16px;
    height: 16px;
  }
  .cabinet-app__sidebar-foot { display: none; }
  .cabinet-app__logout-alt { display: inline-flex; }
  .cabinet-app__top {
    margin: 12px 14px 0;
    padding: 14px 16px;
    border-radius: 16px;
  }
  .cabinet-app__view { padding: 10px 14px 16px; }
  .cabinet-app__stats { grid-template-columns: 1fr; }
  .cabinet-app__cards { grid-template-columns: 1fr; }
  .cabinet-app__settings-grid { grid-template-columns: 1fr; }
  .cabinet-app__settings { max-width: none; }
  .cabinet-app__template { flex-direction: column; align-items: flex-start; }
  .cabinet-app__template-editor-head { flex-direction: column; }
  .cabinet-app__template-editor-meta {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }
  .cabinet-app__copy-btn { width: 100%; }
  .cabinet-calendar { grid-template-columns: 1fr; }
  .cabinet-calendar__form-row { grid-template-columns: 1fr; }
  .plans-panel__frame { padding: 4px; border-radius: 16px; }
  .plan-card { padding: 12px 14px; }
  .plans-panel__frame .plan-card + .plan-card { padding-top: 12px; }
  .plan-card__head { flex-wrap: wrap; row-gap: 6px; }
  .plan-card__cta { margin-top: 12px; }
  .cabinet__title { font-size: 22px; padding-right: 40px; }
  .cabinet__panel:not(.cabinet__panel--wide) {
    padding: 26px 18px max(20px, env(safe-area-inset-bottom));
    max-height: 92dvh;
  }
  .cabinet__panel--wide {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .cabinet-app__view {
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
  .footer__bottom span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .footer__bottom {
    align-items: flex-start;
  }
}
