:root {
  --color-bg: #0f1115;
  --color-card: #171a21;
  --color-border: #262a33;
  --color-text: #e8e9ec;
  --color-muted: #9aa0ab;
  --color-primary: #4f6df5;
  --color-primary-hover: #3d59d6;
  --color-accent: #22c55e;
  --color-focus-ring: #7c8cf8; /* pengganti outline biru bawaan browser */
  --color-error-bg: #3a1c22;
  --color-error-text: #f4a5ae;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 12% 8%, rgba(79, 109, 245, 0.14), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(34, 197, 94, 0.12), transparent 45%),
    var(--color-bg);
  color: var(--color-text);
  font-family: "Segoe UI", Roboto, -apple-system, sans-serif;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.auth-brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

/* ==================== Toggle Masuk / Daftar ==================== */
.auth-tabs {
  display: flex;
  background: #0f1115;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 18px;
}

.auth-tab {
  flex: 1;
  padding: 9px 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--color-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.auth-tab.is-active {
  background: var(--color-primary);
  color: #fff;
}

.auth-tab:not(.is-active):hover {
  color: var(--color-text);
}

.auth-subtitle {
  color: var(--color-muted);
  font-size: 0.88rem;
  margin: 0 0 18px;
  min-height: 2.6em;
}

.auth-error {
  background: var(--color-error-bg);
  color: var(--color-error-text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-align: left;
}

#captcha-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  min-height: 78px; /* jaga layout tetap stabil selagi widget captcha dimuat */
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, opacity 0.15s ease, transform 0.1s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

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

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:not(:disabled):hover {
  background: var(--color-primary-hover);
}

/* Ganti outline biru bawaan browser dengan focus ring custom yang konsisten
   dengan tema, tapi tetap ada indikator fokus untuk aksesibilitas keyboard. */
button:focus,
input:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-focus-ring) 45%, transparent);
}

.auth-footnote {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--color-muted);
}

.auth-legal {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 0.76rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.auth-legal a {
  color: var(--color-accent);
  text-decoration: none;
}

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