:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --surface: rgba(20, 20, 20, 0.92);
  --surface-strong: rgba(30, 30, 30, 0.96);
  --border: rgba(255, 140, 0, 0.22);
  --border-strong: rgba(255, 140, 0, 0.46);
  --text: #ffffff;
  --text-soft: #bbbbbb;
  --text-muted: #888888;
  --accent: #ff8c00;
  --accent-strong: #ff4500;
  --accent-soft: rgba(255, 140, 0, 0.14);
  --telegram: #229ed9;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --font-ui: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  background:
    radial-gradient(circle at top center, rgba(255, 140, 0, 0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 140, 0, 0.08), transparent 24%),
    var(--bg);
  color: var(--text);
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-shell {
  width: min(100%, 420px);
  padding: 50px 30px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  text-align: center;
}

.auth-logo {
  font-size: 84px;
  margin-bottom: 10px;
  filter: drop-shadow(0 8px 25px rgba(255, 140, 0, 0.5));
}

.auth-title {
  margin: 0 0 38px;
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #ffffff, #ffb74d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.field {
  margin-bottom: 22px;
  text-align: left;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-soft);
}

.field input {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  font-size: 16px;
  background: rgba(30, 30, 30, 0.9);
  color: var(--text);
  transition: all 0.25s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.18);
}

.input-wrap {
  position: relative;
  display: block;
}

.input-wrap input {
  padding-right: 52px;
}

.input-wrap input::-ms-reveal,
.input-wrap input::-webkit-credentials-auto-fill-button,
.input-wrap input::-webkit-textfield-decoration-container > *:not(:first-child) {
  display: none;
}

input[type="password"]::-ms-reveal {
  display: none;
}

.eye-toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.eye-toggle:hover {
  color: var(--accent);
}

.register-steps {
  margin: 20px 0 24px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(255, 215, 0, 0.12), rgba(184, 134, 11, 0.18));
  border: 1px solid rgba(212, 175, 55, 0.35);
  text-align: left;
}

.register-steps p {
  margin: 0 0 8px;
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.4;
}

.register-steps p:last-child {
  margin-bottom: 0;
}

.primary-auth-button,
.secondary-auth-button,
.telegram-auth-button {
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 16px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-auth-button {
  margin: 10px 0 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  box-shadow: 0 8px 25px rgba(255, 140, 0, 0.35);
}

.secondary-auth-button {
  color: #ffcc80;
  background: transparent;
  border: 1.5px solid var(--border-strong);
  margin-top: 0;
}

.telegram-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--telegram);
  color: #fff;
  box-shadow: 0 8px 20px rgba(34, 158, 217, 0.3);
  text-decoration: none;
}

.primary-auth-button:hover,
.secondary-auth-button:hover,
.telegram-auth-button:hover {
  transform: translateY(-2px);
}

.status-panel {
  margin: 18px 0 24px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.96), rgba(18, 18, 18, 0.92));
  border: 1px solid rgba(255, 140, 0, 0.18);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  text-align: left;
}

.status-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.status-panel__label,
.status-log__title {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.status-panel__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.status-panel__text {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.45;
}

.status-badge {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.status-badge--success {
  color: #6dffba;
  background: rgba(37, 196, 137, 0.14);
  border-color: rgba(37, 196, 137, 0.24);
}

.status-badge--warning,
.status-badge--idle {
  color: #ffcc80;
  background: rgba(255, 140, 0, 0.12);
  border-color: rgba(255, 140, 0, 0.22);
}

.status-log {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.status-log__content {
  margin: 0;
  max-height: 180px;
  overflow: auto;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  color: #d9e7ff;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.auth-divider {
  position: relative;
  margin: 34px 0 24px;
  color: #777777;
  font-size: 15px;
  font-weight: 600;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  background: rgba(255, 140, 0, 0.25);
  z-index: 1;
}

.auth-divider span {
  position: relative;
  z-index: 2;
  padding: 0 22px;
  background: var(--surface);
}

.auth-note,
.auth-footer {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.auth-note strong {
  color: #ffcc80;
}

.auth-note--lead {
  margin: 0 0 28px;
  font-size: 15px;
  color: var(--text-soft);
}

.auth-note--error {
  margin: -4px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(220, 60, 60, 0.35);
  border-radius: 14px;
  background: rgba(220, 60, 60, 0.08);
  color: #ff8080;
  text-align: left;
}

.auth-note--dev {
  margin: -10px 0 22px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 140, 0, 0.22);
  border-radius: 14px;
  background: rgba(255, 140, 0, 0.08);
  color: var(--text-soft);
  text-align: left;
  white-space: pre-line;
}

.auth-footer {
  margin-top: 28px;
  font-size: 15px;
  color: #ffcc80;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

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

@media (max-width: 480px) {
  .auth-shell {
    padding: 44px 24px;
    border-radius: 24px;
  }

  .auth-logo {
    font-size: 74px;
  }

  .auth-title {
    font-size: 28px;
  }
}
