:root {
  --navy-950: #060f26;
  --navy-900: #081536;
  --navy-850: #0b1d44;
  --navy-800: #0f2657;
  --navy-700: #16336e;
  --gold-500: #c9a96a;
  --gold-400: #dcc084;
  --gold-300: #eed8a5;
  --bone-100: #e9e9f4;
  --bone-200: #d5d7e2;
  --bone-400: #98a0b8;
  --bone-600: #626c8a;
  --red-400: #f87171;
  --green-400: #4ade80;
  --line-soft: rgba(201, 169, 106, 0.16);
  --line-navy: #18284c;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-main);
  background: var(--navy-950);
  color: var(--bone-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.auth-wrap {
  width: 100%;
  max-width: 480px;
  margin: auto;
  padding: 32px 20px 48px;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--bone-100);
  margin-bottom: 20px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: block;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-400);
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--bone-100);
  margin-bottom: 8px;
}

.auth-sub {
  font-size: 14px;
  color: var(--bone-400);
}

.auth-card {
  background: var(--navy-900);
  border: 1px solid var(--line-navy);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.alert-box {
  display: none;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.45;
}

.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
}

.alert-success {
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #86efac;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--bone-200);
  margin-bottom: 6px;
}

.form-hint {
  font-size: 11px;
  color: var(--bone-600);
  margin-top: 4px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  background: var(--navy-950);
  border: 1px solid var(--line-navy);
  color: var(--bone-100);
  padding: 11px 14px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  font-family: inherit;
}

.form-input:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 169, 106, 0.15);
}

.input-btn-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--bone-400);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.input-btn-toggle:hover {
  color: var(--bone-100);
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.captcha-img {
  height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-navy);
  background: var(--navy-950);
}

.btn-refresh-captcha {
  background: var(--navy-850);
  border: 1px solid var(--line-navy);
  color: var(--gold-400);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-refresh-captcha:hover {
  background: var(--navy-800);
  color: var(--bone-100);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: var(--bone-200);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--gold-500);
  width: 16px;
  height: 16px;
}

.btn-submit {
  width: 100%;
  background: var(--gold-500);
  color: var(--navy-950);
  border: none;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover:not(:disabled) {
  background: var(--gold-400);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--bone-400);
}

.auth-footer a {
  color: var(--gold-400);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--bone-600);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line-navy);
}

.auth-divider span {
  padding: 0 10px;
}

.btn-telegram {
  width: 100%;
  background: var(--navy-850);
  border: 1px solid var(--line-navy);
  color: var(--bone-100);
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.15s ease;
}

.btn-telegram:hover {
  background: var(--navy-800);
  border-color: rgba(201, 169, 106, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
