/* ASN Cemerlang � Auth (login / register / reset) */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --navy-900: #0d1a3a;
  --navy-800: #142050;
  --navy-700: #1b2b6b;
  --navy-600: #223382;
  --navy-100: #e8ecff;
  --navy-50: #f3f5ff;
  --gold-500: #c9a02a;
  --gold-400: #d4af37;
  --gold-100: #fef9e7;
  --red-600: #c41c1c;
  --red-50: #fff5f5;
  --green-700: #15803d;
  --green-50: #f0fdf4;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #fff;
  --border: #dde2f0;
  --shadow-lg: 0 20px 56px rgba(27, 43, 107, 0.12);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
}

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

html { scroll-behavior: smooth; }

body.auth-page {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--gray-900);
  min-height: 100vh;
  background: var(--gray-50);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

/* ---- Brand panel ---- */
.auth-brand {
  position: relative;
  padding: 2.5rem 2.75rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(212, 175, 55, 0.18), transparent 42%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.06), transparent 40%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 55%, #081028 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.auth-brand-top,
.auth-brand-body,
.auth-brand-foot {
  position: relative;
  z-index: 1;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  transition: all 0.25s ease;
  width: fit-content;
}

.auth-back:hover {
  color: #fff;
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.auth-brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 2.5rem 0 2rem;
}

.auth-brand-logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  padding: 0.35rem;
}

.auth-brand-logo strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
}

.auth-brand-logo span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.auth-brand h1 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.85rem;
  max-width: 16ch;
}

.auth-brand-lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 34rem;
  margin-bottom: 1.75rem;
}

.auth-features {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin-bottom: auto;
}

.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-features i {
  color: var(--gold-400);
  margin-top: 0.15rem;
  font-size: 0.95rem;
}

.auth-features strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.auth-features span {
  display: block;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.45;
}

.auth-brand-foot {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ---- Form panel ---- */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  animation: auth-in 0.45s ease both;
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-mobile-logo {
  display: none;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.auth-mobile-logo img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  padding: 0.25rem;
  box-shadow: var(--shadow-lg);
}

.auth-mobile-logo strong {
  font-size: 1rem;
  color: var(--navy-900);
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--navy-50);
  border: 1px solid rgba(27, 43, 107, 0.12);
  color: var(--navy-700);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.auth-kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red-600);
  animation: auth-blink 1.8s ease-in-out infinite;
}

@keyframes auth-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.auth-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--gray-500);
  line-height: 1.55;
  margin-bottom: 1.35rem;
}

.auth-alert {
  border-radius: var(--r-sm);
  padding: 0.85rem 0.95rem;
  font-size: 0.84rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.45;
}

.auth-alert-danger {
  background: var(--red-50);
  border: 1px solid rgba(196, 28, 28, 0.18);
  color: #991b1b;
}

.auth-alert-success {
  background: var(--green-50);
  border: 1px solid rgba(21, 128, 61, 0.18);
  color: var(--green-700);
}

.auth-field {
  margin-bottom: 1rem;
}

.auth-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}

.auth-label small {
  font-weight: 600;
  color: var(--navy-600);
}

.auth-input-wrap {
  position: relative;
}

.auth-input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 0.88rem;
  pointer-events: none;
}

.auth-input,
.auth-select {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--r-sm);
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.72rem 2.5rem 0.72rem 2.45rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input:focus,
.auth-select:focus {
  border-color: var(--navy-600);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(27, 43, 107, 0.08);
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--navy-600);
}

.auth-toggle-pass {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0.25rem;
}

.auth-toggle-pass:hover { color: var(--navy-700); }

.auth-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -0.25rem 0 1rem;
}

.auth-link {
  color: var(--navy-700);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-link:hover { color: var(--red-600); text-decoration: underline; }

.auth-btn {
  width: 100%;
  border: 0;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.auth-btn-primary {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: #fff;
  box-shadow: 0 8px 22px rgba(27, 43, 107, 0.28);
}

.auth-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(27, 43, 107, 0.34);
}

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

.auth-btn-secondary {
  margin-top: 0.65rem;
  background: transparent;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  text-decoration: none;
}

.auth-btn-secondary:hover {
  background: var(--navy-50);
  border-color: rgba(27, 43, 107, 0.18);
  color: var(--navy-800);
}

.auth-btn-google {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-700);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  text-decoration: none;
}

.auth-btn-google:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-900);
}

.auth-google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-divider-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 0.85rem;
  color: var(--gray-400);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider-text::before,
.auth-divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.auth-perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.auth-perk {
  text-align: center;
  background: var(--gold-100);
  border: 1px solid rgba(201, 160, 42, 0.18);
  border-radius: 0.75rem;
  padding: 0.55rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--navy-800);
  line-height: 1.35;
}

.auth-perk i {
  display: block;
  color: var(--gold-500);
  margin-bottom: 0.25rem;
}

.auth-foot {
  margin-top: 1.35rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--gray-500);
}

.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.85rem;
}

.auth-grid-2 .auth-field.full { grid-column: 1 / -1; }

.auth-info {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: var(--navy-50);
  border: 1px solid rgba(27, 43, 107, 0.1);
  border-radius: var(--r-sm);
  padding: 0.75rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: var(--gray-700);
  line-height: 1.55;
}

.auth-info i { color: var(--navy-600); margin-top: 0.1rem; }

.auth-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.auth-step {
  flex: 1;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-400);
}

.auth-step-num {
  width: 26px;
  height: 26px;
  margin: 0 auto 0.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  font-size: 0.72rem;
}

.auth-step.is-active { color: var(--navy-700); }
.auth-step.is-active .auth-step-num {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: #fff;
}

.auth-strength {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.45rem;
}

.auth-strength span {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--gray-200);
  transition: background 0.25s;
}

.auth-strength-label {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gray-400);
}

/* Modal */
.auth-modal .modal-content {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.auth-modal .modal-header,
.auth-modal .modal-footer {
  border-color: var(--gray-200);
}

.auth-modal .modal-title {
  font-weight: 800;
  color: var(--navy-900);
}

.auth-mobile-top {
  display: none;
}

.auth-mobile-wrap {
  display: contents;
}

@media (max-width: 960px) {
  body.auth-page {
    background: var(--white);
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .auth-brand {
    display: none;
  }

  .auth-main {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    min-height: 100vh;
  }

  .auth-mobile-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    max-width: 480px;
    margin: 0 auto;
  }

  .auth-mobile-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    padding: 0.85rem 1rem;
    padding-top: max(0.85rem, env(safe-area-inset-top));
    border-bottom: 1px solid var(--gray-100);
    background: var(--white);
  }

  .auth-mobile-back {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 1rem;
  }

  .auth-mobile-back:active {
    background: var(--gray-100);
  }

  .auth-mobile-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    padding: 0 2.75rem;
  }

  .auth-mobile-brand strong {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--navy-900);
    line-height: 1.2;
  }

  .auth-mobile-top-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 50%;
  }

  .auth-card {
    flex: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1.25rem 1.25rem 1.75rem;
    animation: none;
  }

  .auth-mobile-logo,
  .auth-kicker,
  .auth-steps,
  .auth-perks {
    display: none !important;
  }

  .auth-title {
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.3rem;
  }

  .auth-subtitle {
    font-size: 0.84rem;
    text-align: center;
    margin-bottom: 1.25rem;
    line-height: 1.5;
  }

  .auth-field {
    margin-bottom: 0.9rem;
  }

  .auth-input,
  .auth-select {
    font-size: 16px; /* cegah zoom iOS */
    padding-top: 0.78rem;
    padding-bottom: 0.78rem;
  }

  .auth-btn {
    padding: 0.9rem 1rem;
  }

  .auth-btn-primary {
    box-shadow: 0 4px 14px rgba(27, 43, 107, 0.22);
  }

  .auth-info {
    background: transparent;
    border: 0;
    padding: 0;
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
    text-align: center;
  }

  .auth-info i {
    display: none;
  }

  .auth-row {
    margin-bottom: 0.85rem;
  }

  .auth-divider-text {
    margin: 0.75rem 0 0.65rem;
    font-size: 0.7rem;
  }

  .auth-foot {
    margin-top: 1.25rem;
    font-size: 0.74rem;
    line-height: 1.5;
    color: var(--gray-400);
  }
}

@media (max-width: 520px) {
  .auth-grid-2 {
    grid-template-columns: 1fr;
  }

  .auth-perks {
    grid-template-columns: 1fr;
  }
}
