:root {
  color-scheme: dark;
  --brand-700: #0758d8;
  --brand-600: #0877ff;
  --brand-500: #2d91ff;
  --brand-100: rgba(35, 136, 255, 0.16);
  --navy-950: #030b1b;
  --navy-900: #07152c;
  --text: #f7f9ff;
  --muted: #a9b8d3;
  --border: rgba(139, 166, 211, 0.24);
  --surface: rgba(8, 21, 43, 0.82);
  --danger: #ff727c;
  --danger-bg: rgba(198, 45, 58, 0.14);
  --success: #55d69b;
  --success-bg: rgba(28, 166, 102, 0.14);
  --radius: 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { min-width: 320px; background: var(--navy-950); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 10%, rgba(15, 93, 211, 0.28), transparent 31rem),
    radial-gradient(circle at 82% 84%, rgba(0, 76, 201, 0.15), transparent 34rem),
    linear-gradient(145deg, #061632 0%, #030a19 55%, #06142b 100%);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

button, input { font: inherit; }
a { color: inherit; }

.page-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
}

.auth-card {
  width: min(100%, 760px);
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(164, 187, 225, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(14, 32, 61, 0.84), rgba(4, 14, 31, 0.9));
  box-shadow: 0 32px 90px rgba(0, 5, 18, 0.52), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(18px);
}

.brand-header {
  position: relative;
  min-height: 248px;
  padding: 54px 46px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(83, 130, 207, 0.3);
  border-radius: 20px;
  background:
    radial-gradient(circle at 77% 45%, rgba(7, 104, 255, 0.31), transparent 28%),
    linear-gradient(118deg, #081431 0%, #061535 52%, #052458 100%);
}

.brand-header::before {
  position: absolute;
  width: 460px;
  height: 140px;
  right: -55px;
  bottom: -100px;
  border: 1px solid rgba(42, 139, 255, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(18, 117, 255, 0.2);
  content: "";
  transform: rotate(-7deg);
}

.brand-header::after {
  position: absolute;
  width: 540px;
  height: 110px;
  left: -150px;
  bottom: -82px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(22, 116, 255, .4) 0 1px, transparent 2px) 0 0 / 11px 11px;
  content: "";
  opacity: .48;
  transform: rotate(8deg);
}

.brand { position: relative; z-index: 2; display: inline-flex; width: fit-content; text-decoration: none; }
.brand-logo { display: block; width: 196px; height: auto; filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }

.illustration {
  position: absolute;
  z-index: 2;
  top: 15px;
  right: 48px;
  width: 220px;
  height: 220px;
  filter: drop-shadow(0 22px 25px rgba(0, 21, 65, .72));
}

.illustration::before {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 235px;
  height: 42px;
  border: 2px solid #1986ff;
  border-radius: 50%;
  background: rgba(4, 39, 99, .72);
  box-shadow: 0 0 30px rgba(0, 112, 255, .48), inset 0 0 18px rgba(27, 139, 255, .55);
  content: "";
  transform: translateX(-50%);
}

.illustration::after {
  position: absolute;
  inset: 20px -25px 40px;
  z-index: -1;
  border: 1px solid rgba(41, 151, 255, .85);
  border-radius: 50%;
  content: "";
  transform: rotate(-18deg);
}

.illustration img { position: relative; z-index: 2; display: block; width: 60%; height: 60%; object-fit: contain; left: 20%; bottom: -27%;  }

.card-content { padding: 36px 48px 24px; text-align: center; }
.card-content > h1 { margin: 0 0 18px; color: #fff; font-size: clamp(24px, 4vw, 38px); font-weight: 750; line-height: 1.2; letter-spacing: -.8px; outline: none; }
.card-content > h1.screen-title--underlined { text-decoration: none; }
.screen { text-align: center; }
.description { margin: 0 auto 28px; max-width: 590px; color: var(--muted); font-size: 17px; line-height: 1.65; }
.description:empty { display: none; }

.state-icon { width: 52px; height: 52px; margin: 0 auto 14px; display: none; place-items: center; border: 1px solid transparent; border-radius: 16px; font-size: 23px; font-weight: 800; }
.state-icon--visible { display: grid; }
.state-icon--loading { display: grid; border-color: rgba(53, 147, 255, .22); background: var(--brand-100); }
.state-icon--success { border-color: rgba(85,214,155,.25); background: var(--success-bg); color: var(--success); }
.state-icon--error { border-color: rgba(255,114,124,.25); background: var(--danger-bg); color: var(--danger); }
.state-icon--info { display: none; }
.spinner { width: 22px; height: 22px; border: 2.5px solid rgba(118,182,255,.28); border-top-color: var(--brand-500); border-radius: 50%; animation: spin .7s linear infinite; }

.form { margin: 0 auto; text-align: left; }
.field { margin-bottom: 18px; }
label { display: inline-flex; gap: 3px; margin-bottom: 8px; color: #eef4ff; font-size: 14px; font-weight: 650; }
.required-mark { color: #ff7680; }
.input-wrap { position: relative; }
input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 48px 0 16px;
  border: 1px solid #405476;
  border-radius: 12px;
  background: rgba(3, 12, 28, .7);
  color: #f7f9ff;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input::placeholder { color: #71809a; opacity: 1; }
input:hover { border-color: #60789e; }
input:focus { border-color: var(--brand-500); background: rgba(5, 18, 42, .88); box-shadow: 0 0 0 4px rgba(34,137,255,.13); }
input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255,114,124,.1); }
input:disabled { background: rgba(31,42,61,.7); color: #8793a8; cursor: not-allowed; }
.toggle-password { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #4da1ff; cursor: pointer; }
.toggle-password svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toggle-password:hover { background: rgba(31,130,255,.12); color: #79b9ff; }
.field-error { min-height: 17px; margin: 6px 2px 0; color: #ff8d95; font-size: 12px; line-height: 1.4; }
.field-error:empty { min-height: 0; margin-top: 7px; }
.password-requirements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 18px; margin: 3px 0 2px; padding: 0; color: #8d9bb2; font-size: 12px; list-style: none; }
.password-requirements li { display: flex; align-items: center; gap: 7px; min-width: 0; line-height: 1.3; }
.requirement-dot { width: 14px; height: 14px; flex: 0 0 14px; border: 1px solid #5c6f8e; border-radius: 50%; }
.password-requirements li.is-met { color: #67dca5; }
.password-requirements li.is-met .requirement-dot { display: grid; place-items: center; border-color: #35af70; background: #35af70; }
.password-requirements li.is-met .requirement-dot::after { width: 5px; height: 3px; border-left: 1.5px solid #071b13; border-bottom: 1.5px solid #071b13; content: ""; transform: rotate(-45deg) translateY(-1px); }

.verification-letter { max-width: 560px; margin: 0 auto; color: #dce6f7; font-size: 15px; line-height: 1.65; text-align: left; }
.verification-letter p { margin: 0 0 24px; }
.verification-button { width: min(280px, 100%); margin: 10px auto 32px; }
.verification-signature { margin-top: 30px; }

.button {
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 20px;
  border: 1px solid #55adff;
  border-radius: 13px;
  background: linear-gradient(180deg, #1687ff 0%, #075de1 100%);
  box-shadow: 0 12px 28px rgba(0, 91, 220, .26), inset 0 1px 0 rgba(255,255,255,.24);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s, filter .18s, box-shadow .18s;
}
.button::after { content: "›"; font-size: 27px; font-weight: 300; line-height: 0; transform: translateY(-1px); }
button.button::after { display: none; }
.button:hover { filter: brightness(1.08); box-shadow: 0 15px 34px rgba(0, 102, 235, .34), inset 0 1px 0 rgba(255,255,255,.24); transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .68; cursor: not-allowed; transform: none; filter: none; }
.button--secondary { border-color: rgba(86,151,232,.35); background: rgba(20, 50, 90, .55); color: #cfe5ff; box-shadow: none; }
.button-spinner { width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.actions { display: grid; gap: 10px; margin-top: 22px; }
.status { margin-top: 14px; padding: 0; font-size: 13px; line-height: 1.5; text-align: left; }
.status:not(:empty) { padding: 12px 14px; border-radius: 10px; }
.status--error { border: 1px solid rgba(255,114,124,.25); background: var(--danger-bg); color: #ffabb1; }
.status--info { border: 1px solid rgba(70,151,239,.25); background: rgba(35, 111, 200, .13); color: #b7d9ff; }

.email-summary { margin: -4px auto 20px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(16, 36, 66, .55); color: #b9c8df; font-size: 13px; overflow-wrap: anywhere; }
.redirect-copy { margin: 16px 0 0; color: #8494ad; font-size: 12px; }

.card-footer {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 22px 48px 8px;
  color: #aabbd6;
}
.trust-divider { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.trust-divider::before, .trust-divider::after { height: 1px; flex: 1; background: linear-gradient(90deg, transparent, rgba(130,157,197,.38)); content: ""; }
.trust-divider::after { background: linear-gradient(90deg, rgba(130,157,197,.38), transparent); }
.trust-divider span { position: relative; width: 40px; height: 40px; flex: 0 0 40px; overflow: hidden; }
.trust-divider img { position: absolute; top: -8px; left: -23px; width: 86px; height: 57px; max-width: none; object-fit: fill; }
.app-mark { width: 64px; height: 64px; display: grid; grid-template-columns: repeat(2, 12px); grid-template-rows: repeat(2, 12px); place-content: center; gap: 6px; border: 1px solid rgba(36,121,255,.46); border-radius: 15px; background: linear-gradient(145deg, rgba(11,52,116,.85), rgba(4,23,58,.9)); box-shadow: inset 0 0 24px rgba(16,93,217,.2); }
.app-mark i { display: block; border-radius: 3px; background: linear-gradient(145deg, #d6e8ff, #5b9fff); box-shadow: 0 0 8px rgba(48,141,255,.38); }
.company-info h2 { margin: 0 0 6px; color: #fff; font-size: 19px; font-weight: 700; }
.company-info span { display: block; font-size: 14px; line-height: 1.6; }
.security-note { margin: 17px 0 0; color: #8292a7; font-size: 11px; }
.security-note span { color: #5aaaff; }

button:focus-visible, a:focus-visible { outline: 3px solid #73bdf6; outline-offset: 3px; }

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

@media (max-width: 640px) {
  .page-shell { align-items: flex-start; padding: 16px 12px; }
  .auth-card { padding: 14px; border-radius: 22px; }
  .brand-header { min-height: 178px; padding: 32px 25px; border-radius: 16px; }
  .brand-logo { width: 136px; }
  .illustration { top: 3px; right: 17px; width: 170px; height: 170px; }
  .illustration::before { width: 175px; height: 32px; bottom: 9px; }
  .card-content { padding: 28px 12px 18px; }
  .card-content > h1 { margin-bottom: 12px; font-size: 27px; }
  .description { margin-bottom: 22px; font-size: 15px; }
  .password-requirements { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-footer { grid-template-columns: 54px minmax(0, 1fr); gap: 15px; padding: 18px 12px 8px; }
  .app-mark { width: 54px; height: 54px; }
  .company-info h2 { font-size: 17px; }
  .company-info span { font-size: 12px; }
}

@media (max-width: 430px) {
  .brand-header { min-height: 150px; padding-left: 20px; }
  .brand-logo { width: 112px; }
  .illustration { top: 4px; right: 6px; width: 142px; height: 142px; }
  .illustration::before { width: 144px; }
  .card-content > h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
