/* =========================================================
   Lambda Billing - halaman auth (login, register, logout, error)
   Dimuat setelah app.css oleh layouts/auth.php
   ========================================================= */
.auth-body {
  --auth-font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-family: var(--auth-font);
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgba(59, 130, 246, .10), transparent 40%),
    radial-gradient(circle at 92% 88%, rgba(2, 132, 199, .10), transparent 45%),
    #f4f8fe;
}
.auth-body h1, .auth-body h2, .auth-body h3 { font-family: var(--auth-font); }

.auth-shell { width: min(1180px, calc(100% - 3rem)); margin-inline: auto; }

/* ---------- Navigasi dari landing page ---------- */
.auth-site-header {
  position: relative; z-index: 20; background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #e8eef7; box-shadow: 0 8px 28px rgba(15, 23, 42, .05);
  backdrop-filter: blur(16px);
}
.auth-site-header__inner {
  min-height: 76px; display: flex; align-items: center; gap: 2rem;
}
.auth-site-home {
  display: inline-flex; align-items: center; gap: .7rem; flex-shrink: 0;
  color: #0f172a; font-size: .94rem; font-weight: 700;
}
.auth-site-home:hover { color: var(--primary-600); text-decoration: none; }
.auth-site-home__icon {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  color: #fff; background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
}
.auth-site-nav { display: flex; align-items: center; justify-content: center; gap: 1.6rem; flex: 1; }
.auth-site-nav a {
  position: relative; color: #475569; font-size: .86rem; font-weight: 600; white-space: nowrap;
}
.auth-site-nav a::after {
  content: ""; position: absolute; right: 0; bottom: -.55rem; left: 0; height: 2px;
  border-radius: 999px; background: #2563eb; transform: scaleX(0); transition: transform .18s ease;
}
.auth-site-nav a:hover { color: #2563eb; text-decoration: none; }
.auth-site-nav a:hover::after { transform: scaleX(1); }
.auth-site-header__cta { min-width: 96px; border-radius: 10px; }

.auth {
  min-height: calc(100vh - 76px); max-width: 1180px; margin: 0 auto; padding: 3rem 2rem;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 2.5rem; align-items: center;
}

/* ---------- Panel kiri: maskot + sambutan ---------- */
.auth-hero {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  padding: 2.5rem 2.25rem; border-radius: 28px; overflow: hidden; align-self: stretch;
  background:
    radial-gradient(circle at 30% 25%, #ffffff 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(160deg, #eaf3ff 0%, #f5f9ff 60%, #eef6ff 100%);
}
.auth-hero::before,
.auth-hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(37, 99, 235, .07);
}
.auth-hero::before { width: 420px; height: 420px; top: -140px; left: -120px; }
.auth-hero::after { width: 300px; height: 300px; bottom: -120px; right: -90px; }

.auth-hero__mascot {
  position: relative; width: 100%; max-width: 560px; height: auto; margin: 0 auto;
  filter: drop-shadow(0 18px 30px rgba(37, 99, 235, .18));
}
.auth-hero__mascot--square { max-width: 360px; }
.auth-hero__copy { position: relative; margin-top: 1.25rem; }

/* ---------- Halaman error (memakai kartu kanan auth) ---------- */
.auth-error__eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border-radius: 999px;
  background: #eaf3ff; color: #1d4ed8; font-size: .78rem; font-weight: 600;
}
.auth-error__code {
  margin: .9rem 0 .35rem; font-size: clamp(4rem, 9vw, 6rem); font-weight: 800; line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(135deg, #1d4ed8 0%, #38bdf8 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.auth-error .auth-card__header { margin-bottom: 1.25rem; }
.auth-error__detail {
  display: flex; align-items: flex-start; gap: .55rem; margin: 0 0 1.25rem; padding: .8rem 1rem; border: 1px solid #e3ebf7;
  border-radius: 14px; background: #f7faff; color: #475569; font-size: .85rem; line-height: 1.55; overflow-wrap: anywhere;
}
.auth-error__detail i { margin-top: .2rem; color: #2563eb; }
.auth-error__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }

@media (max-width: 520px) {
  .auth-error__actions { grid-template-columns: 1fr; }
}
.auth-hero__title {
  font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 800; line-height: 1.15;
  letter-spacing: -.02em; color: #0b1324; margin: 0 0 1rem;
}
.auth-hero__text { font-size: 1rem; line-height: 1.75; color: #556175; margin: 0; max-width: 34rem; }

/* ---------- Kartu form kanan ---------- */
.auth-card {
  width: 100%; max-width: 480px; justify-self: center;
  background: #fff; border: 1px solid #e8eef7; border-radius: 24px;
  padding: 2.5rem 2.25rem 1.75rem;
  box-shadow: 0 2px 4px rgba(15, 23, 42, .03), 0 24px 60px rgba(37, 99, 235, .10);
}
.auth-card__header { margin-bottom: 1.5rem; }
.auth-card__header h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: .4rem; }
.auth-card__header p { margin: 0; color: #64748b; font-size: .92rem; }

/* ---------- Field dengan ikon ---------- */
.auth-card .form { gap: 1.05rem; }
.auth-card .form--compact { gap: .85rem; }
.auth-card .field label { font-size: .875rem; color: #0f172a; margin-bottom: .4rem; }
.auth-card .field input:not([type="checkbox"]) {
  height: 48px; padding: 0 1rem; border-radius: 12px; border-color: #dfe6f0;
  font-size: .92rem; background: #fff;
}
.auth-card .field input::placeholder { color: #9aa6b8; }
.auth-card .field--error input:not([type="checkbox"]) { border-color: var(--red-600); }

.field__control { position: relative; }
.field__control--icon input { padding-left: 2.85rem !important; }
.field__control--toggle input { padding-right: 3rem !important; }
.field__icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: #7b879b; font-size: 1rem; width: 1.1rem; text-align: center; pointer-events: none;
}
.field__control:focus-within .field__icon { color: var(--primary-600); }
.field__toggle {
  position: absolute; right: .4rem; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: #64748b; cursor: pointer;
}
.field__toggle:hover { color: var(--primary-600); background: var(--primary-50); }
.field__toggle:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 0; }

/* ---------- Checkbox & baris opsi ---------- */
.checkbox {
  display: inline-flex; align-items: flex-start; gap: .6rem; cursor: pointer;
  font-size: .875rem; color: #334155; font-weight: 500; margin: 0 !important;
}
.checkbox input {
  width: 18px; height: 18px; margin: .1rem 0 0; flex-shrink: 0;
  accent-color: var(--primary-600); cursor: pointer;
}
.checkbox a { font-weight: 600; }
.checkbox--terms { line-height: 1.5; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.auth-row__link { font-size: .875rem; font-weight: 600; }

/* ---------- Tombol ---------- */
.auth-body .btn { font-family: var(--auth-font); }
.btn--lg { height: 50px; border-radius: 12px; font-size: .98rem; }

.auth-switch { margin: 1.1rem 0 0; font-size: .9rem; text-align: center; color: #64748b; }
.auth-switch a { font-weight: 600; }

/* ---------- Footer dari landing page ---------- */
.auth-site-footer { color: #cbd5e1; background: #07152d; }
.auth-site-footer__grid {
  display: grid; grid-template-columns: 1.35fr .8fr 1fr 1.15fr;
  gap: 3rem; padding-top: 3.5rem; padding-bottom: 3rem;
}
.auth-site-footer h2,
.auth-site-footer h3 { color: #fff; }
.auth-site-footer__intro h2 { margin-bottom: 1rem; font-size: 1.35rem; }
.auth-site-footer__intro p { max-width: 340px; margin: 0; color: #9fb0c8; font-size: .88rem; line-height: 1.8; }
.auth-site-footer__col h3 { margin-bottom: 1rem; font-size: .95rem; }
.auth-site-footer ul { margin: 0; padding: 0; list-style: none; }
.auth-site-footer li + li { margin-top: .65rem; }
.auth-site-footer a { color: #9fb0c8; font-size: .84rem; }
.auth-site-footer a:hover { color: #fff; text-decoration: none; }
.auth-site-footer__contact li { display: flex; align-items: flex-start; gap: .7rem; color: #9fb0c8; font-size: .84rem; }
.auth-site-footer__contact i { width: 1rem; margin-top: .22rem; color: #38bdf8; text-align: center; }
.auth-site-footer__bottom { border-top: 1px solid rgba(148, 163, 184, .16); }
.auth-site-footer__bottom p { margin: 0; padding: 1.15rem 0; color: #7f91aa; font-size: .8rem; }
.auth-site-footer__bottom strong { color: #b9c5d6; }

/* ---------- Responsif ---------- */
@media (max-width: 1024px) {
  .auth-site-header__inner { gap: 1.25rem; }
  .auth-site-nav { gap: 1rem; }
  .auth-site-nav a { font-size: .8rem; }
  .auth { gap: 1.5rem; padding: 1.5rem; }
  .auth-hero { padding: 2rem 1.75rem; }
  .auth-card { padding: 2rem 1.75rem 1.5rem; }
  .auth-site-footer__grid { grid-template-columns: 1.35fr repeat(3, 1fr); gap: 1.5rem; }
}

@media (max-width: 820px) {
  .auth-shell { width: min(100% - 2rem, 680px); }
  .auth-site-header__inner { min-height: auto; padding-block: .8rem; flex-wrap: wrap; }
  .auth-site-home { margin-right: auto; }
  .auth-site-header__cta { min-width: auto; }
  .auth-site-nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; padding: .2rem 0 .4rem; }
  .auth { grid-template-columns: 1fr; padding: 1rem; gap: 1rem; align-items: start; align-content: start; }
  .auth-hero { padding: 1.75rem 1.5rem; text-align: center; align-self: auto; }
  .auth-hero__mascot { max-width: 320px; margin-top: 0; }
  .auth-hero__copy { margin-top: .75rem; }
  .auth-hero__title { font-size: 1.6rem; margin-bottom: .6rem; }
  .auth-hero__text { font-size: .9rem; line-height: 1.65; margin: 0 auto; }
  .auth-card { max-width: 560px; }
  .auth-site-footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .auth-shell { width: calc(100% - 1.5rem); }
  .auth-site-home { font-size: .84rem; }
  .auth-site-home__icon { width: 34px; height: 34px; }
  .auth-site-header__cta { padding: .55rem .75rem; font-size: .8rem; }
  .auth-site-nav { gap: 1.15rem; }
  .auth { padding: .75rem; }
  .auth-hero { border-radius: 22px; padding: 1.5rem 1.1rem; }
  .auth-hero__mascot { max-width: 260px; }
  .auth-hero__title { font-size: 1.4rem; }
  .auth-card { padding: 1.6rem 1.15rem 1.25rem; border-radius: 20px; }
  .auth-card__header h1 { font-size: 1.5rem; }
  .auth-site-footer__grid { grid-template-columns: 1fr; gap: 2rem; padding-top: 2.5rem; padding-bottom: 2.25rem; }
}
