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

/* ── Variables & Root (Synced with Home UX) ────────────────────────────── */
:root {
  color-scheme: light;
  --background: #f7f9fc;
  --surface: #ffffff;
  --border: rgba(20, 33, 61, 0.08);
  --border-solid: #e6eaf2;
  --input-bg: #f3f6fa;
  --muted: #667085;
  --foreground: #14213d;
  --accent: #4c6fff;
  --accent-hover: #3f5ef5;
  --primary: #4c6fff;
  --secondary: #3f5ef5;
  --danger: #ef4444;
  --ok: #18b67a;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --background: #0d1117;
  --surface: #161b27;
  --border: #2d3448;
  --border-solid: #3e4a61;
  --input-bg: rgba(255, 255, 255, 0.04);
  --muted: #8892a4;
  --foreground: #e6eaf3;
  --accent: #4c6fff;
  --accent-hover: #3f5ef5;
  --primary: #4c6fff;
  --secondary: #3f5ef5;
}

/* ── Base Styles ─────────────────────────────────────────────────────────── */
body {
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--background);
  background-image: radial-gradient(
    circle at 50% 0%,
    rgba(76, 111, 255, 0.07) 0%,
    transparent 60%
  );
  color: var(--muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* ── Card & Layout ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border-solid);
  border-radius: 20px;
  padding: 40px 32px 32px;
  width: 100%;
  max-width: 360px;
  box-shadow:
    0 1px 3px rgba(16, 24, 40, 0.06),
    0 8px 24px rgba(16, 24, 40, 0.05);
}

/* ── Typography & Branding ───────────────────────────────────────────────── */
.logo {
  text-align: center;
  margin-bottom: 28px;
}

.logo h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--foreground);
  letter-spacing: 0.04em;
  background: linear-gradient(
    135deg,
    var(--foreground) 30%,
    var(--primary) 100%
  );
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  opacity: 0.8;
}

/* ── Form Elements ───────────────────────────────────────────────────────── */
.field {
  margin-bottom: 20px;
  position: relative;
}

label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

input[type='password'],
input[type='text'] {
  width: 100%;
  padding: 12px 42px 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--foreground);
  font-family: 'Inter', monospace;
  font-size: 14px;
  letter-spacing: 0.05em;
  outline: none;
  transition: all 0.2s ease;
}

input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(76, 111, 255, 0.12);
}

input::placeholder {
  color: var(--muted);
  letter-spacing: 0.04em;
}

.eye-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  display: flex;
  align-items: center;
  transition: color 0.2s;
  width: auto;
}

.eye-btn:hover {
  color: var(--foreground);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
button[type='submit'] {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 15px rgba(159, 122, 234, 0.2);
}

button[type='submit']:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(159, 122, 234, 0.35);
}

button[type='submit']:active:not(:disabled) {
  transform: translateY(0);
}

button[type='submit']:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Utility Classes ─────────────────────────────────────────────────────── */
.eye-btn svg {
  display: flex;
}
.eye-icon--hidden {
  display: none !important;
}

.login-error {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: #fc8181;
  text-align: center;
  line-height: 1.4;
  white-space: pre-line;
}

.hidden {
  display: none !important;
}

.divider {
  margin: 24px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
  line-height: 0.1em;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.divider span {
  background: var(--surface);
  padding: 0 10px;
}

.secondary-btn {
  width: 100%;
  padding: 11px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.secondary-btn:hover {
  border-color: rgba(159, 122, 234, 0.4);
  color: var(--foreground);
  background: var(--border);
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  margin-top: 16px;
  width: 100%;
  text-decoration: underline;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.link-btn:hover {
  opacity: 1;
}

/* ── Success View Styles ────────────────────────────────────────────────── */
.success-container {
  text-align: center;
  padding: 10px 0;
}

.success-icon {
  margin-bottom: 16px;
  stroke: var(--ok);
}

.success-title {
  color: var(--foreground);
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 600;
}

.success-text {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.code-box {
  background: var(--input-bg);
  padding: 18px;
  border: 1.5px dashed rgba(159, 122, 234, 0.4);
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.code-text {
  font-family: 'Inter', monospace;
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
}

.success-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.download-notice {
  font-size: 12px;
  color: var(--accent);
  background: rgba(159, 122, 234, 0.05);
  border: 1px solid rgba(159, 122, 234, 0.15);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 16px;
  line-height: 1.4;
  text-align: center;
}

.verification-step {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.verification-label {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.primary-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(159, 122, 234, 0.2);
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(159, 122, 234, 0.35);
}

.primary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary-btn.verified {
  background: var(--ok);
  color: #fff;
  box-shadow: 0 4px 15px rgba(56, 161, 105, 0.2);
}

/* ── Footer / Language Selector ── */
.login-footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.lang-selector {
  display: inline-flex;
  gap: 6px;
  background: var(--input-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 20px;
}

.lang-selector a {
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.lang-selector a.active {
  color: var(--foreground);
  background: var(--border);
}

.lang-selector a:hover:not(.active) {
  color: var(--foreground);
}

.theme-selector {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.theme-selector {
  display: none !important;
}

/* ── Suspended Page Styles ───────────────────────────────────────────────── */
.suspended-container {
  text-align: center;
  padding: 10px 0;
}
.suspended-icon {
  margin-bottom: 20px;
  stroke: var(--danger);
  animation: pulse-glow-scale 2s infinite;
}
@keyframes pulse-glow-scale {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}
.suspended-title {
  color: var(--foreground);
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.suspended-text {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}
.suspended-details {
  background: rgba(224, 108, 117, 0.1);
  border: 1px solid rgba(224, 108, 117, 0.2);
  border-radius: 6px;
  padding: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: left;
  line-height: 1.5;
}
.suspended-details strong {
  color: var(--danger);
}

/* ── Terms acceptance gate (clickwrap) ───────────────────────────────────── */
.terms-gate {
  margin: 16px 0;
  text-align: left;
}
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.terms-check input[type='checkbox'] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.terms-box {
  margin-top: 12px;
  border: 1px solid var(--border-solid);
  border-radius: 8px;
  background: var(--input-bg);
  padding: 12px;
}
.terms-scroll {
  max-height: 132px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
  padding-right: 8px;
}
.terms-scroll a {
  color: var(--accent);
  text-decoration: underline;
}
.terms-box .secondary-btn {
  margin-top: 12px;
  width: 100%;
}
.terms-box .secondary-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
