/* ==========================================================================
   REGESIT PARTICIPANT REGISTRATION PAGE (DASHBOARD BENTO STYLE)
   Consistent with Dashboard Design System & Typography
   Theme: Light Clean (#fafafc base, #ffffff card, #e2e5e9 borders)
   Font: DM Sans (Strict Light 300, Regular 400, Medium 500)
   Accents: #1975f9 (Electric Blue), #3bc855 (Vibrant Green)
   ========================================================================== */

:root {
  --bg-page: #fafafc;
  --bg-card: #ffffff;
  --bg-surface-subtle: #f6f7f9;
  --bg-surface-alt: #f1f3f7;
  --bg-input: #ffffff;
  --bg-input-focus: #ffffff;
  
  --color-primary: #1975f9;
  --color-primary-hover: #1263d6;
  --color-primary-subtle: rgba(25, 117, 249, 0.08);
  --color-primary-border: rgba(25, 117, 249, 0.2);
  
  --color-secondary: #3bc855;
  --color-secondary-hover: #32ab48;
  --color-secondary-subtle: rgba(59, 200, 85, 0.1);
  --color-secondary-border: rgba(59, 200, 85, 0.25);
  
  --color-alert: #f43f5e;
  --color-alert-subtle: rgba(244, 63, 94, 0.09);
  
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  
  --border-subtle: #eaecef;
  --border-default: #e2e5e9;
  --border-focus: #1975f9;
  
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 10px 30px rgba(0, 0, 0, 0.06);
  
  --transition-smooth: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 16px 64px 16px;
}

/* Strict Typography Weights (Light 300, Regular 400, Medium 500) */
h1, h2, h3, h4 {
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

p {
  font-weight: 400;
  color: var(--text-secondary);
}

/* Top Mini Brand Bar */
.brand-pill-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.brand-mini-logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  font-weight: 500;
}

.brand-mini-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ==========================================================================
   MAIN REGISTRATION CARD CONTAINER
   ========================================================================== */
.reg-card-container {
  width: 100%;
  max-width: 520px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  margin: 0 auto;
  transition: var(--transition-smooth);
}

.reg-card-container:hover {
  box-shadow: var(--shadow-card-hover);
}

/* Event Hero Banner Image */
.event-banner-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  margin-bottom: 20px;
  border: 1px solid var(--border-default);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.event-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.event-banner-box:hover .event-banner-img {
  transform: scale(1.03);
}

.event-banner-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  line-height: 1;
}

/* Event Title */
.event-title-hero {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 18px;
}

/* Meta Rows (Date & Location) */
.event-meta-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.event-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-icon-bubble {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-primary-subtle);
  border: 1px solid var(--color-primary-border);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.meta-info-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.meta-info-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Divider & Section: Tentang Acara Ini */
.section-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 20px 0;
}

.section-label-caps {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.event-description-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   FORM PENDAFTARAN SECTION
   ========================================================================== */
.form-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.form-title-heading {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.pill-badge-free {
  background: var(--color-secondary-subtle);
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary-border);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 12px;
  border-radius: var(--radius-full);
}

.form-sub-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Form Controls */
.form-field-group {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.field-label span.req {
  color: var(--color-alert);
}

.input-dashboard-control {
  width: 100%;
  height: 44px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0 14px;
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: var(--transition-smooth);
}

.input-dashboard-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(25, 117, 249, 0.12);
}

.input-dashboard-control::placeholder {
  color: var(--text-light);
}

/* ==========================================================================
   DIGITAL SIGNATURE PAD (CANVAS)
   ========================================================================== */
.signature-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.btn-clear-signature {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.btn-clear-signature:hover {
  color: var(--color-alert);
}

.signature-canvas-wrap {
  width: 100%;
  height: 130px;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
  transition: var(--transition-smooth);
}

.signature-canvas-wrap:hover {
  border-color: var(--color-primary);
}

.signature-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.signature-watermark-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 400;
  pointer-events: none;
  user-select: none;
}

/* Agreement Checkbox Box */
.agreement-check-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 18px;
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.agreement-check-card:hover {
  border-color: var(--color-primary-border);
  background: #ffffff;
}

.agreement-checkbox {
  width: 17px;
  height: 17px;
  border-radius: 4px;
  accent-color: var(--color-primary);
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.agreement-label-text {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  user-select: none;
}

/* Submit Action Button */
.btn-submit-registration {
  width: 100%;
  height: 46px;
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(25, 117, 249, 0.25);
  transition: var(--transition-smooth);
}

.btn-submit-registration:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 6px 20px rgba(25, 117, 249, 0.35);
  transform: translateY(-1px);
}

.btn-submit-registration:active {
  transform: scale(0.98);
}

/* ==========================================================================
   SUCCESS QR TICKET VIEW & CELEBRATION ANIMATIONS
   ========================================================================== */
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

.ticket-success-view {
  display: none;
}

.ticket-success-view.active {
  display: block;
  animation: ticketRevealEntrance 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ticketRevealEntrance {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.success-top-celebration {
  text-align: center;
  margin-bottom: 24px;
}

/* Animated Circular Checkmark Badge */
.success-checkmark-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--color-secondary);
  animation: ringPulse 1.6s ease-out infinite;
  opacity: 0.7;
}

@keyframes ringPulse {
  0% { transform: scale(0.85); opacity: 0.9; }
  70% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

.success-circle-badge {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3bc855, #22c55e);
  box-shadow: 0 10px 24px rgba(59, 200, 85, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popCircle 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popCircle {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.checkmark-svg {
  width: 34px;
  height: 34px;
}

.checkmark-path {
  stroke: #ffffff;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkmarkDraw 0.45s 0.22s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes checkmarkDraw {
  to { stroke-dashoffset: 0; }
}

.ticket-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-secondary-subtle);
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary-border);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
}

.ticket-success-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 4px;
}

.ticket-success-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* Official Ticket Card Pass */
.ticket-official-card {
  background: #ffffff;
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  color: var(--text-primary);
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  animation: cardEntrancePop 0.5s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardEntrancePop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ticket-card-badge-top {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  border: 1px solid var(--color-primary-border);
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.ticket-event-name-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.ticket-code-badge {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.ticket-qr-container {
  position: relative;
  display: inline-block;
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 14px;
  max-width: 100%;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.ticket-qr-container:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 28px rgba(25, 117, 249, 0.12);
  border-color: var(--color-primary-border);
}

.qr-relative-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ticket-qr-img {
  width: 280px;
  height: 280px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.qr-center-logo-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-primary);
  border: 3.5px solid #ffffff;
  color: #ffffff;
  font-size: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  user-select: none;
}

.qr-center-logo-badge.giant {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 4px solid #ffffff;
  font-size: 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.qr-tap-fullscreen-hint {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-primary-subtle);
  border: 1px solid var(--color-primary-border);
  color: var(--color-primary);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.ticket-qr-container:hover .qr-tap-fullscreen-hint {
  background: var(--color-primary);
  color: #ffffff;
}

/* ==========================================================================
   FULLSCREEN QR CODE LIGHTBOX MODAL
   ========================================================================== */
.qr-fullscreen-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.qr-fullscreen-modal-overlay.active {
  display: flex;
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: modalBackdropFadeIn 0.25s ease forwards;
}

@keyframes modalBackdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.qr-modal-card {
  position: relative;
  z-index: 2;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 32px 24px 24px 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
  animation: qrModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes qrModalPop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.btn-close-qr-modal {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-close-qr-modal:hover {
  background: var(--text-primary);
  color: #ffffff;
  transform: rotate(90deg);
}

.qr-modal-header {
  margin-bottom: 18px;
}

.qr-modal-pill {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  border: 1px solid var(--color-primary-border);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 8px;
}

.qr-modal-attendee-name {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.qr-modal-event-name {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Giant QR Display Box */
.qr-giant-display-box {
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: inline-block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: 18px;
  max-width: 100%;
}

.qr-giant-img {
  width: 320px;
  height: 320px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.qr-brightness-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.ticket-attendee-name {
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ticket-attendee-org {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.ticket-meta-footer {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Action Buttons */
.ticket-action-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-download-ticket {
  width: 100%;
  height: 46px;
  background: var(--text-primary);
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.15);
  transition: var(--transition-smooth);
}

.btn-download-ticket:hover {
  background: #000000;
  transform: translateY(-1px);
}

.btn-download-ticket:active {
  transform: scale(0.98);
}

@media (max-width: 480px) {
  .reg-card-container { padding: 24px 18px; }
  .event-title-hero { font-size: 21px; }
}

/* ==========================================================================
   FORM VALIDATION ERROR & SHAKE HIGHLIGHT ANIMATION
   ========================================================================== */
.input-dashboard-control.is-invalid {
  border-color: var(--color-alert) !important;
  background-color: rgba(244, 63, 94, 0.04) !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15) !important;
}

.signature-canvas-wrap.is-invalid {
  border-color: var(--color-alert) !important;
  background-color: rgba(244, 63, 94, 0.03) !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15) !important;
}

.agreement-check-card.is-invalid {
  border-color: var(--color-alert) !important;
  background-color: rgba(244, 63, 94, 0.05) !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15) !important;
}

.shake-error {
  animation: fieldShakeError 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

@keyframes fieldShakeError {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* ==========================================================================
   FLOATING TOAST NOTIFICATION SYSTEM
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 99999;
  pointer-events: none;
}

.toast-card {
  pointer-events: auto;
  width: 360px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
}

.toast-card.dismissing {
  animation: toastSlideOut 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(40px) scale(0.96); }
}

.toast-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.toast-card.warning .toast-icon-wrap {
  background: rgba(244, 63, 94, 0.12);
  color: var(--color-alert);
}

.toast-card.success .toast-icon-wrap {
  background: var(--color-secondary-subtle);
  color: var(--color-secondary);
}

.toast-card.info .toast-icon-wrap {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.toast-content-wrap {
  flex-grow: 1;
}

.toast-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 14px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: var(--transition-smooth);
}

.toast-close-btn:hover {
  color: var(--text-primary);
}

.toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--color-primary);
  width: 100%;
  animation: toastTimer 3.5s linear forwards;
}

.toast-card.warning .toast-progress-bar {
  background: var(--color-alert);
}

.toast-card.success .toast-progress-bar {
  background: var(--color-secondary);
}

@keyframes toastTimer {
  from { width: 100%; }
  to { width: 0%; }
}


/* Anti-slop gate: focus-visible, active scale, reduced motion */
:focus-visible { outline: 2px solid #1975f9; outline-offset: 2px; }
.btn:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
#resTicketCode { font-variant-numeric: tabular-nums; }

/* Target sentuh >= 44px di ponsel (gate mobile) */
@media (max-width: 768px) {
  .btn-clear-signature { min-height: 44px; }
}
