/* ============================================================
   AUTH MODERN — Login & Daftar Identity Hub style
   ============================================================ */

:root {
  --am-navy: #0c1b3a;
  --am-navy-2: #132849;
  --am-blue: #2563eb;
  --am-bg: #eef1f7;
  --am-surface: #ffffff;
  --am-ink: #0f172a;
  --am-muted: #64748b;
  --am-line: rgba(15, 23, 42, 0.08);
  --am-radius: 20px;
  --am-shadow: 0 20px 50px -16px rgba(12, 27, 58, 0.28);
}

[data-theme="dark"] {
  --am-bg: #070d18;
  --am-surface: #111827;
  --am-ink: #f1f5f9;
  --am-muted: #94a3b8;
  --am-line: rgba(148, 163, 184, 0.14);
  --am-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

/* Full-page auth layout */
body.auth-modern-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--am-bg);
  color: var(--am-ink);
}

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

@media (max-width: 900px) {
  .auth-modern {
    grid-template-columns: 1fr;
  }
  .auth-modern-visual {
    display: none !important;
  }
}

/* Left visual panel */
.auth-modern-visual {
  position: relative;
  background:
    radial-gradient(ellipse 70% 50% at 20% 20%, rgba(37, 99, 235, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(196, 30, 58, 0.25), transparent 50%),
    linear-gradient(160deg, #0c1b3a 0%, #132849 45%, #1a3560 100%);
  color: #fff;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.auth-modern-visual::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: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, black, transparent);
  pointer-events: none;
}

.auth-visual-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-visual-brand img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #fff;
  padding: 6px;
  object-fit: contain;
}

.auth-visual-brand b {
  display: block;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-visual-brand span {
  font-size: 12.5px;
  opacity: 0.75;
  font-weight: 600;
}

.auth-visual-hero {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.auth-visual-hero h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 14px;
}

.auth-visual-hero p {
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.88;
  margin: 0 0 24px;
}

.auth-visual-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-visual-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0.92;
}

.auth-visual-features .ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.auth-visual-foot {
  position: relative;
  z-index: 1;
  font-size: 12px;
  opacity: 0.55;
}

/* Right form panel */
.auth-modern-panel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--am-bg);
}

.auth-modern-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}

.auth-modern-top a {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--am-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--am-line);
  background: var(--am-surface);
  transition: color 0.15s, border-color 0.15s;
}

.auth-modern-top a:hover {
  color: var(--am-blue);
  border-color: rgba(37, 99, 235, 0.35);
}

.auth-modern-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px 40px;
}

.auth-modern-card {
  width: 100%;
  max-width: 420px;
  background: var(--am-surface);
  border: 1px solid var(--am-line);
  border-radius: var(--am-radius);
  box-shadow: var(--am-shadow);
  padding: 32px 28px 28px;
}

.auth-modern-card.wide {
  max-width: 560px;
}

.auth-modern-card .auth-head {
  text-align: center;
  margin-bottom: 22px;
}

.auth-modern-card .auth-head img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 14px;
  border-radius: 14px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.auth-modern-card .auth-head h1 {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
  color: var(--am-ink);
}

.auth-modern-card .auth-head p {
  font-size: 13.5px;
  color: var(--am-muted);
  margin: 0;
  line-height: 1.45;
}

.auth-modern-card .auth-privacy-box {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--am-muted);
  margin-bottom: 16px;
}

[data-theme="dark"] .auth-modern-card .auth-privacy-box {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.18);
}

.auth-modern-card .auth-privacy-box a {
  color: var(--am-blue);
  font-weight: 700;
}

.auth-modern-card .auth-privacy-box b {
  color: var(--am-ink);
}

.auth-modern-card .form-group {
  margin-bottom: 14px;
}

.auth-modern-card .form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--am-ink);
  margin-bottom: 6px;
}

.auth-modern-card .form-control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--am-line);
  background: var(--am-surface);
  color: var(--am-ink);
  font-family: inherit;
  font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.auth-modern-card .form-control:focus {
  outline: none;
  border-color: var(--am-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

[data-theme="dark"] .auth-modern-card .form-control {
  background: #0b1220;
  border-color: rgba(148, 163, 184, 0.18);
}

.auth-modern-card .btn-submit {
  width: 100%;
  margin-top: 6px;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a3560, #2563eb);
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 10px 24px -6px rgba(37, 99, 235, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}

.auth-modern-card .btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.55);
}

.auth-modern-card .btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-modern-card .auth-footer-note {
  text-align: center;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--am-muted);
}

.auth-modern-card .auth-footer-note a {
  color: var(--am-blue);
  font-weight: 750;
  text-decoration: none;
}

.auth-modern-card .auth-footer-note a:hover {
  text-decoration: underline;
}

.auth-modern-card .auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

@media (max-width: 520px) {
  .auth-modern-card .auth-grid-2 {
    grid-template-columns: 1fr;
  }
  .auth-modern-card {
    padding: 24px 18px 20px;
  }
  .auth-modern-body {
    padding: 8px 14px 32px;
  }
}

.auth-modern-card .auth-msg {
  display: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.auth-modern-card .auth-msg.show {
  display: block;
}

.auth-modern-card .auth-msg.error {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.auth-modern-card .auth-msg.success {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

[data-theme="dark"] .auth-modern-card .auth-msg.error {
  background: rgba(127, 29, 29, 0.35);
  color: #fecaca;
}

[data-theme="dark"] .auth-modern-card .auth-msg.success {
  background: rgba(20, 83, 45, 0.35);
  color: #bbf7d0;
}

/* Hide default site-loader styling clash */
.auth-modern-body .site-loader {
  /* inherits global */
}

.theme-toggle-btn {
  border: 1px solid var(--am-line);
  background: var(--am-surface);
  border-radius: 999px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--am-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle-btn:hover {
  color: var(--am-blue);
  border-color: rgba(37, 99, 235, 0.3);
}

/* Extra modern polish */
.auth-modern-card {
  animation: authCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-modern .btn-submit {
  background: linear-gradient(135deg, #1e3a8a, #2563eb) !important;
  border: none !important;
  border-radius: 12px !important;
  font-weight: 750 !important;
  font-size: 14.5px !important;
  padding: 14px 20px !important;
  box-shadow: 0 10px 24px -6px rgba(37, 99, 235, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}
.auth-modern .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -6px rgba(37, 99, 235, 0.55);
}

.auth-modern .form-control {
  border-radius: 12px !important;
  padding: 13px 16px !important;
  border: 1.5px solid var(--am-line) !important;
  background: var(--am-surface) !important;
  color: var(--am-ink) !important;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-modern .form-control:focus {
  border-color: var(--am-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none;
}

.auth-modern-top a {
  font-weight: 650;
  color: var(--am-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--am-line);
  background: var(--am-surface);
  font-size: 13px;
}
.auth-modern-top a:hover {
  color: var(--am-blue);
  border-color: rgba(37, 99, 235, 0.3);
}
