/**
 * @file: src/styles/main.css
 * @description:
 *   Основные стили статической страницы проверки оператора.
 *   Формирует визуальную тему, типографику, сетку и анимации.
 *   Содержит правила для адаптива и состояния результата.
 *   Использует CSS-переменные для централизованной настройки.
 * @dependencies:
 *   - https://fonts.googleapis.com (Commissioner, Unbounded)
 *   - index.html
 * @created: 2025-12-24 17:17:08
 * @updated: 2025-12-24 22:22:20
 */
:root {
  --bg-1: #f6f1ea;
  --bg-2: #eef6f4;
  --bg-3: #fff3e4;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-light: rgba(255, 255, 255, 0.66);
  --ink: #1f2a2c;
  --muted: #5f6e6e;
  --accent: #ff8a5b;
  --accent-2: #42d7b3;
  --accent-3: #f9d66b;
  --danger: #d64045;
  --stroke: rgba(18, 32, 36, 0.12);
  --shadow: 0 24px 60px rgba(23, 34, 38, 0.18);
  --radius-lg: 28px;
  --radius-md: 18px;
  --font-title: "Unbounded", "Segoe UI", sans-serif;
  --font-body: "Commissioner", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(43, 179, 161, 0.25), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(255, 122, 69, 0.22), transparent 50%),
    radial-gradient(circle at 90% 85%, rgba(255, 209, 102, 0.3), transparent 55%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  min-height: 100vh;
  position: relative;
}

a {
  color: inherit;
  text-decoration-color: rgba(31, 42, 44, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-2);
  text-decoration-color: var(--accent-2);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background-image:
    linear-gradient(rgba(31, 42, 44, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 42, 44, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
}

body::after {
  background: radial-gradient(circle at 50% 50%, rgba(31, 42, 44, 0.06), transparent 60%);
  mix-blend-mode: multiply;
}

.page {
  position: relative;
  z-index: 1;
  padding: 32px 6vw 48px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand__mark {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 18px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(120deg, var(--accent-2), #1fb3ff);
  color: #102225;
}

.brand__title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-2);
  border-color: rgba(66, 215, 179, 0.4);
  background: rgba(66, 215, 179, 0.12);
}

.nav-link.is-active {
  color: var(--ink);
  border-color: rgba(66, 215, 179, 0.45);
  background: rgba(66, 215, 179, 0.18);
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 12px rgba(66, 215, 179, 0.8);
  animation: pulse 2.4s ease-in-out infinite;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 36px;
  align-items: start;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: rise 0.8s ease forwards;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #0f3b34;
  background: rgba(66, 215, 179, 0.2);
  border: 1px solid rgba(66, 215, 179, 0.45);
  padding: 6px 12px;
  border-radius: 999px;
  width: fit-content;
  font-weight: 600;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.2;
  margin: 0;
}

.lead {
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  color: var(--muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(31, 42, 44, 0.04);
  border: 1px solid rgba(31, 42, 44, 0.1);
  font-size: 13px;
  color: var(--ink);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-light);
  border: 1px solid var(--stroke);
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.stat-value {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: rise 0.9s ease forwards;
  animation-delay: 0.1s;
}

.tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  border: 1px solid var(--stroke);
  width: fit-content;
}

.tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.tab.is-active {
  background: linear-gradient(130deg, var(--accent), var(--accent-3));
  color: #1a0c07;
  font-weight: 600;
}

.tab-panels {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.tab-panel.is-active {
  display: flex;
}

.lookup-form {
  background: var(--surface);
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.field-label {
  display: block;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--muted);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.input-row input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(31, 42, 44, 0.04);
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-row input:focus {
  border-color: rgba(66, 215, 179, 0.7);
  box-shadow: 0 0 0 3px rgba(66, 215, 179, 0.2);
}

.lookup-form textarea {
  width: 100%;
  min-height: 140px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(31, 42, 44, 0.04);
  color: var(--ink);
  font-size: 15px;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lookup-form textarea:focus {
  border-color: rgba(66, 215, 179, 0.7);
  box-shadow: 0 0 0 3px rgba(66, 215, 179, 0.2);
}

.btn-primary {
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(130deg, var(--accent), var(--accent-3));
  color: #1a0c07;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(255, 138, 91, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(255, 138, 91, 0.35);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid rgba(31, 42, 44, 0.2);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
  transform: translateY(-1px);
}

.hint-row {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hint {
  font-size: 13px;
  color: var(--muted);
}

.examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.bulk-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.bulk-hint {
  margin-top: 12px;
}

.result-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(18px);
}

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

.result-title {
  font-size: 16px;
  font-weight: 600;
}

.result-status {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.badge {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(66, 215, 179, 0.18);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.result-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-table-card {
  width: 100%;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid rgba(31, 42, 44, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.result-table th,
.result-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(31, 42, 44, 0.08);
  vertical-align: top;
  word-break: break-word;
}

.result-table th {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
}

.result-table td {
  font-size: 14px;
  color: var(--ink);
}

.result-table tr:nth-child(even) {
  background: rgba(31, 42, 44, 0.02);
}

.result-table td[data-col="status"] {
  font-weight: 600;
}

.result-row--success td[data-col="status"] {
  color: #0f4a41;
}

.result-row--error td {
  background: rgba(214, 64, 69, 0.06);
}

.result-row--error td[data-col="status"] {
  color: #7a1f2b;
}

.result-row--empty td {
  text-align: center;
  color: var(--muted);
  background: rgba(31, 42, 44, 0.03);
}

.result-error {
  background: rgba(214, 64, 69, 0.12);
  border: 1px solid rgba(214, 64, 69, 0.35);
  color: #7a1f2b;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
}

.result-meta {
  font-size: 12px;
  color: var(--muted);
}


.result-card[data-state="loading"] .result-status::after {
  content: "...";
  display: inline-block;
  width: 0ch;
  overflow: hidden;
  vertical-align: bottom;
  animation: dots 1.2s steps(4, end) infinite;
}

.details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  animation: rise 1s ease forwards;
  animation-delay: 0.2s;
}

.detail-card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid rgba(31, 42, 44, 0.08);
}

.detail-card h2 {
  font-family: var(--font-title);
  font-size: 18px;
  margin: 0 0 10px;
}

.steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.steps li {
  margin-bottom: 8px;
}

.info-grid,
.content-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.info-card,
.content-card,
.faq-item,
.info-panel,
.roadmap-card {
  background: rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid rgba(31, 42, 44, 0.08);
}

.info-card h2,
.content-card h2,
.info-panel h2,
.faq-preview h2,
.faq-item h2,
.faq-item h3,
.roadmap-card h2,
.content-hero h1 {
  font-family: var(--font-title);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.content-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: rise 0.8s ease forwards;
}

.content-hero h1 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.2;
}

.content-card p,
.info-card p,
.info-panel p {
  color: var(--muted);
}

.content-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

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

.note {
  font-size: 13px;
  color: var(--muted);
}

.info-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.faq-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.faq-item h2,
.faq-item h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 10px;
}

.footer__nav a {
  text-decoration: none;
  font-size: 12px;
  color: var(--muted);
}

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

.footer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding-top: 8px;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dots {
  to {
    width: 3ch;
  }
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .topbar__status {
    order: 2;
  }

  .tabs {
    width: 100%;
    justify-content: space-between;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    width: 100%;
  }

  .btn-secondary {
    width: 100%;
  }

}

@media (max-width: 640px) {
  .page {
    padding: 24px 18px 36px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .faq-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero h1 {
    font-size: 28px;
  }
}

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