body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* Header */
header {
  position: fixed;
  top: 20px;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
}

.logo-dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-main);
  border-radius: 50%;
  display: inline-block;
  margin: 0 1px;
}

/* Jarak antar link sedikit dirapatkan karena link sekarang punya padding sendiri */
.nav-links {
  display: flex;
  gap: 0.5rem;
  font-size: 0.9rem;
}

/* Beri bentuk pil dan padding pada semua link */
.nav-links a {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  transition:
    background 0.3s ease,
    opacity 0.3s ease;
}

/* Efek hover: muncul lingkaran transparan tipis */
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  opacity: 1;
}

/* Menu yang sedang aktif: muncul pil iOS (tanpa garis bawah) */
.nav-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.15);
  color: var(--accent-text);
  opacity: 1;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Layout */
main {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  padding-top: 180px;
  padding-bottom: 80px;
  padding-left: 5%;
  padding-right: 5%;
  overflow: hidden;
}

main::before {
  content: "";
  position: absolute;
  top: 10%;
  right: 5%;
  width: 700px;
  height: 700px;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.08),
    transparent 65%
  );
  pointer-events: none;
}

main::after {
  content: "";
  position: absolute;
  bottom: -200px;
  left: -150px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.04),
    transparent 65%
  );
  pointer-events: none;
}

.auth {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 5rem;
  align-items: start;
}

/* Sisi kiri */
.intro h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.intro > p {
  color: #cccccc;
  font-size: 1.1rem;
  max-width: 42ch;
  margin-bottom: 2.5rem;
}

.intro-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 460px;
}

.intro-card {
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.intro-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.intro-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Kartu form */
.auth-card {
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 480px;
  justify-self: end;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 1.25rem;
}

.tab {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  color: var(--text-muted);
  transition:
    background 0.3s,
    color 0.3s;
}

.tab[aria-selected="true"] {
  background: var(--text-main);
  color: var(--bg-color);
  font-weight: 500;
}

.tab[aria-selected="false"]:hover {
  color: var(--text-main);
}

.panel-head h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.panel-head p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.field {
  margin-bottom: 0.85rem;
}

.field label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.field label a:hover {
  color: var(--text-main);
  opacity: 1;
}

.input-wrap {
  position: relative;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="password"] {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  padding: 0.9rem 1.25rem;
  color: var(--text-main);
  font-size: 0.95rem;
  transition:
    border-color 0.3s,
    background 0.3s;
}

.field input::placeholder {
  color: #666666;
}

.field input:hover {
  border-color: var(--border-hover);
}

.field input:focus {
  outline: none;
  border-color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.field input[aria-invalid="true"] {
  border-color: var(--bad);
}

.toggle-pw {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toggle-pw:hover {
  color: var(--text-main);
}

.input-wrap input[type="password"],
.input-wrap input.pw-visible {
  padding-right: 5.5rem;
}

.hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.75rem 0 1rem;
}

.check input {
  margin-top: 0.2rem;
  accent-color: #ffffff;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.check a {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-error {
  display: none;
  font-size: 0.85rem;
  color: var(--bad);
  background: rgba(255, 85, 85, 0.08);
  border: 1px solid rgba(255, 85, 85, 0.3);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.form-error.show {
  display: block;
}

.btn-primary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--accent);
  color: var(--accent-ink);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.btn-primary:hover {
  transform: scale(1.02);
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 1rem 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.btn-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 1px solid var(--border-color);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.95rem;
  transition:
    background 0.3s,
    border-color 0.3s;
}

.btn-google:hover {
  background: var(--surface-color);
  border-color: var(--border-hover);
}

.switch-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.switch-note button {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media (max-width: 1024px) {
  .auth {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .intro h1 {
    font-size: 3rem;
  }
  .auth-card {
    justify-self: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-container {
    width: 90%;
  }
  main {
    padding-top: 110px;
  }
  .intro {
    display: none;
  }
  .auth-card {
    padding: 1.75rem;
  }
}

/* BARU */
a.btn-google {
    text-decoration: none;
    color: var(--text-main);
}

a.btn-google:hover {
    opacity: 1;
}
