/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --navy: #0B132B; /* Основной фон из ТЗ */
  --navy-light: #1C1C1E; /* Графитовый из ТЗ как вариант */
  --blue: #4A6CF7; /* Акцентный цвет из ТЗ */
  --blue-hover: #6A11CB; /* Градиент из ТЗ */
  --cyan: #2575FC; /* Градиент из ТЗ */
  --success: #00C48C; /* Цвет успеха из ТЗ */
  --text: #FFFFFF;
  --text-muted: #94A3B8;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 19, 43, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(74, 108, 247, 0.15);
  border: 1px solid rgba(74, 108, 247, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}

.logo-icon svg {
  width: 16px;
  height: 16px;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav a:hover {
  color: #fff;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 20px rgba(74, 108, 247, 0.3);
}

.btn-primary:hover {
  background: var(--blue-hover);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 80px 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--navy) 0%, rgba(11, 19, 43, 0.92) 45%, transparent 75%);
  z-index: 2;
}

.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  z-index: 1;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 560px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--blue-hover), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(74, 108, 247, 0.05));
}

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 16px;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.25s;
}

.feature-card:hover {
  border-color: rgba(74, 108, 247, 0.4);
}

.feature-image {
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--navy);
  margin-bottom: 18px;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.feature-card:hover .feature-image img {
  transform: scale(1.05);
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Steps ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.step-image {
  height: 180px;
  background: var(--navy);
}

.step-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step-body {
  padding: 24px;
}

.step-number {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: var(--blue);
  margin-bottom: 8px;
}

.step-body h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-body p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 28px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 13px;
  color: #64748B;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-image {
    width: 50%;
    opacity: 0.6;
  }
}

/* ===== Pricing ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 60px;
}

.pricing-card[hidden] {
  display: none;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: all 0.3s;
}

.pricing-card:hover {
  transform: translateY(-5px);
  border-color: rgba(74, 108, 247, 0.4);
}

.pricing-card.popular {
  border-color: var(--blue);
  position: relative;
  overflow: hidden;
}

.pricing-card.popular::before {
  content: 'Популярный';
  position: absolute;
  top: 18px;
  right: -30px;
  background: var(--blue);
  color: white;
  padding: 4px 30px;
  font-size: 12px;
  font-weight: 500;
  transform: rotate(45deg);
}

.pricing-card h3 {
  font-size: 22px;
  margin-bottom: 16px;
}

.pricing-free-note {
  max-width: 780px;
  margin: 28px auto 0;
  padding: 16px 22px;
  border: 1px solid rgba(74, 108, 247, 0.35);
  border-radius: 12px;
  background: rgba(74, 108, 247, 0.08);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.pricing-free-note strong {
  color: var(--text);
}

.pricing-free-note span {
  display: block;
  margin-top: 4px;
}

.pricing-note {
  max-width: 760px;
  margin: 24px auto 0;
  text-align: center;
}

.price {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 24px;
}

.price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card ul {
  list-style: none;
  margin-bottom: 32px;
  text-align: left;
  display: inline-block;
}

.pricing-card ul li {
  margin-bottom: 12px;
  position: relative;
  padding-left: 24px;
}

.pricing-card ul li::before {
  content: '✓';
  color: var(--success);
  position: absolute;
  left: 0;
}

.pricing-card .btn {
  width: 100%;
}

/* ===== Dashboard Preview ===== */
.dashboard-preview-image {
  margin-top: 60px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  background-color: rgba(255, 255, 255, 0.04);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-preview-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Dashboard ===== */
.dashboard-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.dashboard-section h2 {
  margin-bottom: 24px;
}

.plan-card {
  margin-top: 0;
  padding: 24px;
  background: linear-gradient(135deg, rgba(74, 108, 247, 0.13), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(74, 108, 247, 0.28);
  border-radius: var(--radius);
}

.plan-card h2 {
  margin-bottom: 4px;
}

.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.usage-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 14px;
}

.progress {
  height: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #7c93ff);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.inline-form {
  display: flex;
  gap: 16px;
}

.inline-form input {
  flex-grow: 1;
}

.sites-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.sites-table th, .sites-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.sites-table th {
  font-weight: 600;
  color: var(--text-muted);
}

.sites-table .key {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
}




@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 60px 0 80px;
  }

  .hero-image {
    display: none;
  }

  .hero-gradient {
    background: var(--navy);
  }

  .features-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .usage-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* ===== Дополнительные элементы навигации ===== */
.link-button {
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s;
}

.link-button:hover {
  color: #fff;
}

/* ===== Cookie-уведомление ===== */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 300;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(17, 26, 51, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner p {
  flex: 1 1 360px;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.cookie-banner a {
  color: var(--blue);
  text-decoration: underline;
}

/* ===== Личный кабинет ===== */
.dashboard-main {
  min-height: calc(100vh - 64px);
  padding-top: 100px;
  padding-bottom: 80px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.dashboard-heading h1 {
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.2;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

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

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.keys-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.keys-list .key-card {
  width: 100%;
}

.site-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.site-card h3 {
  font-size: 18px;
  overflow-wrap: anywhere;
}

.site-card p {
  font-size: 14px;
  color: var(--text-muted);
}

.site-card .btn {
  margin-top: 10px;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-form input {
  flex: 1 1 280px;
  min-width: 0;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.18);
}

textarea {
  resize: vertical;
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.form-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-grid-full {
  grid-column: 1 / -1;
}

.modal-content label {
  display: block;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.modal-content label input,
.modal-content label select,
.modal-content label textarea {
  display: block;
  margin-top: 6px;
}

input[type="url"],
input[type="tel"],
input[type="color"],
select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

input[type="color"] {
  min-height: 46px;
  padding: 5px;
  cursor: pointer;
}

select option {
  background: #111a33;
  color: var(--text);
}

input[type="url"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.18);
}

input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.install-snippet {
  margin-top: 4px;
}

#widget-text {
  min-height: 96px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
}

.code-snippet {
  display: block;
  padding: 12px 14px;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #c7d2fe;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre;
}

.alert {
  padding: 12px 16px;
  margin: 0 0 24px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
}

.alert[hidden] {
  display: none;
}

.alert-error {
  background: rgba(255, 77, 77, 0.1);
  border-color: rgba(255, 77, 77, 0.35);
  color: #ffb3b3;
}

.alert-success {
  background: rgba(0, 196, 140, 0.1);
  border-color: rgba(0, 196, 140, 0.35);
  color: #7cf0c8;
}

/* ===== Модальные окна ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(4, 8, 20, 0.76);
  backdrop-filter: blur(6px);
}

.modal[hidden] {
  display: none;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  background: #111a33;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
  margin-bottom: 20px;
  padding-right: 32px;
  font-size: 22px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 2px 8px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1.2;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.services-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-item {
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.service-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.service-info h4 {
  margin-bottom: 4px;
  font-size: 16px;
}

.service-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.service-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.service-keys {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.key-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.key-label {
  min-width: 120px;
  color: var(--text-muted);
}

.key {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.btn-small {
  padding: 7px 12px;
  font-size: 13px;
}

.switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
}

.switch input {
  width: 0;
  height: 0;
  opacity: 0;
}

.slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: background 0.2s;
}

.slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.switch input:checked + .slider {
  background: var(--success);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.switch input:focus-visible + .slider {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.switch input:disabled + .slider {
  opacity: 0.5;
  cursor: wait;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.modal-open {
  overflow: hidden;
}

/* ===== Юридические страницы и документация ===== */
.legal-page {
  padding: 120px 0 80px;
}

.legal-content {
  max-width: 820px;
  margin: 0 auto;
}

.legal-content h1 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
}

.legal-content h2 {
  margin: 32px 0 12px;
  font-size: 21px;
}

.legal-content h3 {
  margin: 24px 0 8px;
  font-size: 17px;
}

.legal-content code {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.legal-content p,
.legal-content li {
  color: #c8d2e4;
  font-size: 15px;
  line-height: 1.75;
}

.legal-content p {
  margin-bottom: 12px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 16px 22px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--blue);
  text-decoration: underline;
}

.legal-meta {
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

.notice {
  padding: 14px 18px;
  margin-bottom: 28px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 10px;
  color: #ffe08a;
  font-size: 14px;
  line-height: 1.6;
}

.doc-code {
  display: block;
  overflow-x: auto;
  padding: 16px;
  margin: 12px 0 20px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #d7e3ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre;
}

.legal-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* Планшеты и телефоны */
@media (max-width: 1100px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===== Ключи и виджеты ===== */
.stack-form {
  margin-top: 20px;
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(74, 108, 247, 0.35);
  border-radius: 999px;
  background: rgba(74, 108, 247, 0.12);
  color: #c7d2fe;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.key-card,
.widget-card {
  min-width: 0;
}

.key-card-head,
.widget-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.key-card-head h3,
.widget-card-head h3 {
  margin: 0;
}

.key-status {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.key-status.is-active {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.key-status.is-inactive {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.key-status.is-pending {
  background: rgba(234, 179, 8, 0.15);
  color: #fde68a;
}

.key-meta,
.widget-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.domain-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.key-usage {
  width: 100%;
  margin-top: 4px;
}

.key-usage .usage-head {
  font-size: 12px;
  margin-bottom: 5px;
}

.key-usage .progress {
  height: 6px;
}

.key-actions,
.widget-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
}

.install-block {
  width: 100%;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.install-block .code-snippet {
  margin-top: 8px;
}

.btn-danger {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.form-actions-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.form-actions-right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.modal-wide {
  max-width: 820px;
}

.fieldset {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.fieldset legend {
  padding: 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.inline-inputs {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.inline-inputs input {
  min-width: 0;
  margin-top: 0 !important;
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.widget-stat {
  width: 100%;
  font-size: 13px;
  color: var(--text-muted);
}

.widget-stat strong {
  color: var(--text);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.admin-tab {
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.admin-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.admin-tab.is-active {
  border-color: rgba(74, 108, 247, 0.35);
  background: rgba(74, 108, 247, 0.12);
  color: #c7d2fe;
}

.admin-panel {
  margin-top: 28px;
}

.admin-panel h2 {
  margin-bottom: 20px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

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

.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table select,
.admin-table input[type="number"],
.admin-table input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
}

.admin-table .domain-chip {
  margin: 2px 2px 2px 0;
}

.balance-value {
  color: var(--success);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.balance-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.balance-table {
  min-width: 560px;
}

.balance-table td {
  vertical-align: middle;
}

.balance-description {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.amount-positive {
  color: #7cf0c8;
  font-weight: 600;
}

.amount-negative {
  color: #ff9b9b;
  font-weight: 600;
}

.nowrap {
  white-space: nowrap;
}

#users-body .btn {
  margin-left: 8px;
  margin-top: 0;
}

@media (max-width: 768px) {
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .form-actions-split {
    align-items: stretch;
  }

  .form-actions-right {
    width: 100%;
  }

  .form-actions-right .btn {
    flex: 1 1 auto;
  }

  .nav-account {
    display: flex;
    gap: 16px;
  }

  .nav-account a {
    display: none;
  }

  .dashboard-main {
    padding-top: 88px;
  }

  .dashboard-heading {
    flex-direction: column;
  }

  .service-head {
    flex-direction: column;
  }

  .service-controls {
    width: 100%;
    justify-content: flex-end;
  }

  .modal {
    padding: 12px;
  }

  .modal-content {
    padding: 24px 18px;
    max-height: 94vh;
  }

  .key-label {
    min-width: 100%;
  }

  .inline-form .btn,
  .cookie-banner .btn {
    width: 100%;
  }

  .legal-page {
    padding-top: 100px;
  }
}
/* Список документов */
.documents-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.document-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.document-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

/* Brand assets */
.header-logo {
  width: 220px;
  height: auto;
  display: block;
}

.logo-icon {
  border: 0;
  background: transparent;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
}
