/* ==========================================================================
   Salam Ganesha Academy - Auth v3 (/v3/auth/*)
   Dasar desain: Antigravity (form kiri) + panel kanan tumpukan kartu.
   Dipakai oleh resources/views/auth/v3/*.
   ========================================================================== */

:root {
  --sg-navy: #003152;
  --sg-blue: #00699F;
  --sg-cyan: #00AEEF;

  --canvas-bg: #e7eef5;
  --surface-white: #ffffff;
  --input-well: #f3f6fa;
  --border-subtle: #dde5ee;
  --border-hover: #c1cedc;

  --ink-strong: #0f1c2e;
  --ink-body: #475569;
  --ink-muted: #64748b;
  --ink-placeholder: #94a3b8;

  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --success: #059669;
  --success-bg: #ecfdf5;
  --warning: #d97706;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease: 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  --focus-ring: 0 0 0 3.5px rgba(0, 105, 159, 0.22);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink-body);
  background: var(--canvas-bg);
  line-height: 1.5;
}

a {
  color: var(--sg-blue);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover {
  color: var(--sg-navy);
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

img {
  max-width: 100%;
  display: block;
}

/* ==========================================================================
   Bingkai halaman
   ========================================================================== */

.page-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 2.5vw, 2rem);
}

.auth-frame {
  width: 100%;
  max-width: 1120px;
  min-height: 670px;
  display: grid;
  grid-template-columns: minmax(0, 47%) minmax(0, 53%);
  background: var(--surface-white);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 30px 70px -20px rgba(0, 34, 62, 0.22),
    0 10px 26px -10px rgba(0, 49, 82, 0.12),
    0 0 0 1px rgba(0, 49, 82, 0.06);
  overflow: hidden;
}

/* ==========================================================================
   Kolom kiri: logo, isi halaman, footer
   ========================================================================== */

.auth-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 3vw, 2.4rem) clamp(1.5rem, 3.6vw, 3rem);
  background: var(--surface-white);
}

.left-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-white);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  box-shadow: 0 1px 2px rgba(15, 28, 46, 0.04);
  transition: all var(--ease);
}

.back-btn:hover {
  color: var(--ink-strong);
  border-color: var(--border-hover);
  background: #f8fafc;
}

.form-wrap {
  width: 100%;
  max-width: 410px;
  margin: auto;
  padding: 0.75rem 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.left-footer {
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.left-footer a {
  color: var(--ink-muted);
}

.left-footer a:hover {
  color: var(--ink-strong);
}

/* ==========================================================================
   Tab Masuk / Daftar Akun (penanda putih bergeser mengikuti data-mode)
   ========================================================================== */

.mode-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #eff3f8;
  border: 1px solid #e2e9f1;
  margin-bottom: 1.5rem;
}

.mode-switch::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 6px);
  border-radius: 8px;
  background: var(--surface-white);
  box-shadow:
    0 2px 6px rgba(0, 49, 82, 0.08),
    0 1px 2px rgba(0, 49, 82, 0.05);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.mode-switch[data-mode="sign-up"]::before {
  transform: translateX(calc(100% + 4px));
}

.mode-tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color var(--ease);
}

.mode-tab:hover,
.mode-tab.is-active {
  color: var(--sg-navy);
}

/* ==========================================================================
   Panel tab: form Masuk dan Daftar ditumpuk, hanya satu yang tampil
   ========================================================================== */

.auth-panes {
  display: grid;
}

/* Saat pindah tab: tinggi beranimasi, potong vertikal saja supaya geser horizontal tetap utuh */
.auth-panes.is-switching {
  overflow-x: visible;
  overflow-y: clip;
  transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-pane {
  grid-area: 1 / 1;
  align-self: start;
  min-width: 0;
}

.auth-pane[hidden] {
  display: none;
}

.auth-pane.is-entering {
  position: relative;
  z-index: 2;
}

.auth-pane .form-title:focus {
  outline: none;
}

/* ==========================================================================
   Judul form
   ========================================================================== */

.form-header {
  margin-bottom: 1.4rem;
}

.form-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 2.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ink-strong);
}

.form-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Isian form
   ========================================================================== */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 0.8rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.field-label {
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--ink-strong);
}

.field-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sg-blue);
}

.field-link:hover {
  text-decoration: underline;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-input {
  width: 100%;
  height: 45px;
  padding: 0 0.9rem;
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 500;
  color: var(--ink-strong);
  background: var(--input-well);
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(15, 28, 46, 0.04);
  outline: none;
  transition: border-color var(--ease), background-color var(--ease), box-shadow var(--ease);
}

.field-input.has-toggle {
  padding-right: 2.75rem;
}

.field-input::placeholder {
  color: var(--ink-placeholder);
  font-weight: 400;
}

.field-input:hover {
  border-color: var(--border-hover);
}

.field-input:focus {
  background: var(--surface-white);
  border-color: var(--sg-blue);
  box-shadow: 0 0 0 3.5px rgba(0, 105, 159, 0.13);
}

.field-group.is-invalid .field-input {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.field-group.is-invalid .field-input:focus {
  box-shadow: 0 0 0 3.5px rgba(220, 38, 38, 0.12);
}

.field-error {
  display: none;
  margin: 0;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--danger);
}

.field-group.is-invalid .field-error {
  display: block;
}

/* Tombol mata (tampilkan password) */
.toggle-pw {
  position: absolute;
  right: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color var(--ease), background-color var(--ease);
}

.toggle-pw:hover {
  color: var(--ink-strong);
  background: rgba(15, 28, 46, 0.06);
}

.toggle-pw svg {
  width: 17px;
  height: 17px;
}

.toggle-pw .icon-eye-off,
.toggle-pw[aria-pressed="true"] .icon-eye {
  display: none;
}

.toggle-pw[aria-pressed="true"] .icon-eye-off {
  display: block;
}

/* Indikator password: syarat server (8 karakter + angka) dulu, baru kekuatan */
.pw-strength {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.1rem;
}

.pw-strength.is-visible {
  display: flex;
}

.pw-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.28rem;
}

.pw-bar {
  height: 3.5px;
  border-radius: 99px;
  background: #e2e8f0;
  transition: background-color 0.2s ease;
}

.pw-strength[data-level="1"] .pw-bar:nth-child(1) { background: var(--danger); }
.pw-strength[data-level="2"] .pw-bar:nth-child(-n+2) { background: var(--warning); }
.pw-strength[data-level="3"] .pw-bar:nth-child(-n+3) { background: var(--sg-blue); }
.pw-strength[data-level="4"] .pw-bar { background: var(--success); }

.pw-strength-text {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--ink-muted);
}

/* Checkbox */
.checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: var(--ink-body);
  cursor: pointer;
  user-select: none;
}

.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.checkbox-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 5px;
  border: 1.5px solid var(--border-hover);
  background: var(--input-well);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all var(--ease);
}

.checkbox-box svg {
  width: 11px;
  height: 11px;
  opacity: 0;
}

.checkbox-input:checked + .checkbox-box {
  background: var(--sg-blue);
  border-color: var(--sg-blue);
  box-shadow: 0 2px 6px rgba(0, 105, 159, 0.3);
}

.checkbox-input:checked + .checkbox-box svg {
  opacity: 1;
}

.checkbox-input:focus-visible + .checkbox-box {
  box-shadow: 0 0 0 3.5px rgba(0, 105, 159, 0.14);
}

.field-group.is-invalid .checkbox-box {
  border-color: var(--danger);
}

.checkbox-label a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Tombol utama */
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 48px;
  margin-top: 0.25rem;
  padding: 0 1.25rem;
  border: 1px solid #005887;
  border-radius: 10px;
  background: linear-gradient(180deg, #0077b5 0%, #005d90 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 22px -8px rgba(0, 93, 144, 0.55),
    0 2px 4px rgba(0, 49, 82, 0.16);
  transition: transform var(--ease), box-shadow var(--ease), filter var(--ease);
}

.btn-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  color: #ffffff;
}

.btn-submit:active {
  transform: translateY(1px);
}

.btn-submit:disabled {
  cursor: progress;
  opacity: 0.85;
  transform: none;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-submit.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pesan di atas form */
.form-alert {
  display: none;
  padding: 0.75rem 0.9rem;
  border-radius: 9px;
  font-size: 0.83rem;
  font-weight: 500;
  margin-bottom: 0.9rem;
}

.form-alert.is-visible {
  display: block;
}

.form-alert.is-error {
  background: var(--danger-bg);
  border: 1px solid #fecaca;
  color: var(--danger);
}

.form-alert.is-success {
  background: var(--success-bg);
  border: 1px solid #a7f3d0;
  color: var(--success);
}

/* Hitung mundur percobaan: angka lebar tetap supaya teks tidak bergoyang */
.countdown,
.btn-submit:disabled .btn-label {
  font-variant-numeric: tabular-nums;
}

/* Status selesai setelah daftar */
.form-done {
  display: none;
  text-align: center;
  padding: 1.25rem 0 0.5rem;
}

.auth-pane.is-done .form-header,
.auth-pane.is-done .form-alert,
.auth-pane.is-done .auth-form {
  display: none;
}

.auth-pane.is-done .form-done {
  display: block;
}

.done-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: #eaf6fc;
  color: var(--sg-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.done-icon svg {
  width: 26px;
  height: 26px;
}

.done-text {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Login Google: tombol putih dengan logo G asli (panduan merek Google)
   ========================================================================== */

.auth-social {
  margin-top: 1.1rem;
}

.auth-pane.is-done .auth-social {
  display: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink-strong);
  font-size: 0.94rem;
  font-weight: 600;
  transition: border-color var(--ease), background-color var(--ease);
}

.btn-google:hover {
  border-color: var(--border-hover);
  background: #f8fafc;
  color: var(--ink-strong);
}

.btn-google svg {
  width: 18px;
  height: 18px;
}

/* Kartu akun Google di halaman "Satu langkah lagi" */
.google-account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--input-well);
}

.google-account-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sg-navy);
  color: #ffffff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.google-account strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--ink-strong);
}

.google-account div span {
  font-size: 0.8rem;
  color: var(--ink-muted);
  word-break: break-all;
}

.google-account-tag {
  flex-shrink: 0;
  margin-left: auto;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.switch-account {
  margin: 1.1rem 0 0;
  font-size: 0.85rem;
  text-align: center;
  color: var(--ink-muted);
}

.switch-account a {
  font-weight: 600;
}

/* ==========================================================================
   Panel kanan: navy polos + garis "Cakrawala" (motif katalog /course)
   ========================================================================== */

.auth-right {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 3.6vw, 3rem);
  background: var(--sg-navy);
  color: #ffffff;
  overflow: hidden;
}

.sga-contour {
  position: absolute;
  top: 30%;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

.sga-contour::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 300' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%2365c7ee'%3E%3Cpath vector-effect='non-scaling-stroke' stroke-opacity='0.16' stroke-width='1' d='M0,50 C233,36 467,36 700,50 S1167,64 1400,50'/%3E%3Cpath vector-effect='non-scaling-stroke' stroke-opacity='0.16' stroke-width='1' d='M0,88 C233,72 467,72 700,88 S1167,104 1400,88'/%3E%3Cpath vector-effect='non-scaling-stroke' stroke-opacity='0.5' stroke-width='1.4' d='M0,126 C233,108 467,108 700,126 S1167,144 1400,126'/%3E%3Cpath vector-effect='non-scaling-stroke' stroke-opacity='0.16' stroke-width='1' d='M0,164 C233,144 467,144 700,164 S1167,184 1400,164'/%3E%3Cpath vector-effect='non-scaling-stroke' stroke-opacity='0.16' stroke-width='1' d='M0,202 C233,180 467,180 700,202 S1167,224 1400,202'/%3E%3Cpath vector-effect='non-scaling-stroke' stroke-opacity='0.16' stroke-width='1' d='M0,240 C233,216 467,216 700,240 S1167,264 1400,240'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 50% 228px;
  will-change: transform;
  animation: sga-contour-flow 170s linear infinite;
}

@keyframes sga-contour-flow {
  to {
    transform: translateX(-50%);
  }
}

.showcase-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.showcase-brand-tag {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(219, 241, 252, 0.85);
}

.showcase-domain {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}

.ui-composition {
  position: relative;
  z-index: 2;
  margin: auto 0;
  padding: 2rem 0 1.5rem;
}

.showcase-foot {
  position: relative;
  z-index: 2;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.showcase-caption {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(235, 246, 252, 0.88);
}

/* ==========================================================================
   Tumpukan kartu kiri-kanan: kartu aktif di tengah. Saat berganti, kartu aktif mundur ke
   tumpukan samping dan kartu berikutnya maju dari tumpukan seberang (assets/js/auth-v3-panel.js).
   ========================================================================== */

.stack-slider {
  display: flex;
  flex-direction: column;
}

.stack-deck {
  position: relative;
  height: 310px;
  margin: 0 48px;
  touch-action: pan-y;
  cursor: grab;
}

.stack-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.4rem 1.45rem;
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink-strong);
  box-shadow:
    0 24px 48px -20px rgba(0, 10, 20, 0.6),
    0 6px 16px -8px rgba(0, 25, 48, 0.35);
  /* Percepatan dan perlambatan seimbang (ease-in-out) supaya pergantian terasa halus, bukan menyentak */
  transition:
    transform 0.9s cubic-bezier(0.45, 0, 0.2, 1),
    opacity 0.9s ease,
    background-color 0.45s ease;
  user-select: none;
}

/* Kartu di tumpukan tampil polos: isinya disembunyikan supaya teks tidak tembus di tepi.
   Isi kartu yang maju muncul sambil kartunya bergerak ke tengah; isi kartu yang mundur hilang cepat. */
.stack-card > * {
  transition: opacity 0.45s ease 0.18s;
}

.stack-card:not([data-rel="0"]) > * {
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* Geser = setengah selisih lebar karena skala + bagian yang mengintip (22px / 44px) */
.stack-card[data-rel="0"] { z-index: 5; transform: none; }
.stack-card[data-rel="1"] { z-index: 4; transform: translateX(calc(4% + 22px)) scale(0.92); background: #c9d8e6; }
.stack-card[data-rel="-1"] { z-index: 4; transform: translateX(calc(-4% - 22px)) scale(0.92); background: #c9d8e6; }
.stack-card[data-rel="2"] { z-index: 3; transform: translateX(calc(8% + 44px)) scale(0.84); background: #7f9db8; }
.stack-card[data-rel="-2"] { z-index: 3; transform: translateX(calc(-8% - 44px)) scale(0.84); background: #7f9db8; }
.stack-card[data-rel="far"] { z-index: 1; transform: scale(0.84); opacity: 0; }

/* Kartu yang pindah dari ujung kiri ke ujung kanan (atau sebaliknya) dipindah diam-diam dalam keadaan
   transparan, lalu memudar masuk di posisi barunya (lihat auth-v3-panel.js) */
.stack-card.is-jump {
  transition: none;
  opacity: 0;
}

.course-tag {
  align-self: flex-start;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  background: #eaf6fc;
  color: var(--sg-blue);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stack-title {
  margin: 0.3rem 0 0;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.stack-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.stack-visual {
  margin-top: auto;
}

/* Isi visual tiap kartu */
.stack-org,
.stack-person,
.stack-cert {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
}

.stack-org {
  background: #f5f8fc;
  border: 1px solid #e3ebf3;
}

.stack-person {
  background: #fbf6ec;
  border: 1px solid #f1e2c4;
}

.stack-cert {
  background: var(--sg-navy);
}

.stack-org strong,
.stack-person strong,
.stack-cert strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.3;
}

.stack-org div span,
.stack-person div span {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.stack-cert strong {
  color: #ffffff;
}

.stack-cert div span {
  font-size: 0.76rem;
  color: rgba(215, 236, 248, 0.75);
}

/* Kartu "Untuk Eksekutif": kolase foto kelas offline (1 besar + 2 kecil) mengisi sisa tinggi kartu */
.stack-visual--gallery {
  flex: 1;
  min-height: 88px;
  margin-top: 0.4rem;
  display: flex;
}

.stack-gallery {
  flex: 1;
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
}

.stack-gallery figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #dbe7f0;
}

.stack-gallery figure:first-child {
  grid-row: span 2;
}

.stack-gallery img,
.stack-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack-gallery-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-strong);
  font-size: 0.68rem;
  font-weight: 600;
}

/* Kartu bersampul (visual 'cover'): foto selebar kartu di atas, mengisi sisa tinggi; label di atas foto */
.stack-cover {
  position: relative;
  flex: 1;
  min-height: 120px;
  margin: -1.4rem -1.45rem 0.35rem;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #dbe7f0;
}

.stack-cover img {
  object-position: 50% 30%;
}

.stack-cover .course-tag {
  position: absolute;
  left: 1.45rem;
  bottom: 0.75rem;
  background: #ffffff;
}

/* Logo resmi ITB (public/Logo itb 1.png) */
.stack-org-logo {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.stack-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #e3ebf3;
}

.stack-people,
.stack-chips {
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-people {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.stack-people li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.86rem;
}

.stack-people strong {
  font-weight: 600;
}

.stack-people div span {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.stack-photo {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #e3ebf3;
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.stack-chips li {
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  background: #eaf6fc;
  color: var(--sg-navy);
  font-size: 0.8rem;
  font-weight: 600;
}

.cert-seal {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e5b75a 0%, #b9872b 100%);
  color: #16222f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.cert-seal svg {
  width: 20px;
  height: 20px;
}

.stack-qr {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 4px solid #ffffff;
  border-radius: 6px;
  background: repeating-conic-gradient(#0f1c2e 0 25%, #ffffff 0 50%) 0 0 / 9px 9px;
}

/* Navigasi kecil di bawah tumpukan: sengaja redup supaya perhatian tetap di kartu, jelas saat disorot */
.stack-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  margin-top: 2.25rem;
  opacity: 0.6;
  transition: opacity var(--ease);
}

.stack-nav:hover,
.stack-nav:focus-within {
  opacity: 1;
}

.stack-dot,
.stack-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
}

.stack-dot {
  width: 18px;
  height: 24px;
}

.stack-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.4);
  transition: width 0.4s ease, background-color 0.4s ease;
}

.stack-dot[aria-current="true"]::before {
  width: 16px;
  background: #ffffff;
}

.stack-arrow {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.8);
  transition: background-color var(--ease);
}

.stack-arrow:hover {
  background: rgba(255, 255, 255, 0.1);
}

.stack-arrow svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   Responsif
   ========================================================================== */

@media (max-width: 1024px) {
  .auth-frame {
    max-width: 540px;
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .auth-right {
    display: none;
  }

  .auth-left {
    padding: 1.75rem 1.75rem 1.5rem;
  }
}

@media (max-width: 560px) {
  .page-wrap {
    padding: 0.75rem;
  }

  .auth-frame {
    border-radius: 16px;
  }

  .auth-left {
    padding: 1.25rem 1.15rem;
  }

  .brand-logo {
    height: 31px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  /* 16px supaya Safari iOS tidak auto-zoom saat isian disentuh */
  .field-input {
    font-size: 16px;
  }

  .left-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
