/*
 * Mailketing UI v2: token warna, dasar, motion, dan komponen halaman auth publik.
 * Halaman publik selalu mode terang; mode gelap hanya untuk dashboard (docs/design.md §2.8).
 * Aturan pemakaian: docs/design.md bagian "Design System v2" dan "Motion v2" (§2.9).
 * Pasangan warna sudah dicek kontrasnya (WCAG AA): jangan ganti nilai tanpa cek ulang.
 */

:root {
  --mk-bg: #f8fafc;
  --mk-surface: #ffffff;
  --mk-surface-muted: #f1f5f9;
  --mk-border: #e2e8f0;
  --mk-border-input: #848fa1;
  --mk-input-bg: #ffffff;
  --mk-text: #0f172a;
  --mk-text-2: #475569;
  --mk-text-muted: #64748b;
  --mk-primary: #2563eb;
  --mk-primary-hover: #1d4ed8;
  --mk-on-primary: #ffffff;
  --mk-link: #1d4ed8;
  --mk-focus: #2563eb;
  --mk-focus-ring: rgba(37, 99, 235, 0.18);
  --mk-danger: #dc2626;
  --mk-danger-ring: rgba(220, 38, 38, 0.15);
  --mk-danger-text: #991b1b;
  --mk-danger-bg: #fef2f2;
  --mk-danger-border: #fecaca;
  --mk-success: #059669;
  --mk-success-text: #065f46;
  --mk-success-bg: #ecfdf5;
  --mk-success-border: #a7f3d0;
  --mk-warning-text: #92400e;
  --mk-warning-bg: #fffbeb;
  --mk-warning-border: #fde68a;
  --mk-info-text: #1e40af;
  --mk-info-bg: #eff6ff;
  --mk-info-border: #bfdbfe;
  --mk-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
  --mk-radius-sm: 8px;
  --mk-radius: 12px;
  --mk-radius-lg: 16px;
  --mk-radius-xl: 20px;
  --mk-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mk-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --mk-dur-fast: 150ms;
  --mk-dur-card: 700ms;
  --mk-dur-item: 650ms;
  color-scheme: light;
}

/* ---------- Dasar ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.mk {
  margin: 0;
  font-family: var(--mk-font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--mk-text);
  background-color: var(--mk-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* :where() membuat spesifisitas nol, jadi gaya komponen (footer, tombol) selalu menang. */
:where(.mk) a {
  color: var(--mk-link);
  text-underline-offset: 2px;
}

:where(.mk) :focus-visible {
  outline: 2px solid var(--mk-focus);
  outline-offset: 2px;
}

/* ---------- Motion: keyframes ----------
 * fill-mode "backwards": elemen tersembunyi selama jeda, lalu nilai akhir animasi tidak menempel
 * (efek hover dan tekan tetap jalan). Tidak ada animasi yang berulang terus kecuali spinner loading.
 */

@keyframes mk-card-in {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
}

@keyframes mk-logo-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.92);
  }
}

/* Judul muncul dari balik garis: jendela clip-path bergeser berlawanan dengan teks, jadi posisinya diam. */
@keyframes mk-reveal {
  from {
    opacity: 0;
    transform: translateY(0.6em);
    clip-path: inset(-0.6em 0 0.6em 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}

@keyframes mk-item-in {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(6px);
  }
}

@keyframes mk-rise-sm {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes mk-shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

@keyframes mk-pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.15); }
  100% { transform: none; }
}

@keyframes mk-ripple {
  from {
    opacity: 0.35;
    transform: scale(0);
  }
  to {
    opacity: 0;
    transform: scale(1);
  }
}

@keyframes mk-fade {
  from {
    opacity: 0;
  }
}

/* ---------- Motion: koreografi pembukaan (selesai < 1,6 detik, form bisa diisi sejak awal) ---------- */

.mk-card {
  animation: mk-card-in var(--mk-dur-card) var(--mk-ease-out) backwards;
}

.mk-card-logo {
  transform-origin: left center;
  animation: mk-logo-in 600ms var(--mk-ease-out) 150ms backwards;
}

.mk-title {
  animation: mk-reveal 700ms var(--mk-ease-out) 250ms backwards;
}

.mk-lead,
.mk-alert,
.mk-alt {
  animation: mk-rise-sm 600ms var(--mk-ease-out) backwards;
}

.mk-lead { animation-delay: 350ms; }
.mk-alert { animation-delay: 420ms; }

.mk-steps,
.mk-help {
  animation: mk-rise-sm 600ms var(--mk-ease-out) backwards;
}

.mk-steps { animation-delay: 420ms; }
.mk-help { animation-delay: 760ms; }

.mk-form > * {
  animation: mk-item-in var(--mk-dur-item) var(--mk-ease-out) backwards;
}

.mk-form > :nth-child(2) { animation-delay: 460ms; }
.mk-form > :nth-child(3) { animation-delay: 530ms; }
.mk-form > :nth-child(4) { animation-delay: 600ms; }
.mk-form > :nth-child(5) { animation-delay: 670ms; }
.mk-form > :nth-child(6) { animation-delay: 740ms; }
.mk-form > :nth-child(7) { animation-delay: 810ms; }
.mk-form > :nth-child(n + 8) { animation-delay: 880ms; }

.mk-alt { animation-delay: 700ms; }
.mk-form:has(> :nth-child(6)) ~ .mk-alt { animation-delay: 950ms; }

/* Error: muncul, lalu bergoyang sekali untuk menandai kegagalan. */
.mk-alert--error {
  animation: mk-rise-sm 600ms var(--mk-ease-out) 420ms backwards, mk-shake 480ms ease-in-out 1050ms;
}

/* Setelah panel pernah berganti, isi panel baru masuk lebih cepat (dipasang oleh mk-ui.js). */
.mk-panels--switched .mk-title { animation-delay: 60ms; }
.mk-panels--switched .mk-lead { animation-delay: 110ms; }
.mk-panels--switched .mk-alert { animation: mk-rise-sm 600ms var(--mk-ease-out) 140ms backwards; }
.mk-panels--switched .mk-form > :nth-child(2) { animation-delay: 160ms; }
.mk-panels--switched .mk-form > :nth-child(3) { animation-delay: 210ms; }
.mk-panels--switched .mk-form > :nth-child(4) { animation-delay: 260ms; }
.mk-panels--switched .mk-alt { animation-delay: 300ms; }

/* ---------- Layout auth ---------- */

.mk-auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.mk-auth-main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.mk-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 36px 40px;
  background-color: var(--mk-surface);
  border: 1px solid var(--mk-border);
  border-radius: var(--mk-radius-xl);
  box-shadow: var(--mk-shadow-card);
}

.mk-card-logo {
  margin: 0 0 32px;
}

.mk-card-logo img {
  display: block;
  width: auto;
  height: 28px;
}

.mk-auth-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 20px;
  padding: 0 20px 24px;
  font-size: 13px;
  color: var(--mk-text-muted);
}

.mk-auth-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--mk-text-2);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color var(--mk-dur-fast) ease, text-decoration-color var(--mk-dur-fast) ease;
}

.mk-auth-footer a:hover {
  color: var(--mk-text);
  text-decoration-color: currentColor;
}

/* ---------- Teks ---------- */

.mk-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--mk-text);
}

.mk-lead {
  margin: 0 0 28px;
  font-size: 15px;
  color: var(--mk-text-2);
}

.mk-alt {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--mk-border);
  font-size: 14px;
  text-align: center;
  color: var(--mk-text-2);
}

.mk-alt a {
  font-weight: 600;
}

.mk-note {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: var(--mk-text-muted);
}

/* ---------- Form ---------- */

.mk-form {
  display: grid;
  gap: 18px;
}

.mk-field {
  display: grid;
  gap: 6px;
}

.mk-field-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

/* Link di bawah input (mis. "Lupa password?"): area sentuh 44px tanpa menggeser layout. */
.mk-field-link {
  margin: -12px 0 -12px auto;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--mk-dur-fast) ease;
}

.mk-field-link:hover {
  text-decoration-color: currentColor;
}

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

.mk-input {
  display: block;
  width: 100%;
  height: 56px;
  margin: 0;
  padding: 24px 14px 4px;
  font: inherit;
  /* 16px mencegah iOS memperbesar halaman saat input difokus. */
  font-size: 16px;
  color: var(--mk-text);
  background-color: var(--mk-input-bg);
  border: 1.5px solid var(--mk-border-input);
  border-radius: var(--mk-radius);
  transition: border-color var(--mk-dur-fast) ease, box-shadow 250ms var(--mk-ease-out);
}

.mk-input-wrap--icon .mk-input {
  padding-left: 44px;
}

.mk-input-wrap--password .mk-input {
  padding-right: 52px;
}

/* Contoh isian (placeholder) baru terlihat setelah label naik. */
.mk-input::placeholder {
  color: transparent;
  opacity: 1;
  transition: color var(--mk-dur-fast) ease;
}

.mk-input:focus::placeholder {
  color: var(--mk-text-muted);
}

.mk-input:hover {
  border-color: var(--mk-text-muted);
}

/* Outline transparan tetap terlihat di mode high contrast Windows, ring biru untuk mode biasa. */
.mk-input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: var(--mk-focus);
  box-shadow: 0 0 0 4px var(--mk-focus-ring);
}

/* Label melayang: di tengah input saat kosong, naik dan mengecil saat fokus atau terisi. */
.mk-float-label {
  position: absolute;
  top: 16px;
  left: 15.5px;
  max-width: calc(100% - 31px);
  overflow: hidden;
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--mk-text-muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 250ms var(--mk-ease-out), color var(--mk-dur-fast) ease;
}

.mk-input-wrap--icon .mk-float-label {
  left: 45.5px;
  max-width: calc(100% - 61px);
}

.mk-input-wrap--password .mk-float-label {
  max-width: calc(100% - 100px);
}

.mk-input:focus + .mk-float-label,
.mk-input:not(:placeholder-shown) + .mk-float-label {
  transform: translateY(-10px) scale(0.75);
  color: var(--mk-text-2);
}

/* Dipisah: selector autofill yang tidak dikenal browser cukup dilewati. */
.mk-input:-webkit-autofill + .mk-float-label {
  transform: translateY(-10px) scale(0.75);
  color: var(--mk-text-2);
}

.mk-input:focus + .mk-float-label {
  color: var(--mk-primary);
}

.mk-input-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 16px;
  margin-top: -0.5em;
  font-size: 15px;
  line-height: 1;
  text-align: center;
  color: var(--mk-text-muted);
  pointer-events: none;
  transition: color var(--mk-dur-fast) ease, transform 250ms var(--mk-ease-out);
}

.mk-input-wrap:focus-within .mk-input-icon {
  color: var(--mk-primary);
  transform: scale(1.1);
}

/* Merah hanya setelah pengguna berinteraksi dengan isian yang tidak valid (bukan saat halaman dibuka).
   Aturan dipisah agar browser yang belum mendukung :user-invalid / :has() cukup melewatinya. */
.mk-input:user-invalid {
  border-color: var(--mk-danger);
}

.mk-input:user-invalid:focus {
  box-shadow: 0 0 0 4px var(--mk-danger-ring);
}

.mk-input:user-invalid + .mk-float-label {
  color: var(--mk-danger-text);
}

.mk-input-wrap:has(.mk-input:user-invalid) .mk-input-icon {
  color: var(--mk-danger);
}

.mk-field:has(.mk-input:user-invalid) .mk-hint {
  color: var(--mk-danger-text);
}

.mk-input-action {
  position: absolute;
  top: 6px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 15px;
  color: var(--mk-text-muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: color var(--mk-dur-fast) ease;
}

.mk-input-action:hover {
  color: var(--mk-text);
}

/* Ikon mata dan mata-coret ditumpuk di sel yang sama lalu bergantian (crossfade). */
.mk-input-action i {
  grid-area: 1 / 1;
  transition: opacity var(--mk-dur-fast) ease, transform 250ms var(--mk-ease-out);
}

.mk-input-action .fa-eye-slash,
.mk-input-action[aria-pressed="true"] .fa-eye {
  opacity: 0;
  transform: scale(0.5) rotate(-45deg);
}

.mk-input-action[aria-pressed="true"] .fa-eye-slash {
  opacity: 1;
  transform: none;
}

.mk-hint {
  margin: 0;
  font-size: 13px;
  color: var(--mk-text-muted);
  transition: color var(--mk-dur-fast) ease;
}

/* Syarat yang dicek langsung saat mengetik (mis. panjang password). */
.mk-hint--live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mk-hint--live i {
  color: var(--mk-border-input);
  transition: color var(--mk-dur-fast) ease;
}

.mk-hint--live.is-met {
  color: var(--mk-success-text);
}

.mk-hint--live.is-met i {
  color: var(--mk-success);
  animation: mk-pop 360ms var(--mk-ease-out);
}

.mk-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--mk-text-2);
  cursor: pointer;
}

.mk-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--mk-primary);
  cursor: pointer;
}

.mk-check input:checked {
  animation: mk-pop 300ms var(--mk-ease-out);
}

.mk-check a {
  font-weight: 600;
}

/* ---------- Tombol ---------- */

.mk-btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--mk-radius);
  cursor: pointer;
  transition: background-color var(--mk-dur-fast) ease, border-color var(--mk-dur-fast) ease,
    color var(--mk-dur-fast) ease, transform 120ms ease;
}

/* Umpan balik saat ditekan. */
.mk-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.mk-btn--primary {
  color: var(--mk-on-primary);
  background-color: var(--mk-primary);
}

.mk-btn--primary:hover {
  background-color: var(--mk-primary-hover);
}

.mk-btn--block {
  width: 100%;
}

.mk-btn:disabled {
  cursor: progress;
}

/* Gelombang dari titik klik (dibuat oleh mk-ui.js, dihapus setelah selesai). */
.mk-ripple {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  animation: mk-ripple 600ms ease-out;
}

/* Spinner menyelinap masuk dari lebar 0 saat loading; animasi putarnya hanya jalan saat terlihat. */
.mk-btn-spinner {
  display: inline-block;
  width: 0;
  margin-right: -8px;
  overflow: hidden;
  opacity: 0;
  animation-play-state: paused;
  transition: width 250ms var(--mk-ease-out), margin 250ms var(--mk-ease-out), opacity 200ms ease;
}

.mk-btn.is-loading .mk-btn-spinner {
  width: 1em;
  margin-right: 0;
  opacity: 1;
  animation-play-state: running;
}

/* ---------- Halaman subscriber (layout netral) ---------- */

.mk-card.mk-card--wide {
  max-width: 600px;
}

/* Isi HTML milik pelanggan di iframe sandbox (mkEmbed); tinggi diatur mk-ui.js. */
.mk-embed {
  display: block;
  width: 100%;
  height: 160px;
  margin: 0 0 4px;
  border: 0;
  animation: mk-rise-sm 600ms var(--mk-ease-out) 420ms backwards;
}

/* Pilihan berbentuk kartu (radio). */
.mk-choices {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.mk-choices legend {
  margin: 0 0 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--mk-text);
}

.mk-choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--mk-text);
  background-color: var(--mk-surface);
  border: 1.5px solid var(--mk-border);
  border-radius: var(--mk-radius);
  cursor: pointer;
  transition: border-color var(--mk-dur-fast) ease, background-color var(--mk-dur-fast) ease, box-shadow 250ms var(--mk-ease-out);
}

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

.mk-choice input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--mk-primary);
  cursor: pointer;
}

.mk-choice input:checked {
  animation: mk-pop 300ms var(--mk-ease-out);
}

.mk-choice:has(input:checked) {
  border-color: var(--mk-primary);
  background-color: var(--mk-info-bg);
  box-shadow: 0 0 0 3px var(--mk-focus-ring);
}

.mk-choice:has(input:focus-visible) {
  outline: 2px solid var(--mk-focus);
  outline-offset: 2px;
}

.mk-choice small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--mk-danger-text);
}

.mk-textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  margin: 0;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--mk-text);
  background-color: var(--mk-input-bg);
  border: 1.5px solid var(--mk-border-input);
  border-radius: var(--mk-radius);
  resize: vertical;
  transition: border-color var(--mk-dur-fast) ease, box-shadow 250ms var(--mk-ease-out);
}

.mk-textarea::placeholder {
  color: var(--mk-text-muted);
}

.mk-textarea:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: var(--mk-focus);
  box-shadow: 0 0 0 4px var(--mk-focus-ring);
}

/* ---------- OTP ---------- */

.mk-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--mk-text);
}

/* Kolom kode besar: digit berjarak, rata tengah (text-indent mengimbangi letter-spacing digit terakhir). */
.mk-input.mk-input--otp {
  height: 60px;
  padding: 0 14px;
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-align: center;
}

.mk-input--otp::placeholder {
  letter-spacing: 0.3em;
}

/* Informasi akses (IP, lokasi, browser, OS). */
.mk-meta {
  display: grid;
  gap: 0;
  margin: 0 0 24px;
  padding: 4px 14px;
  font-size: 13px;
  background-color: var(--mk-surface-muted);
  border-radius: var(--mk-radius);
  animation: mk-rise-sm 600ms var(--mk-ease-out) 420ms backwards;
}

.mk-meta div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--mk-border);
}

.mk-meta div:first-child {
  border-top: 0;
}

.mk-meta dt {
  color: var(--mk-text-2);
}

.mk-meta dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  color: var(--mk-text);
  overflow-wrap: anywhere;
}

.mk-btn--secondary {
  color: var(--mk-text);
  background-color: var(--mk-surface);
  border-color: var(--mk-border-input);
}

.mk-btn--secondary:hover {
  background-color: var(--mk-surface-muted);
}

/* ---------- Status (ikon hasil di halaman sukses / gagal / info) ---------- */

@keyframes mk-status-in {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  60% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    transform: none;
  }
}

/* Cincin yang mengembang sekali dari ikon: menandai hasil baru saja terjadi. */
@keyframes mk-status-ring {
  from {
    opacity: 0.5;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.6);
  }
}

.mk-status {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 0 20px;
  font-size: 24px;
  border-radius: 50%;
  animation: mk-status-in 600ms var(--mk-ease-out) 200ms backwards;
}

.mk-status::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: mk-status-ring 900ms ease-out 450ms;
}

.mk-status--success {
  color: var(--mk-success);
  background-color: var(--mk-success-bg);
}

.mk-status--error {
  color: var(--mk-danger);
  background-color: var(--mk-danger-bg);
}

.mk-status--info {
  color: var(--mk-primary);
  background-color: var(--mk-info-bg);
}

.mk-lead strong {
  color: var(--mk-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Daftar langkah / tips singkat di bawah subjudul. */
.mk-steps {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--mk-text-2);
}

.mk-steps li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.mk-steps i {
  flex: none;
  width: 16px;
  margin-top: 3px;
  text-align: center;
  color: var(--mk-primary);
}

/* Kontak bantuan (WhatsApp, Telegram, email). */
.mk-help {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 20px;
  margin: 8px 0 0;
  font-size: 14px;
}

.mk-help a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--mk-dur-fast) ease;
}

.mk-help a:hover {
  text-decoration-color: currentColor;
}

/* ---------- Alert ---------- */

.mk-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 20px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid;
  border-radius: var(--mk-radius);
}

.mk-alert i {
  flex: none;
  margin-top: 3px;
}

.mk-alert p {
  margin: 0;
}

.mk-alert--error {
  color: var(--mk-danger-text);
  background-color: var(--mk-danger-bg);
  border-color: var(--mk-danger-border);
}

.mk-alert--success {
  color: var(--mk-success-text);
  background-color: var(--mk-success-bg);
  border-color: var(--mk-success-border);
}

.mk-alert--warning {
  color: var(--mk-warning-text);
  background-color: var(--mk-warning-bg);
  border-color: var(--mk-warning-border);
}

.mk-alert--info {
  color: var(--mk-info-text);
  background-color: var(--mk-info-bg);
  border-color: var(--mk-info-border);
}

/* ---------- Panel (mis. Masuk / Reset password dalam satu card) ---------- */

/* Server memberi data-active pada panel awal agar card tidak kosong sebelum JS jalan.
   Tanpa JS (tidak ada class .js) semua panel tampil berurutan, jadi form tetap bisa dipakai. */
.js [data-panel]:not([data-active]) {
  display: none;
}

/* ---------- Kurangi gerakan ----------
 * Pengguna yang mengaktifkan "reduce motion": tanpa geser, skala, blur, goyang, dan gelombang; cukup fade.
 * Geser panel dan animasi tinggi card juga dilewati (lihat mk-ui.js).
 */

@media (prefers-reduced-motion: reduce) {
  .mk-card,
  .mk-card-logo,
  .mk-title,
  .mk-lead,
  .mk-alert,
  .mk-alert--error,
  .mk-panels--switched .mk-alert,
  .mk-form > *,
  .mk-alt,
  .mk-status,
  .mk-steps,
  .mk-help,
  .mk-meta,
  .mk-embed {
    animation-name: mk-fade;
  }

  .mk-hint--live.is-met i,
  .mk-check input:checked,
  .mk-choice input:checked,
  .mk-status::after {
    animation: none;
  }

  .mk-btn:active:not(:disabled),
  .mk-input-wrap:focus-within .mk-input-icon {
    transform: none;
  }

  .mk-float-label,
  .mk-input-action i,
  .mk-input-icon {
    transition: color var(--mk-dur-fast) ease, opacity var(--mk-dur-fast) ease;
  }

  .mk-input-action .fa-eye-slash,
  .mk-input-action[aria-pressed="true"] .fa-eye {
    transform: none;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
  /* Ruang untuk tombol WhatsApp melayang di kanan bawah agar tidak menutupi link footer. */
  .mk-auth-footer {
    padding-bottom: 96px;
  }
}

@media (max-width: 480px) {
  .mk-auth-main {
    align-items: flex-start;
    padding: 20px 12px 24px;
  }

  .mk-card {
    padding: 28px 20px 32px;
    border-radius: var(--mk-radius-lg);
  }

  .mk-card-logo {
    margin-bottom: 28px;
  }

  .mk-title {
    font-size: 1.375rem;
  }

  .mk-lead {
    margin-bottom: 24px;
  }
}

/* ---------- Form pendaftaran publik (show_form.php) ---------- */
.mk-req {
  color: var(--mk-danger);
}

.mk-field > .mk-label {
  display: block;
}

.mk-select {
  display: block;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 40px 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--mk-text);
  background-color: var(--mk-input-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  border: 1.5px solid var(--mk-border-input);
  border-radius: var(--mk-radius);
  appearance: none;
  cursor: pointer;
  transition: border-color var(--mk-dur-fast) ease, box-shadow 250ms var(--mk-ease-out);
}

.mk-select:hover {
  border-color: var(--mk-text-muted);
}

.mk-select:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: var(--mk-focus);
  box-shadow: 0 0 0 4px var(--mk-focus-ring);
}

.mk-error {
  margin: 0;
  font-size: 13px;
  color: var(--mk-danger-text);
}

.mk-error[hidden] {
  display: none;
}

.mk-powered {
  color: var(--mk-text-muted);
}

.mk-powered a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mk-powered a:hover {
  color: var(--mk-text-2);
}

/* ---------- Halaman perantara tautan (redirect) ---------- */
.mk-dest {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  text-align: left;
  background-color: var(--mk-surface);
  border: 1.5px solid var(--mk-border);
  border-radius: var(--mk-radius);
}

.mk-dest small {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mk-text-muted);
}

.mk-dest strong {
  font-size: 16px;
  color: var(--mk-text);
  overflow-wrap: anywhere;
}

.mk-dest span {
  font-size: 13px;
  line-height: 1.45;
  color: var(--mk-text-2);
  overflow-wrap: anywhere;
}
