/* === Автозагрузка на Авито — Eclipse, новый контент и адаптив === */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0612;
  --bg-card: rgba(22, 15, 35, 0.7);
  --bg-card-solid: #16102a;
  --border: rgba(167, 139, 250, 0.2);
  --text: #f5f3ff;
  --text-muted: #a5a1b8;
  --accent-purple: #a78bfa;
  --accent-pink: #e879f9;
  --accent-blue: #38bdf8;
  --gradient: linear-gradient(135deg, #a78bfa 0%, #e879f9 100%);
  --gradient-blue: linear-gradient(135deg, #38bdf8 0%, #a78bfa 100%);
  --glow: 0 0 40px rgba(167, 139, 250, 0.25);
  --glow-strong: 0 0 60px rgba(232, 121, 249, 0.3);
  --radius: 12px;
  --radius-lg: 20px;

  /* Адаптивные отступы и ширина контейнера */
  --container-padding: clamp(1rem, 4vw, 2rem);
  --section-padding-y: clamp(2.5rem, 6vw, 5rem);
  --gap-sm: clamp(0.75rem, 2vw, 1rem);
  --gap-md: clamp(1rem, 3vw, 1.5rem);
  --gap-lg: clamp(1.5rem, 4vw, 2.5rem);
  --gap-xl: clamp(2rem, 5vw, 3.5rem);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(167, 139, 250, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 50%, rgba(232, 121, 249, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 10% 80%, rgba(56, 189, 248, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(167, 139, 250, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(167, 139, 250, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Контейнер */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--gap-md) var(--container-padding);
  background: rgba(10, 6, 18, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
}

.logo {
  font-weight: 700;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 20px rgba(232, 121, 249, 0.5);
  flex-shrink: 0;
}

.logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  align-items: center;
  justify-content: center;
}

.nav-toggle::before,
.nav-toggle::after {
  content: '';
  position: absolute;
  left: 50%;
  margin-left: -10px;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s;
}

.nav-toggle::before {
  top: 13px;
  box-shadow: 0 7px 0 var(--text);
}

.nav-toggle::after {
  bottom: 13px;
}

.nav-toggle[aria-expanded="true"]::before {
  top: 21px;
  margin-left: -10px;
  box-shadow: none;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"]::after {
  bottom: 21px;
  transform: rotate(-45deg);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: clamp(0.875rem, 1.5vw, 0.95rem);
  transition: color 0.2s;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--accent-pink);
}

.nav a.btn-primary {
  color: #0a0612;
}

.nav a.btn-primary:hover {
  color: #0a0612;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem clamp(1rem, 2vw, 1.35rem);
  font-family: inherit;
  font-weight: 600;
  font-size: clamp(0.85rem, 1.5vw, 0.9rem);
  border-radius: var(--radius);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
  border: none;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-pink);
  border-color: rgba(232, 121, 249, 0.4);
}

.btn-primary {
  background: var(--gradient);
  color: #0a0612;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.35);
}

.btn-primary:hover {
  box-shadow: var(--glow-strong);
  transform: translateY(-2px);
}

main {
  position: relative;
  z-index: 1;
  padding-top: clamp(60px, 10vw, 72px);
}

/* Секция заголовок */
.section-head {
  text-align: center;
  margin-bottom: var(--gap-xl);
}

.section-head h2 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--gap-sm);
}

.section-head p {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.section-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-purple);
  margin-bottom: 0.5rem;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon-box {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.14) 0%, rgba(232, 121, 249, 0.1) 100%);
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.land-svg {
  width: 28px;
  height: 28px;
  display: block;
}

.land-svg-sm {
  width: 26px;
  height: 26px;
}

.land-svg-pipeline {
  width: 100%;
  max-width: 200px;
  height: auto;
}

/* Hero */
.hero {
  padding: var(--section-padding-y) var(--container-padding);
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: var(--gap-xl);
  align-items: center;
  min-height: min(85vh, 700px);
}

.hero-content .hero-tagline {
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-pink);
  margin-bottom: var(--gap-sm);
}

.hero-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--gap-md);
  letter-spacing: -0.03em;
}

.hero-content h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p,
.hero-lead {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: var(--text-muted);
  margin-bottom: var(--gap-md);
  max-width: 32em;
  line-height: 1.65;
}

.hero-bullets {
  list-style: none;
  margin: 0 0 var(--gap-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-width: 28em;
}

.hero-bullets li {
  position: relative;
  padding-left: 1.25rem;
  font-size: clamp(0.875rem, 1.4vw, 0.95rem);
  color: var(--text);
}

.hero-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 8px rgba(232, 121, 249, 0.5);
}

.hero-pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.85rem;
  margin: 0 0 1.15rem;
  padding: 0.65rem 1rem;
  max-width: 36rem;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.1);
  box-shadow: inset 0 0 0 1px rgba(232, 121, 249, 0.08);
}

.hero-pricing-amount {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-pricing-text {
  font-size: clamp(0.88rem, 1.4vw, 0.95rem);
  color: var(--text-muted);
  line-height: 1.45;
}

.hero-cta {
  display: flex;
  gap: var(--gap-sm);
  flex-wrap: wrap;
  align-items: center;
}

.hero-mockup {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-mockup .mockup-screen {
  width: 100%;
  max-width: min(320px, 90vw);
  aspect-ratio: 9 / 16;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: clamp(20px, 5vw, 28px);
  padding: clamp(8px, 2vw, 12px);
  box-shadow: var(--glow), 0 25px 50px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.hero-mockup .mockup-screen-wide {
  max-width: min(400px, 92vw);
  aspect-ratio: 4 / 3;
}

.mockup-inner-dashboard {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0.75rem 1rem 1rem;
  gap: 0.75rem;
}

.mockup-dash-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.mockup-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(167, 139, 250, 0.5);
}

.mockup-dash-title {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mockup-dash-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  width: 100%;
}

.mockup-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.mockup-metric {
  background: rgba(10, 6, 18, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.35rem;
  text-align: center;
}

.mockup-metric-val {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mockup-metric-lbl {
  display: block;
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.hero-mockup .mockup-screen::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
}

.mockup-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(22, 15, 35, 0.95) 0%, rgba(10, 6, 18, 0.98) 100%);
  border-radius: clamp(14px, 3vw, 18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2rem);
  gap: var(--gap-md);
}

.mockup-inner-chart {
  position: relative;
  justify-content: flex-end;
  padding-bottom: clamp(1rem, 3vw, 1.5rem);
  padding-top: clamp(0.75rem, 2vw, 1rem);
}

.mockup-chart-title {
  font-size: clamp(0.7rem, 1.8vw, 0.8rem);
  font-weight: 600;
  color: var(--accent-pink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: absolute;
  top: clamp(0.75rem, 2vw, 1rem);
  left: 50%;
  transform: translateX(-50%);
}

.mockup-chart {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  padding: 0 2px;
}

.mockup-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  width: 100%;
  height: 100%;
  max-height: 85%;
}

.mockup-bar {
  flex: 1;
  height: var(--h, 50%);
  min-height: 4px;
  background: linear-gradient(180deg, var(--accent-pink) 0%, var(--accent-purple) 100%);
  border-radius: 4px 4px 0 0;
  box-shadow: 0 0 12px rgba(232, 121, 249, 0.4);
  animation: mockup-bar-grow 1.2s ease-out backwards;
}

.mockup-bar:nth-child(1) { animation-delay: 0.1s; }
.mockup-bar:nth-child(2) { animation-delay: 0.2s; }
.mockup-bar:nth-child(3) { animation-delay: 0.3s; }
.mockup-bar:nth-child(4) { animation-delay: 0.4s; }
.mockup-bar:nth-child(5) { animation-delay: 0.5s; }
.mockup-bar:nth-child(6) { animation-delay: 0.6s; }

@keyframes mockup-bar-grow {
  from {
    height: 0;
    opacity: 0.6;
  }
  to {
    height: var(--h, 50%);
    opacity: 1;
  }
}

.mockup-inner .mockup-title {
  font-size: clamp(0.8rem, 2vw, 0.9rem);
  font-weight: 600;
  color: var(--text-muted);
}

.mockup-inner .mockup-btn {
  width: 100%;
  max-width: 180px;
  padding: 0.55rem 1rem;
  background: var(--gradient);
  border-radius: var(--radius);
  font-size: clamp(0.8rem, 1.5vw, 0.85rem);
  font-weight: 600;
  text-align: center;
  color: #fff;
  text-decoration: none;
  display: block;
}

.mockup-inner .mockup-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.hero-mockup .glow-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.hero-mockup .glow-circle-1 {
  width: min(250px, 60vw);
  height: min(250px, 60vw);
  background: var(--accent-purple);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-mockup .glow-circle-2 {
  width: min(160px, 40vw);
  height: min(160px, 40vw);
  background: var(--accent-pink);
  top: 25%;
  right: -10%;
}

/* How */
.how {
  padding: var(--section-padding-y) var(--container-padding);
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.how-steps {
  display: grid;
  gap: var(--gap-lg);
  grid-template-columns: 1fr;
}

.how-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.how-step:hover {
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: var(--glow);
}

.how-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--gap-md);
}

.how-step-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(10, 6, 18, 0.5);
}

.how-step h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--gap-sm);
}

.how-step p {
  font-size: clamp(0.9rem, 1.5vw, 0.95rem);
  color: var(--text-muted);
  line-height: 1.55;
}

/* Features */
.features {
  padding: var(--section-padding-y) var(--container-padding);
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-md);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  backdrop-filter: blur(8px);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.feature-card:hover {
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: var(--glow);
  transform: translateY(-3px);
}

.feature-card .icon {
  margin-bottom: var(--gap-md);
}

.feature-card h3 {
  font-size: clamp(1rem, 1.8vw, 1.05rem);
  font-weight: 600;
  margin-bottom: var(--gap-sm);
}

.feature-card p {
  font-size: clamp(0.875rem, 1.4vw, 0.9rem);
  color: var(--text-muted);
  line-height: 1.55;
}

/* Stats */
.stats {
  padding: var(--section-padding-y) var(--container-padding);
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.stats-head {
  margin-bottom: var(--gap-lg);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-md);
  margin-bottom: var(--gap-xl);
}

.stats-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  text-align: center;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.stats-card:hover {
  border-color: rgba(167, 139, 250, 0.3);
  box-shadow: var(--glow);
}

.stats-card-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto var(--gap-sm);
}

.stats-card strong {
  display: block;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 700;
  margin-bottom: var(--gap-sm);
  color: var(--text);
}

.stats-card span {
  font-size: clamp(0.85rem, 1.4vw, 0.9rem);
  color: var(--text-muted);
}

.stats-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.stats-visual .laptop-ring {
  width: min(196px, 48vw);
  height: min(196px, 48vw);
  max-width: 196px;
  max-height: 196px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-card-solid), var(--bg-card-solid)) padding-box,
              var(--gradient-blue) border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 50px rgba(56, 189, 248, 0.25);
  overflow: hidden;
  padding: 14%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.laptop-ring-inner {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.land-svg-pipeline-circle {
  width: 100%;
  height: 100%;
  display: block;
}

/* CTA */
.cta {
  padding: var(--section-padding-y) var(--container-padding);
  text-align: center;
  border-top: 1px solid var(--border);
}

.cta h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  margin-bottom: var(--gap-sm);
}

.cta p {
  color: var(--text-muted);
  margin-bottom: var(--gap-lg);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.cta-pricing-note {
  margin-top: -0.35rem;
  margin-bottom: var(--gap-md) !important;
  font-size: clamp(0.88rem, 1.4vw, 0.95rem) !important;
}

.cta-pricing-note strong {
  color: #e9d5ff;
  font-weight: 600;
}

/* Footer */
.footer {
  padding: var(--gap-lg) var(--container-padding);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: clamp(0.8rem, 1.3vw, 0.88rem);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap-sm);
  margin-bottom: var(--gap-md);
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: clamp(0.85rem, 1.3vw, 0.9rem);
}

.footer-links a:hover {
  color: var(--accent-pink);
}

.footer-copy {
  margin: 0;
}

/* Auth */
.auth-page main {
  padding: var(--container-padding);
}

.auth-box {
  width: 100%;
  max-width: min(420px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  backdrop-filter: blur(12px);
  box-shadow: var(--glow);
}

.auth-box h1 {
  font-size: clamp(1.3rem, 2.5vw, 1.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.4rem;
}

.auth-box h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-box .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: clamp(0.85rem, 1.3vw, 0.9rem);
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}

.form-group {
  margin-bottom: clamp(1rem, 2vw, 1.2rem);
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  font-size: clamp(0.85rem, 1.3vw, 0.9rem);
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: clamp(0.65rem, 1.5vw, 0.75rem) 1rem;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
  color: var(--accent-purple);
  background: rgba(167, 139, 250, 0.12);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(167, 139, 250, 0.55);
  outline-offset: 2px;
}

.auth-box .btn-primary {
  width: 100%;
  padding: clamp(0.75rem, 1.5vw, 0.85rem);
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.auth-link-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-align: center;
}

.auth-box .link-row {
  text-align: center;
  margin: 0;
  font-size: clamp(0.85rem, 1.3vw, 0.9rem);
  color: var(--text-muted);
}

.auth-box .link-row a {
  color: var(--accent-pink);
  text-decoration: none;
  font-weight: 600;
}

.auth-box .link-row a:hover {
  text-decoration: underline;
}

.auth-divider {
  height: 1px;
  background: var(--border);
  margin: clamp(1rem, 2vw, 1.5rem) 0;
}

/* ========== Адаптив: планшет ========== */
@media (min-width: 560px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 3.5rem);
  }

  .how-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: var(--gap-xl);
  }

  .stats {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: var(--gap-xl);
  }

  .stats-head {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .stats-grid {
    margin-bottom: 0;
  }

  .stats-visual {
    order: 2;
    align-self: center;
    justify-self: center;
  }
}

/* ========== Адаптив: десктоп ========== */
@media (min-width: 900px) {
  .hero-content p {
    max-width: 28em;
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-lg);
  }

  .stats {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    align-items: start;
  }

  .stats-head {
    grid-column: 2;
    grid-row: 1;
    text-align: left;
  }

  .stats-grid {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-visual {
    grid-row: 1 / 3;
    grid-column: 1;
    order: 0;
  }
}

/* ========== Адаптив: мобильное меню ========== */
@media (max-width: 559px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 6, 18, 0.98);
    border-bottom: 1px solid var(--border);
    padding: var(--gap-md) var(--container-padding);
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-bullets {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    max-width: 18rem;
  }

  .hero-mockup {
    order: -1;
    max-width: 280px;
    margin: 0 auto;
  }

  .stats-visual {
    margin: var(--gap-md) auto 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 560px) {
  .nav-toggle {
    display: none;
  }

  .nav {
    display: flex;
  }
}

/* ========== Auth layout ========== */
.auth-page main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
}

.auth-page .footer {
  text-align: center;
}

/* ========== Личный кабинет ========== */
.cabinet-page {
  --cabinet-surface: rgba(38, 32, 58, 0.82);
  --cabinet-surface-solid: #2a2440;
  --cabinet-table-head: rgba(52, 44, 78, 0.65);
  --cabinet-sidebar-w: 15.5rem;
}

.cabinet-page .header {
  display: none;
}

.cabinet-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.cabinet-sidebar {
  width: var(--cabinet-sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 0.85rem;
  background: rgba(22, 18, 36, 0.96);
  border-right: 1px solid rgba(167, 139, 250, 0.22);
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: 100vh;
  z-index: 120;
}

.cabinet-sidebar-brand {
  padding: 0 0.45rem 0.85rem;
  border-bottom: 1px solid rgba(167, 139, 250, 0.15);
  margin-bottom: 0.35rem;
}

.cabinet-sidebar-brand .logo {
  font-size: 1rem;
  display: inline-block;
  margin-bottom: 0.35rem;
}

.cabinet-sidebar-user {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  word-break: break-word;
}

.cabinet-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.cabinet-sidebar-foot {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(167, 139, 250, 0.15);
}

.cabinet-nav-item {
  display: block;
  padding: 0.62rem 0.75rem;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.cabinet-nav-item:hover {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.2);
}

.cabinet-nav-item.is-active {
  background: rgba(167, 139, 250, 0.2);
  border-color: rgba(232, 121, 249, 0.45);
  color: #f3ecff;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.12);
}

.cabinet-nav-item-sub {
  margin-left: 0.35rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.cabinet-nav-item-muted {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.cabinet-nav-logout {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.25);
  background: rgba(248, 113, 113, 0.08);
}

.cabinet-nav-logout:hover {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.4);
}

.cabinet-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(251, 191, 36, 0.25);
  color: #fde68a;
  margin-left: 0.25rem;
}

.cabinet-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.cabinet-mobile-bar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem var(--container-padding);
  border-bottom: 1px solid rgba(167, 139, 250, 0.18);
  background: rgba(22, 18, 36, 0.92);
  position: sticky;
  top: 0;
  z-index: 110;
}

.cabinet-mobile-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.cabinet-nav-toggle {
  flex-shrink: 0;
}

.cabinet-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 115;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

.cabinet-main-inner {
  flex: 1;
  padding: clamp(1rem, 2.5vw, 1.75rem) var(--container-padding);
  padding-bottom: var(--section-padding-y);
}

.cabinet-footer {
  margin-top: auto;
}

.cabinet-wrap {
  max-width: min(1400px, 100%);
  margin: 0;
  width: 100%;
}

@media (max-width: 900px) {
  .cabinet-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.35);
  }

  .cabinet-sidebar.is-open {
    transform: translateX(0);
  }

  .cabinet-sidebar-backdrop:not([hidden]) {
    display: block;
  }

  .cabinet-mobile-bar {
    display: flex;
  }

  .cabinet-main-inner {
    padding-top: 0.5rem;
  }
}

.cabinet-head {
  margin-bottom: var(--gap-lg);
}

.cabinet-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.cabinet-head-row h1 {
  margin-bottom: 0.25rem;
}

.cabinet-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.cabinet-head-balance {
  font-size: 0.92rem;
  color: #e8dff8;
}

.cabinet-head-balance strong {
  color: #fff;
}

.cabinet-sidebar-balance {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #c4b5fd;
}

.cabinet-sidebar-balance strong {
  color: #f3ecff;
}

.cabinet-sidebar-balance-muted {
  color: rgba(196, 181, 253, 0.65);
}

.cell-paid-until {
  font-size: 0.82rem;
  line-height: 1.35;
  min-width: 6.5rem;
}

.paid-until-date {
  display: block;
  font-weight: 500;
}

.paid-until-ok {
  color: #bbf7d0;
}

.paid-until-warn {
  color: #fde68a;
}

.paid-until-danger {
  color: #fca5a5;
}

.paid-until-muted {
  color: rgba(255, 255, 255, 0.45);
}

.paid-until-note {
  display: block;
  font-size: 0.72rem;
  margin-top: 0.15rem;
}

.admin-balance-cell {
  white-space: nowrap;
}

.admin-balance-open {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #c4b5fd;
  text-align: left;
  font: inherit;
  border-bottom: 1px dashed rgba(196, 181, 253, 0.45);
}

.admin-balance-open:hover {
  color: #f3ecff;
  border-bottom-color: rgba(244, 114, 182, 0.7);
}

.admin-balance-open strong {
  color: inherit;
}

.admin-balance-tg-hint {
  display: block;
  font-size: 0.72rem;
  margin-top: 0.2rem;
}

.admin-balance-modal-box {
  max-width: 22rem;
}

.admin-users-table .cell-actions-compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: 6.5rem;
}

.admin-users-table .cell-actions-compact form {
  width: 100%;
}

.admin-users-table .cell-actions-compact .btn-table-action {
  width: 100%;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  font-size: 0.78rem;
}

.cabinet-head h1 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.cabinet-head h1 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cabinet-head p {
  color: var(--text-muted);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.flash-stack {
  margin-bottom: var(--gap-md);
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}

.flash-success {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}

.flash-error {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.cabinet-panel {
  background: var(--cabinet-surface);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  backdrop-filter: blur(8px);
  margin-bottom: var(--gap-lg);
}

.cabinet-panel-actions .btn-primary {
  box-shadow: 0 0 20px rgba(167, 139, 250, 0.25);
}

.cabinet-panel h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--gap-md);
}

.form-grid {
  display: grid;
  gap: var(--gap-sm);
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .form-grid.cols-add-table {
    grid-template-columns: 1.2fr 1.5fr 1.5fr auto;
    align-items: end;
  }

  .form-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group textarea {
  width: 100%;
  padding: clamp(0.65rem, 1.5vw, 0.75rem) 1rem;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 100px;
}

.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.btn-warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  color: #0a0612;
  font-weight: 700;
}

.btn-danger {
  background: rgba(248, 113, 113, 0.2);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--accent-purple);
  border: 1px solid rgba(167, 139, 250, 0.45);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: var(--radius-lg);
  background: var(--cabinet-surface);
}

.cabinet-table-wrap {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  position: relative;
}

.table-create-progress-row td,
.table-delete-progress-row td {
  background: rgba(167, 139, 250, 0.14) !important;
  border-bottom: 1px solid rgba(167, 139, 250, 0.4) !important;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.15);
}

.table-create-progress-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0.15rem;
  font-size: 0.88rem;
  color: #f3ecff;
}

.table-create-progress-inner .category-spinner {
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.photo-progress-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 11rem;
}

.photo-progress-inline .category-spinner {
  flex-shrink: 0;
}

.photo-run-msg {
  font-size: 0.78rem;
  line-height: 1.25;
}

#table-create-progress-text,
.table-row-progress-text {
  white-space: pre-line;
  line-height: 1.4;
}

.cabinet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(0.75rem, 1.3vw, 0.875rem);
}

.cabinet-table th,
.cabinet-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

.cabinet-table th {
  color: var(--text-muted);
  font-weight: 600;
  background: var(--cabinet-table-head);
  white-space: nowrap;
}

.cabinet-table tbody tr.table-main-row:hover td {
  background: rgba(167, 139, 250, 0.06);
}

.cabinet-table tr:last-child td {
  border-bottom: none;
}

.cabinet-table a {
  color: var(--accent-blue);
  text-decoration: none;
}

.cabinet-table a:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(52, 211, 153, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.badge-muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-warn {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.auth-box-wide {
  max-width: 28rem;
}

.auth-pending-lead {
  text-align: center;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.auth-pending-text {
  text-align: center;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}

.auth-pending-text a {
  color: var(--accent-pink);
  font-weight: 600;
  word-break: break-all;
}

.admin-user-pending td {
  background: rgba(251, 191, 36, 0.06);
}

.admin-user-dup-ip td:nth-child(5) {
  color: #fca5a5;
}

.admin-user-secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: #e9d5ff;
  word-break: break-all;
}

.admin-dup-badge {
  margin-left: 0.35rem;
  vertical-align: middle;
}

.admin-users-table code {
  background: transparent;
}

.admin-users-table td {
  vertical-align: middle;
}

.admin-users-table .cell-actions {
  min-width: 0;
}

.cabinet-table .table-cell-muted {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.cell-muted {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.35rem;
}

td.cell-muted,
th.cell-muted {
  display: table-cell;
  margin-top: 0;
  vertical-align: middle;
}

.cell-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cell-actions form {
  margin: 0;
}

.btn-table-action {
  display: block;
  width: 100%;
  padding: 0.4rem 0.65rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  border: 1px solid rgba(167, 139, 250, 0.38);
  background: rgba(167, 139, 250, 0.16);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.btn-table-action:hover {
  border-color: rgba(232, 121, 249, 0.55);
  background: rgba(232, 121, 249, 0.16);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.2);
}

.btn-table-action-danger {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.btn-table-action-danger:hover {
  border-color: rgba(248, 113, 113, 0.65);
  background: rgba(248, 113, 113, 0.22);
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.15);
}

.badge-danger-soft {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.stat-cell-inner {
  align-items: center;
  gap: 0.35rem;
}

.stat-running {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
}

.stat-progress-ring {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.stat-progress-ring svg {
  display: block;
}

.stat-ring-bg {
  stroke: rgba(148, 163, 184, 0.25);
}

.stat-ring-fg {
  stroke: #e879f9;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s ease;
}

.stat-ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: #f5d0fe;
  pointer-events: none;
}

.stat-ring-msg {
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.25;
  max-width: 9rem;
}

.stats-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.stats-mini-grid input {
  width: 100%;
  padding: 0.4rem 0.5rem;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.8rem;
}

.stats-mini-grid input:focus {
  outline: none;
  border-color: var(--accent-purple);
}

.nav .nav-user {
  color: var(--accent-purple);
  font-size: 0.85rem;
}

.nav .nav-active {
  color: var(--accent-pink);
}

/* Telegram + modal (ЛК) */
.telegram-panel-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gap-md);
}

.telegram-panel-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 3, 12, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--container-padding);
}

.modal-overlay[hidden] {
  display: none !important;
}

[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

.cabinet-dialog-overlay {
  z-index: 300;
}

.cabinet-dialog-box {
  max-width: min(420px, 92vw);
}

.cabinet-dialog-box h2 {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.cabinet-dialog-message {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: pre-line;
}

.cabinet-dialog-actions {
  justify-content: flex-end;
}

.btn-danger-dialog {
  background: rgba(248, 113, 113, 0.25);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.55);
  font-weight: 600;
}

.btn-danger-dialog:hover {
  background: rgba(248, 113, 113, 0.4);
  color: #fff;
}

.modal-box {
  width: 100%;
  max-width: min(420px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 1.75rem);
  box-shadow: var(--glow);
}

.modal-box h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.modal-box h2 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.modal-box-wide {
  max-width: min(560px, 94vw);
}

.category-modal-box {
  position: relative;
}

/* Полные названия категорий — без gradient-clip (иначе в Chrome видны «обломки» вроде «ян», «чо») */
.category-modal-box .category-row-btn,
.category-modal-box .category-row-label,
.category-modal-box .category-row-hint,
.category-modal-box .category-row-badge,
.category-modal-box .category-breadcrumb,
.category-modal-box .category-modal-meta {
  color: #f3ecff !important;
  -webkit-text-fill-color: #f3ecff !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
}

.category-modal-box .category-row-badge {
  color: #bbf7d0 !important;
  -webkit-text-fill-color: #bbf7d0 !important;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.12) !important;
}

.category-modal-box .modal-box h2 span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.modal-header-row h2 {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.modal-close-btn {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.modal-close-btn:hover {
  background: rgba(167, 139, 250, 0.15);
  border-color: rgba(232, 121, 249, 0.5);
  color: var(--accent-pink);
}

.category-create-form {
  display: none !important;
}

.category-error {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
}

.category-loading-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.category-spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(167, 139, 250, 0.25);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: category-spin 0.75s linear infinite;
  flex-shrink: 0;
}

@keyframes category-spin {
  to {
    transform: rotate(360deg);
  }
}

body.modal-open .footer {
  visibility: hidden;
}

.category-breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.category-modal-meta {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.category-back-btn {
  margin: 0 0 0.65rem;
}

.category-accordion-root {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 0.75rem;
  padding-right: 0.15rem;
}

.category-row-btn {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  min-height: 2.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.category-row-btn:hover {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.1);
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.12);
}

.category-row-hint {
  flex-shrink: 0;
  color: var(--accent-purple);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.category-row-label {
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  text-align: left;
  line-height: 1.35;
  font-weight: 500;
}

.category-accordion-root[aria-busy="true"] {
  min-height: 3rem;
  opacity: 0.45;
  pointer-events: none;
}

.category-empty {
  margin: 0.5rem 0;
  font-size: 0.85rem;
}

.category-loading {
  font-size: 0.85rem;
  margin: 0.5rem 0;
}

.table-main-row {
  cursor: pointer;
  transition: background 0.15s;
}

.table-main-row:hover,
.table-main-row.is-expanded {
  background: rgba(167, 139, 250, 0.08);
}

.table-row-hint {
  display: none;
  font-size: 0.7rem;
}

@media (min-width: 768px) {
  .table-row-hint {
    display: inline;
  }
}

.table-detail-row td {
  background: rgba(10, 6, 18, 0.65);
  padding: 0 !important;
}

.table-credentials-panel {
  padding: var(--gap-md) var(--gap-lg);
  border-top: 1px solid var(--border);
}

.table-credentials-panel h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.table-credentials-subhead {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: #e9d5ff;
}

.table-sheet-links {
  margin-top: 0.35rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius);
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(167, 139, 250, 0.06);
}

.table-sheet-links-title {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.table-sheet-links .form-group {
  margin-bottom: 0.75rem;
}

.table-sheet-links .form-group:last-child {
  margin-bottom: 0;
}

.table-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.table-link-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.35rem;
}

.table-link-row .btn-link-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
}

.table-link-field {
  flex: 1 1 8rem;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #e9d5ff;
}

.table-link-missing {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.credentials-form {
  margin-top: 0.75rem;
}
