/* =====================================================================
   app.css — gaya tambahan aplikasi KitoNgundang (di luar prototype).
   Mengikuti token landing: burgundy #8B1E3F, emas #D4AF37,
   Playfair Display (judul) + Plus Jakarta Sans (teks).
   ===================================================================== */

/* ---------- Halaman informasi (kebijakan, syarat) ---------- */
.prose-legal { color: #374151; line-height: 1.8; font-size: 0.975rem; }
.prose-legal > * + * { margin-top: 1rem; }
.prose-legal h2 {
  margin-top: 2rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: #111827;
}
.prose-legal a { color: #8B1E3F; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose-legal ul { list-style: disc; padding-left: 1.25rem; }
.prose-legal .updated { color: #9ca3af; font-size: 0.85rem; }

/* ---------- Formulir (auth, editor, profil) ---------- */
.ku-label { display: block; margin-bottom: 0.4rem; font-size: 0.85rem; font-weight: 600; color: #374151; }
.ku-label .opt { font-weight: 400; color: #9ca3af; }
.ku-input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.9rem;
  background: #fff;
  padding: 0.75rem 0.95rem;
  font-size: 0.95rem;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ku-input::placeholder { color: #b6bcc6; }
.ku-input:focus { outline: none; border-color: #8B1E3F; box-shadow: 0 0 0 4px rgba(139, 30, 63, 0.12); }
.ku-input[aria-invalid="true"] {
  border-color: #ef4444 !important;
  background-color: #fff8f8;
  color: #991b1b;
}
.ku-input[aria-invalid="true"]:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}
textarea.ku-input { min-height: 6.5rem; line-height: 1.6; resize: vertical; }
select.ku-input { appearance: none; padding-right: 2.4rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.95rem center; }
.ku-hint { margin-top: 0.35rem; font-size: 0.78rem; color: #9ca3af; }
.ku-error {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #dc2626;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.ku-error::before {
  content: '\f06a';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.85rem;
}
.ku-check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.875rem; color: #4b5563; }
.ku-check input { margin-top: 0.2rem; width: 1.05rem; height: 1.05rem; accent-color: #8B1E3F; flex-shrink: 0; }

/* Loading state universal untuk tombol & formulir */
.btn-loading {
  position: relative !important;
  pointer-events: none !important;
  opacity: 0.85 !important;
  cursor: not-allowed !important;
}
.btn-loading-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ku-spin 0.75s linear infinite;
  margin-right: 0.5rem;
  vertical-align: -0.125em;
}
@keyframes ku-spin {
  to { transform: rotate(360deg); }
}

.ku-alert { display: flex; gap: 0.7rem; align-items: flex-start; border-radius: 1rem; padding: 0.85rem 1rem; font-size: 0.9rem; line-height: 1.5; }
.ku-alert i { margin-top: 0.2rem; }
.ku-alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.ku-alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.ku-alert-info    { background: #fef9f8; color: #8B1E3F; border: 1px solid #f5d0da; }

.ku-card { background: #fff; border: 1px solid #f1f1f4; border-radius: 1.5rem; box-shadow: 0 4px 24px rgba(139, 30, 63, 0.06); }

/* panel kiri halaman masuk/daftar */
.auth-aside { background: linear-gradient(150deg, #6B1530 0%, #8B1E3F 55%, #A52A4A 100%); }
.auth-aside::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1.4px);
  background-size: 18px 18px;
  pointer-events: none;
}

/* gulir horizontal tanpa batang gulir (penanda langkah editor) */
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- Preloader (logo + cincin berputar) ---------- */
.ku-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  background:
    radial-gradient(circle at 50% 42%, rgba(212, 175, 55, 0.12) 0%, transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(139, 30, 63, 0.06) 0%, transparent 65%),
    #FEF9F8;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.ku-preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.ku-preloader-stage { position: relative; width: 128px; height: 128px; }
.ku-preloader-stage::before {
  content: '';
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 30, 63, 0.18) 0%, transparent 70%);
  animation: ku-pl-glow 2.4s ease-in-out infinite;
}
.ku-preloader-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ku-preloader-ring  { animation: ku-spin 1.8s linear infinite; }
.ku-preloader-orbit { animation: ku-spin 14s linear infinite reverse; }
.ku-preloader-spark { animation: ku-spin 3.6s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite; filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.9)); }
.ku-preloader-arc {
  stroke-dasharray: 1 296;
  stroke-dashoffset: 0;
  animation: ku-pl-dash 1.8s ease-in-out infinite;
}
.ku-preloader-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(139, 30, 63, 0.28);
  animation: ku-pl-breathe 2.4s ease-in-out infinite;
  transition: transform 0.5s ease;
}
.ku-preloader.is-done .ku-preloader-logo { transform: scale(1.12); animation: none; }
.ku-preloader-word {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: #111827;
  animation: ku-pl-fade 0.8s ease 0.15s both;
}
.ku-preloader-word span {
  background: linear-gradient(135deg, #8B1E3F 0%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ku-preloader-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
@keyframes ku-pl-dash {
  0%   { stroke-dasharray: 1 296;   stroke-dashoffset: 0; }
  50%  { stroke-dasharray: 150 296; stroke-dashoffset: -45; }
  100% { stroke-dasharray: 150 296; stroke-dashoffset: -294; }
}
@keyframes ku-pl-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
@keyframes ku-pl-glow {
  0%, 100% { opacity: 0.55; transform: scale(0.92); }
  50%      { opacity: 1;    transform: scale(1.12); }
}
@keyframes ku-pl-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 639px) {
  .ku-preloader-stage { width: 112px; height: 112px; }
  .ku-preloader-logo { width: 62px; height: 62px; margin: -31px 0 0 -31px; border-radius: 16px; }
  .ku-preloader-word { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ku-preloader-ring, .ku-preloader-orbit, .ku-preloader-spark, .ku-preloader-logo { animation: none; }
  .ku-preloader-arc { animation: none; stroke-dasharray: 110 296; }
  .ku-preloader-stage { animation: ku-pl-pulse 1.6s ease-in-out infinite; }
}
@keyframes ku-pl-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}
