* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f0f4f8;
  min-height: 100vh;
}

/* ===== TOP HEADER ===== */
.top-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-start;
}

.header-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.header-sub {
  font-size: 12px;
  color: #64748b;
}

/* ===== BLUE BAR ===== */
.blue-bar {
  background: #2563eb;
  color: #fff;
  padding: 14px 24px;
}

.blue-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}

.check-icon {
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.blue-title {
  font-size: 16px;
  font-weight: 600;
}

.blue-sub {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 1px;
}

/* ===== MAIN ===== */
.main {
  display: flex;
  justify-content: center;
  padding: 40px 20px 48px;
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  width: 100%;
  padding: 36px 36px 40px;
}

.form-card {
  max-width: 520px;
}

.steps {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 24px;
}

.steps span.active {
  color: #2563eb;
  font-weight: 600;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 28px;
  line-height: 1.45;
}

.label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.radio-group {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.radio-option {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}

.radio-option.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e40af;
}

.radio-option input {
  display: none;
}

input[type="text"],
input[type="tel"] {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 20px;
  outline: none;
  transition: border 0.15s;
}

input:focus {
  border-color: #2563eb;
}

.btn {
  width: 100%;
  padding: 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: #1d4ed8;
}

.back {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
}

.code-display {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.code-digit {
  width: 44px;
  height: 52px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: #2563eb;
  background: #f8fafc;
}

/* ===== LOADING ===== */
.load-box {
  text-align: center;
  padding: 48px 20px 32px;
}

.load-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 28px;
}

.load-track {
  width: 100%;
  height: 14px;
  background: #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}

.load-fill {
  height: 100%;
  width: 0%;
  background: #22c55e;
  border-radius: 8px;
  transition: width 0.05s linear;
}

.load-pct {
  font-size: 15px;
  font-weight: 600;
  color: #16a34a;
}

/* ===== TERMINAL ===== */
.terminal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.terminal {
  background: #0f172a;
  border-radius: 14px;
  padding: 32px 36px 28px;
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 14px;
  color: #39ff14;
  line-height: 1.7;
  width: 100%;
  max-width: 680px;
  min-height: 580px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

#termLines {
  flex: 1;
}

.progress-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #1e293b;
}

.progress-item {
  margin-bottom: 16px;
}

.progress-label {
  color: #39ff14;
  font-size: 13px;
  margin-bottom: 8px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-track {
  flex: 1;
  height: 12px;
  background: #1e293b;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #334155;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: #39ff14;
  border-radius: 3px;
  transition: width 0.05s linear;
}

.progress-pct {
  color: #39ff14;
  font-size: 13px;
  min-width: 56px;
  text-align: right;
}

/* ===== GOSUSLUGI WARNING ===== */
.warning-card {
  max-width: 600px;
  padding: 44px 40px 48px;
}

.gosuslugi-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.gosuslugi-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.gosuslugi-text {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1e40af;
}

.gosuslugi-text::first-letter {
  color: #e11d48;
}

.warning-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 18px;
}

.warning-icon {
  color: #e11d48;
  font-size: 26px;
}

.divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 0 0 22px 0;
}

.attention-block {
  margin-bottom: 24px;
}

.attention-label {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  font-size: 18px;
}

.attention-block p {
  font-size: 16px;
  color: #475569;
  line-height: 1.6;
}

.details-box {
  background: #eff6ff;
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 26px;
}

.details-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #1e40af;
  font-size: 16px;
  margin-bottom: 14px;
}

.details-icon {
  font-size: 22px;
}

.details-list {
  font-size: 15px;
  color: #475569;
  line-height: 1.85;
}

.call-text {
  font-size: 16px;
  color: #1e3a5f;
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.55;
}

.phones-box {
  border: 2px dashed #93c5fd;
  border-radius: 14px;
  padding: 26px 24px;
  text-align: center;
  margin-bottom: 20px;
}

.phone-big {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.5px;
  margin: 10px 0;
  text-decoration: none;
}

.phone-big:hover {
  color: #2563eb;
}

/* Кнопка позвонить */
.btn-call {
  display: block;
  width: 100%;
  padding: 18px;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  margin-bottom: 24px;
  transition: background 0.15s;
  cursor: pointer;
}

.btn-call:hover {
  background: #15803d;
}

.legal-box {
  background: #fef2f2;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  font-size: 14px;
  color: #7f1d1d;
  line-height: 1.6;
}

.legal-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .header-title { font-size: 13px; }
  .header-logo { height: 40px; }
  .form-card { max-width: 100%; padding: 28px 20px; }
  .warning-card {
    max-width: 100%;
    padding: 32px 22px 36px;
  }
  .gosuslugi-text { font-size: 22px; }
  .gosuslugi-logo-img { height: 34px; }
  .warning-title { font-size: 18px; }
  .attention-label { font-size: 16px; }
  .attention-block p { font-size: 15px; }
  .details-list { font-size: 14px; }
  .call-text { font-size: 15px; }
  .phone-big { font-size: 22px; }
  .btn-call { font-size: 16px; padding: 16px; }
  .legal-box { font-size: 13px; }
  .terminal {
    padding: 22px 18px;
    font-size: 13px;
    min-height: 460px;
    max-width: 100%;
  }
}
.bio-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

.bio-box {
  background: #1e293b;
  border: 2px solid #39ff14;
  border-radius: 16px;
  padding: 40px 48px;
  text-align: center;
  color: #e2e8f0;
  max-width: 420px;
}

.bio-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.bio-title {
  font-size: 22px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
}

.bio-sub {
  font-size: 14px;
  color: #94a3b8;
}
.red-warning-box {
  display: flex;
  gap: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  color: #7f1d1d;
  line-height: 1.55;
  margin-bottom: 20px;
}

.red-warning-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.hotline-box {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.hotline-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hotline-text {
  flex: 1;
}

.hotline-title {
  font-size: 14px;
  color: #1e3a5f;
  font-weight: 600;
  margin-bottom: 2px;
}

.hotline-phone {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.hotline-phone:hover {
  text-decoration: underline;
}

.hotline-sub {
  font-size: 12px;
  color: #64748b;
}

.hotline-right {
  font-size: 12px;
  color: #64748b;
  text-align: right;
  line-height: 1.5;
  flex-shrink: 0;
}

.demo-footer {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.6;
  margin-top: 10px;
}

@media (max-width: 640px) {
  .hotline-phone { font-size: 18px; }
  .hotline-box { padding: 14px 16px; gap: 12px; }
  .hotline-right { font-size: 11px; }
  .red-warning-box { font-size: 13px; padding: 12px 14px; }
}