/* IKSOFC UX Upgrade — toast, modal konfirmasi, skeleton, timeline */
:root {
  --ux-toast-bg: rgba(17, 22, 37, .96);
  --ux-toast-line: rgba(255, 255, 255, .1);
}

/* ===== TOAST ===== */
#ux-toast-root {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 10000; display: flex; flex-direction: column; gap: 10px;
  align-items: center; pointer-events: none; width: min(420px, calc(100vw - 40px));
}
.ux-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  background: var(--ux-toast-bg); border: 1px solid var(--ux-toast-line);
  border-radius: 14px; padding: 13px 18px; color: #f5f7ff;
  font-size: 14px; line-height: 1.5; box-shadow: 0 16px 48px rgba(0,0,0,.5);
  backdrop-filter: blur(12px); animation: ux-toast-in .3s cubic-bezier(.2,.9,.3,1.2);
  max-width: 100%;
}
.ux-toast.ux-toast-out { animation: ux-toast-out .25s ease forwards; }
.ux-toast .ux-toast-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.ux-toast-success .ux-toast-icon { background: rgba(114,241,186,.15); color: #72f1ba; }
.ux-toast-error .ux-toast-icon { background: rgba(255,107,107,.15); color: #ff6b6b; }
.ux-toast-info .ux-toast-icon { background: rgba(134,104,255,.15); color: #8668ff; }
@keyframes ux-toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes ux-toast-out { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ===== MODAL KONFIRMASI ===== */
.ux-modal-backdrop {
  position: fixed; inset: 0; z-index: 9998; background: rgba(3,5,9,.7);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px;
  animation: ux-fade-in .2s ease;
}
.ux-modal {
  width: min(440px, 100%); background: #111625; border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px; padding: 28px; color: #f5f7ff; text-align: center;
  box-shadow: 0 32px 96px rgba(0,0,0,.6); animation: ux-modal-in .28s cubic-bezier(.2,.9,.3,1.15);
}
.ux-modal-icon {
  width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 26px;
}
.ux-modal-icon.warn { background: rgba(255,180,84,.14); }
.ux-modal-icon.danger { background: rgba(255,107,107,.14); }
.ux-modal-icon.info { background: rgba(134,104,255,.14); }
.ux-modal h3 { margin: 0 0 10px; font-size: 19px; font-weight: 800; }
.ux-modal p { margin: 0 0 8px; color: #b9c0d2; font-size: 14px; line-height: 1.65; }
.ux-modal-amount {
  display: inline-block; margin: 10px 0 4px; padding: 10px 20px; border-radius: 12px;
  background: rgba(134,104,255,.1); border: 1px solid rgba(134,104,255,.25);
  font-size: 22px; font-weight: 800; color: #b098ff; letter-spacing: .02em;
}
.ux-modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.ux-modal-actions .btn { flex: 1; padding: 13px; border-radius: 12px; font-weight: 700; cursor: pointer; border: 0; font-size: 15px; }
.ux-modal-cancel { background: rgba(255,255,255,.08); color: #f5f7ff; }
.ux-modal-cancel:hover { background: rgba(255,255,255,.13); }
.ux-modal-confirm { background: #8668ff; color: #fff; }
.ux-modal-confirm:hover { background: #7557f0; }
.ux-modal-confirm.danger { background: #e5484d; }
.ux-modal-confirm.danger:hover { background: #d13438; }
@keyframes ux-fade-in { from { opacity: 0; } }
@keyframes ux-modal-in { from { opacity: 0; transform: scale(.92) translateY(12px); } }

/* ===== SKELETON ===== */
.ux-skeleton {
  position: relative; overflow: hidden; background: rgba(255,255,255,.05);
  border-radius: 12px; min-height: 20px;
}
.ux-skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent);
  animation: ux-shimmer 1.4s infinite;
}
@keyframes ux-shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.ux-skeleton-card { padding: 18px; border: 1px solid rgba(255,255,255,.07); border-radius: 18px; margin-bottom: 12px; }
.ux-skeleton-line { height: 14px; margin-bottom: 10px; }
.ux-skeleton-line.short { width: 40%; }
.ux-skeleton-line.medium { width: 70%; }

/* ===== TIMELINE TRANSAKSI ===== */
.ux-timeline { display: flex; align-items: flex-start; margin: 20px 0; padding: 0 4px; }
.ux-timeline-step { flex: 1; text-align: center; position: relative; }
.ux-timeline-dot {
  width: 34px; height: 34px; margin: 0 auto 8px; border-radius: 50%;
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
  background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.12);
  color: #707c91; position: relative; z-index: 2;
}
.ux-timeline-step.done .ux-timeline-dot { background: #8668ff; border-color: #8668ff; color: #fff; }
.ux-timeline-step.current .ux-timeline-dot {
  background: rgba(134,104,255,.15); border-color: #8668ff; color: #b098ff;
  box-shadow: 0 0 0 5px rgba(134,104,255,.12); animation: ux-pulse 2s infinite;
}
.ux-timeline-label { font-size: 11.5px; color: #9ca7ba; line-height: 1.4; font-weight: 600; }
.ux-timeline-step.done .ux-timeline-label { color: #f5f7ff; }
.ux-timeline-step.current .ux-timeline-label { color: #b098ff; }
.ux-timeline-line {
  position: absolute; top: 17px; left: -50%; width: 100%; height: 2px;
  background: rgba(255,255,255,.1); z-index: 1;
}
.ux-timeline-step:first-child .ux-timeline-line { display: none; }
.ux-timeline-step.done .ux-timeline-line,
.ux-timeline-step.current .ux-timeline-line { background: #8668ff; }
@keyframes ux-pulse { 0%,100% { box-shadow: 0 0 0 5px rgba(134,104,255,.12); } 50% { box-shadow: 0 0 0 9px rgba(134,104,255,.05); } }
@media (max-width: 560px) {
  .ux-timeline-label { font-size: 10px; }
  .ux-timeline-dot { width: 28px; height: 28px; font-size: 13px; }
  .ux-timeline-line { top: 14px; }
}
