/* ═══════════════════════════════════════════════════════════════
   TOP.ONE.RU — SERVICE DESIGN CSS
   Общий слой стилей для служебных страниц: login, register, faq, success
   Токены и bg-scene полностью совпадают с home-design.css / design.html
═══════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  --blue: #003087;
  --blue-2: #1a4faa;
  --blue-3: #3b82f6;
  --red: #c8102e;
  --red-2: #e8213f;
  --green: #0e7f57;
  --yellow: #f5b800;
  --cream: #f5f0e8;
  --cream-2: #ede8dc;
  --cream-3: #d9d2c2;
  --ink: #0d1117;
  --ink-2: #3d4455;
  --ink-3: #7a8099;
  --surface: #ffffff;
  --surface-2: #f8f5ef;
  --surface-3: #eef2fb;
  --border: rgba(0, 48, 135, 0.12);
  --border-soft: rgba(0, 48, 135, 0.06);
  --shadow: 0 2px 16px rgba(0, 48, 135, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 34px rgba(0, 48, 135, 0.12), 0 2px 12px rgba(0, 0, 0, 0.05);
  --shadow-red: 0 10px 26px rgba(200, 16, 46, 0.22);
  --display: "Bebas Neue", "Oswald", sans-serif;
  --serif: "Playfair Display", serif;
  --body: "DM Sans", "Manrope", sans-serif;
  --mono: "DM Mono", "JetBrains Mono", monospace;
  --radius: 12px;
  --radius-lg: 22px;
}

[data-theme="dark"] {
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --blue-3: #93c5fd;
  --red: #ef4444;
  --red-2: #fb7185;
  --green: #22c55e;
  --yellow: #f59e0b;
  --cream: #0c1221;
  --cream-2: #111827;
  --cream-3: #19243a;
  --ink: #eef2ff;
  --ink-2: #c8d1e6;
  --ink-3: #8ea0c3;
  --surface: #0d1220;
  --surface-2: #111827;
  --surface-3: #152033;
  --border: rgba(59, 130, 246, 0.18);
  --border-soft: rgba(59, 130, 246, 0.08);
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 10px 34px rgba(0, 0, 0, 0.34);
  --shadow-red: 0 10px 26px rgba(239, 68, 68, 0.2);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top right, rgba(245, 184, 0, 0.15), transparent 25%),
    radial-gradient(circle at bottom left, rgba(0, 48, 135, 0.12), transparent 28%),
    var(--cream);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.1), transparent 22%),
    radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.16), transparent 26%),
    linear-gradient(180deg, #07101d 0%, #0b1220 42%, #0d1629 100%);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
::selection { background: var(--red); color: #fff; }

/* ── ANIMATED BACKGROUND ── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: -15%;
  background-image:
    linear-gradient(rgba(0, 48, 135, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 48, 135, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.7), transparent 78%);
  animation: sdDriftGrid 20s linear infinite;
}

.bg-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(10px);
  opacity: 0.5;
}

.bg-orb-a {
  top: 4%; left: -3%;
  width: clamp(220px, 30vw, 420px);
  height: clamp(220px, 30vw, 420px);
  background: radial-gradient(circle, rgba(0, 48, 135, 0.24) 0%, rgba(0, 48, 135, 0) 70%);
  animation: sdFloatA 18s ease-in-out infinite;
}

.bg-orb-b {
  top: 28%; right: -4%;
  width: clamp(180px, 24vw, 340px);
  height: clamp(180px, 24vw, 340px);
  background: radial-gradient(circle, rgba(200, 16, 46, 0.18) 0%, rgba(200, 16, 46, 0) 72%);
  animation: sdFloatB 22s ease-in-out infinite;
}

.bg-orb-c {
  bottom: -6%; left: 28%;
  width: clamp(260px, 32vw, 460px);
  height: clamp(260px, 32vw, 460px);
  background: radial-gradient(circle, rgba(245, 184, 0, 0.16) 0%, rgba(245, 184, 0, 0) 74%);
  animation: sdFloatC 24s ease-in-out infinite;
}

@keyframes sdDriftGrid {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(-18px, 14px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}
@keyframes sdFloatA {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%       { transform: translate3d(32px, 20px, 0) scale(1.08); }
}
@keyframes sdFloatB {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%       { transform: translate3d(-28px, 26px, 0) scale(0.95); }
}
@keyframes sdFloatC {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%       { transform: translate3d(18px, -24px, 0) scale(1.04); }
}

/* ── PAGE SHELL ── */
.svc-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── ANNOUNCE BAND ── */
.ann {
  background: linear-gradient(90deg, var(--blue) 0%, #001a60 45%, var(--red) 100%);
  background-size: 220% 100%;
  animation: sdBandFlow 14s ease-in-out infinite;
  padding: 7px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  z-index: 310;
}
.ann s { opacity: 0.4; margin: 0 10px; text-decoration: none; }
@keyframes sdBandFlow {
  0%, 100% { background-position: 0%; }
  50%       { background-position: 100%; }
}

/* ── TOPBAR ── */
.svc-topbar {
  position: sticky;
  top: 0;
  z-index: 260;
  background: rgba(245, 240, 232, 0.88);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
[data-theme="dark"] .svc-topbar { background: rgba(12, 18, 33, 0.92); }

.svc-tbi {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  text-decoration: none;
}
.b-em {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--blue) 0%, var(--red) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 19px; color: #fff; letter-spacing: -1px;
  box-shadow: 0 3px 12px rgba(200, 16, 46, 0.35);
  position: relative; overflow: hidden;
}
.b-em::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.22) 0%, transparent 55%);
}
.b-tx { line-height: 1.1; }
.b-name {
  font-family: var(--display);
  font-size: 21px; letter-spacing: 3px;
  color: var(--blue); display: block;
}
.b-sub {
  font-family: var(--mono);
  font-size: 8px; color: var(--red);
  letter-spacing: 2.5px; text-transform: uppercase;
}

/* Nav right */
.svc-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}
.svc-nl {
  font-size: 12.5px; font-weight: 500;
  color: var(--ink-2);
  padding: 5px 9px;
  border-radius: 7px;
  text-decoration: none;
  transition: all 0.18s;
  white-space: nowrap;
}
.svc-nl:hover { color: var(--blue); background: rgba(0, 48, 135, 0.07); }
.svc-nl.active { color: var(--blue); background: rgba(0, 48, 135, 0.09); }

/* Theme toggle */
.thb {
  width: 35px; height: 35px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s;
}
.thb:hover { border-color: var(--blue); color: var(--blue); }
.thb svg { width: 15px; height: 15px; }

/* Lang switcher */
.lsw { position: relative; }
.lcur {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--ink-2);
  padding: 5px 9px;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  transition: all 0.2s; cursor: pointer;
}
.lcur:hover { color: var(--blue); border-color: var(--blue); }
.lcur svg { width: 11px; height: 11px; transition: transform 0.2s; }
.lsw:hover .lcur svg { transform: rotate(180deg); }
.ldrop {
  position: absolute; top: calc(100% + 7px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 5px; min-width: 130px;
  opacity: 0; pointer-events: none;
  transform: translateY(-5px); transition: all 0.2s; z-index: 500;
}
.lsw:hover .ldrop { opacity: 1; pointer-events: auto; transform: translateY(0); }
.lopt {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 6px;
  font-size: 13px; color: var(--ink-2);
  transition: all 0.15s;
}
.lopt:hover, .lopt.active { background: rgba(0, 48, 135, 0.07); color: var(--blue); }
.lopt span { font-family: var(--mono); font-size: 10px; opacity: 0.55; }

/* Add site CTA */
.cta-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 15px;
  border-radius: 8px;
  background: var(--red); color: #fff;
  font-size: 13px; font-weight: 600;
  border: none; transition: all 0.2s; white-space: nowrap;
  cursor: pointer; text-decoration: none;
}
.cta-btn:hover { background: var(--red-2); transform: translateY(-1px); box-shadow: var(--shadow-red); }

/* ── MAIN CONTENT AREA ── */
.svc-main {
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 32px);
}

/* ── FORM CARD ── */
.svc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(24px, 4vw, 42px);
  position: relative;
  overflow: hidden;
}
.svc-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--red) 100%);
}

/* ── TYPOGRAPHY ── */
.svc-h1 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  letter-spacing: 1px;
  color: var(--blue);
  margin: 0 0 8px 0;
}
.svc-h1 span { color: var(--red); }
.svc-subtitle {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 24px;
  line-height: 1.55;
}

/* ── ALERT BOXES ── */
.svc-alert {
  padding: 13px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 20px;
}
.svc-alert-info {
  background: rgba(0, 48, 135, 0.06);
  border: 1px solid rgba(0, 48, 135, 0.14);
  color: var(--ink-2);
}
.svc-alert-error {
  background: rgba(200, 16, 46, 0.07);
  border: 1px solid rgba(200, 16, 46, 0.2);
  color: var(--red);
}
.svc-alert-warn {
  background: rgba(245, 184, 0, 0.1);
  border: 1px solid rgba(245, 184, 0, 0.28);
  color: #8a6a00;
}
.svc-alert-success {
  background: rgba(14, 127, 87, 0.07);
  border: 1px solid rgba(14, 127, 87, 0.2);
  color: var(--green);
}

/* ── FORM INPUTS ── */
.svc-field {
  display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 14px;
}
.svc-label {
  font-size: 11px; font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.svc-input {
  height: 44px;
  padding: 0 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-family: var(--body);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.svc-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.09);
}
.svc-input::placeholder { color: var(--ink-3); }
.svc-input:required:valid { border-color: var(--green); }

/* ── BUTTONS ── */
.svc-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px;
  height: 46px; padding: 0 22px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 700;
  cursor: pointer; border: none;
  transition: all 0.22s;
  text-decoration: none;
  white-space: nowrap;
}
.svc-btn-primary {
  background: var(--red); color: #fff;
}
.svc-btn-primary:hover {
  background: var(--red-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-red);
}
.svc-btn-secondary {
  background: var(--surface);
  color: var(--ink-2);
  border: 1.5px solid var(--border);
}
.svc-btn-secondary:hover {
  border-color: var(--blue); color: var(--blue);
  transform: translateY(-1px);
}
.svc-btn-blue {
  background: var(--blue); color: #fff;
}
.svc-btn-blue:hover {
  background: var(--blue-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.svc-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.svc-btn-full { width: 100%; }

/* ── FOOTER ── */
.svc-footer {
  border-top: 1px solid var(--border);
  padding: 20px clamp(16px, 4vw, 32px);
  position: relative;
  z-index: 1;
}
.svc-fi {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.svc-f-brand {
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 2px;
  color: var(--blue);
}
.svc-f-meta {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.6;
  margin-top: 2px;
}
.svc-f-meta a { color: var(--blue-2); transition: color 0.13s; }
.svc-f-meta a:hover { color: var(--red); }
.svc-flinks {
  display: flex; flex-wrap: wrap; gap: 3px;
}
.svc-flinks a {
  font-size: 12px;
  color: var(--ink-2);
  padding: 4px 8px;
  border-radius: 5px;
  transition: all 0.13s;
}
.svc-flinks a:hover { color: var(--blue); background: rgba(0, 48, 135, 0.06); }

/* ── PULSE BADGE ANIMATION ── */
@keyframes sdPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.25; transform: scale(0.75); }
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  display: inline-block;
  animation: sdPulse 2.2s ease-in-out infinite;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .svc-main { padding: 16px; }
  .svc-card { padding: 20px 16px; }
  .b-name { font-size: 17px; }
  .b-sub { display: none; }
}
