/* ==========================================================================
   RN PAYMENT GATEWAY — PREMIUM FINTECH UI DESIGN SYSTEM v3.0
   Deep Indigo × Violet × Cyan | Glass-morphism | 60fps Smooth
   ========================================================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Brand Palette — Deep Indigo → Violet */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand-900: #312e81;

  /* Accent — Violet */
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --violet-600: #7c3aed;

  /* Accent — Cyan */
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;

  /* Light Mode Palette */
  --bg-main: #f1f5fd;
  --bg-gradient: 
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99,102,241,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(139,92,246,0.08) 0%, transparent 50%),
    linear-gradient(180deg, #f1f5fd 0%, #f8fafc 100%);
  --text-main:  #0f172a;
  --text-muted: #475569;
  --text-dim:   #94a3b8;

  --card-bg:           rgba(255,255,255,0.92);
  --card-border:       rgba(226,232,240,0.7);
  --card-shadow:       0 4px 24px -4px rgba(15,23,42,0.06), 0 0 0 1px rgba(226,232,240,0.6), inset 0 1px 0 rgba(255,255,255,1);
  --card-hover-shadow: 0 16px 40px -8px rgba(79,70,229,0.18), 0 0 0 1px rgba(99,102,241,0.3), inset 0 1px 0 rgba(255,255,255,1);

  --input-bg:       rgba(248,250,252,0.9);
  --input-border:   rgba(203,213,225,0.8);
  --input-text:     #0f172a;
  --input-focus-bg: #ffffff;

  --table-bg:       #ffffff;
  --table-head-bg:  rgba(248,250,252,0.98);
  --table-border:   rgba(226,232,240,0.7);
  --table-hover:    rgba(238,242,255,0.5);

  --navbar-bg:     rgba(255,255,255,0.85);
  --navbar-border: rgba(226,232,240,0.7);

  --radius-card: 1.25rem;
  --radius-btn:  0.875rem;
}

/* ── Dark Mode ── */
html.dark {
  --bg-main: #05080f;
  --bg-gradient:
    radial-gradient(ellipse 80% 60% at 50% -5%, rgba(79,46,229,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 90%, rgba(109,40,217,0.12) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 10% 70%, rgba(6,182,212,0.06) 0%, transparent 45%),
    linear-gradient(180deg, #05080f 0%, #060a14 100%);
  --text-main:  #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim:   #475569;

  --card-bg:           rgba(12,20,40,0.75);
  --card-border:       rgba(255,255,255,0.07);
  --card-shadow:       0 8px 32px -8px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.06), inset 0 1px 0 rgba(255,255,255,0.08);
  --card-hover-shadow: 0 20px 48px -10px rgba(99,102,241,0.3), 0 0 0 1px rgba(129,140,248,0.35), inset 0 1px 0 rgba(255,255,255,0.12);

  --input-bg:       rgba(10,18,36,0.8);
  --input-border:   rgba(51,65,85,0.7);
  --input-text:     #f1f5f9;
  --input-focus-bg: rgba(15,25,50,0.95);

  --table-bg:       rgba(10,18,36,0.8);
  --table-head-bg:  rgba(20,30,55,0.9);
  --table-border:   rgba(51,65,85,0.6);
  --table-hover:    rgba(51,65,85,0.3);

  --navbar-bg:     rgba(8,12,24,0.82);
  --navbar-border: rgba(255,255,255,0.07);
}

/* ==========================================================================
   BASE RESETS & RENDERING
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.3s ease;
}

/* Ultra-slim scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.35); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,0.65); }
html.dark ::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.25); }
html.dark ::-webkit-scrollbar-thumb:hover { background: rgba(129,140,248,0.55); }

/* ==========================================================================
   ANIMATED BACKGROUND MESH
   ========================================================================== */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* Animated gradient mesh overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(99,102,241,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139,92,246,0.04) 0%, transparent 50%);
  animation: meshDrift 20s ease-in-out infinite alternate;
}

@keyframes meshDrift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ==========================================================================
   GLASSMORPHISM CARDS
   ========================================================================== */
.glass-card-3d {
  background: var(--card-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.25s cubic-bezier(0.16,1,0.3,1),
              border-color 0.25s ease;
}

/* Ambient spotlight on hover */
.glass-card-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(99,102,241,0.07), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}
html.dark .glass-card-3d::before {
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(129,140,248,0.13), transparent 65%);
}

.glass-card-3d.glass-card-interactive:hover,
.glass-card-interactive:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-hover-shadow);
  border-color: rgba(99,102,241,0.3);
}
.glass-card-interactive:hover::before { opacity: 1; }

/* Dark premium card */
.glass-card-dark-3d {
  background: linear-gradient(135deg, rgba(15,20,40,0.97) 0%, rgba(30,20,80,0.98) 100%);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 20px 60px -15px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.07),
    inset 0 1px 0 rgba(255,255,255,0.12);
  border-radius: var(--radius-card);
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
}
.glass-card-dark-3d:hover {
  transform: translateY(-3px);
  box-shadow:
    0 28px 60px -15px rgba(79,46,229,0.4),
    0 0 0 1px rgba(129,140,248,0.25),
    inset 0 1px 0 rgba(255,255,255,0.15);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn-3d {
  position: relative;
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.18s ease,
              filter 0.18s ease;
  cursor: pointer;
  user-select: none;
}
.btn-3d:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.btn-3d:active {
  transform: translateY(1px) scale(0.975) !important;
  filter: brightness(0.97) !important;
}

/* Shimmer sweep on hover */
.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%; left: -75%;
  width: 50%; height: 200%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  pointer-events: none;
}
.btn-shimmer:hover::after { left: 150%; }

/* Magnetic effect placeholder (JS handles the actual movement) */
.btn-magnetic {
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1);
}

/* ==========================================================================
   THEME TOGGLE BUTTON
   ========================================================================== */
.theme-toggle-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(241,245,249,0.9);
  border: 1px solid rgba(203,213,225,0.7);
  color: #475569;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
html.dark .theme-toggle-btn {
  background: rgba(15,23,42,0.8);
  border-color: rgba(51,65,85,0.6);
  color: #94a3b8;
}
.theme-toggle-btn:hover {
  transform: translateY(-2px) rotate(12deg);
  box-shadow: 0 6px 16px -3px rgba(99,102,241,0.3);
  border-color: rgba(99,102,241,0.5);
  color: #6366f1;
}
html.dark .theme-toggle-btn:hover {
  color: #818cf8;
  border-color: rgba(129,140,248,0.5);
}

/* ==========================================================================
   AMBIENT ORB GLOWS
   ========================================================================== */
.orb-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  pointer-events: none;
  animation: orbFloat 12s ease-in-out infinite alternate;
}
html.dark .orb-glow { opacity: 0.3; }

@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(20px, -25px) scale(1.05); }
  66%  { transform: translate(-15px, 15px) scale(0.97); }
  100% { transform: translate(10px, -10px) scale(1.03); }
}

/* ==========================================================================
   HOLOGRAPHIC SHEEN
   ========================================================================== */
.hologram-shine::after {
  content: '';
  position: absolute;
  top: -150%; left: -150%;
  width: 400%; height: 400%;
  background: conic-gradient(
    from 180deg at 50% 50%,
    rgba(255,255,255,0) 0deg,
    rgba(255,255,255,0.04) 60deg,
    rgba(99,102,241,0.06) 120deg,
    rgba(139,92,246,0.06) 180deg,
    rgba(255,255,255,0.04) 240deg,
    rgba(255,255,255,0) 360deg
  );
  animation: hologramRotate 14s linear infinite;
  pointer-events: none;
  opacity: 0.8;
}
@keyframes hologramRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ==========================================================================
   QRIS / SCANNER ANIMATIONS
   ========================================================================== */
.scanner-container {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
}
.scanner-laser {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(99,102,241,0) 10%, #6366f1 30%, #a855f7 50%, #6366f1 70%, rgba(99,102,241,0) 90%, transparent 100%);
  box-shadow: 0 0 12px 4px rgba(139,92,246,0.7), 0 0 24px 8px rgba(99,102,241,0.4);
  animation: laserScan 2.8s ease-in-out infinite alternate;
  z-index: 20;
  pointer-events: none;
}
@keyframes laserScan {
  0%   { top: 3%; opacity: 0.1; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: 95%; opacity: 0.1; }
}

.qris-scanner-box  { position: relative; overflow: hidden; border-radius: 1.5rem; }
.qris-laser-line   { position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #6366f1, #a855f7, #6366f1, transparent);
  box-shadow: 0 0 12px 4px rgba(168,85,247,0.8);
  animation: laserScan 2.8s ease-in-out infinite alternate;
  z-index: 20; pointer-events: none; }

/* Corner brackets for QRIS frame */
.qris-frame { position: relative; }
.qris-frame::before, .qris-frame::after,
.qris-frame > .qf-tl, .qris-frame > .qf-tr,
.qris-frame > .qf-bl, .qris-frame > .qf-br {
  position: absolute;
  width: 24px; height: 24px;
  border-color: #6366f1;
  border-style: solid;
  border-width: 0;
  z-index: 30;
  pointer-events: none;
}
.qris-frame > .qf-tl { top: 8px; left: 8px; border-top-width: 3px; border-left-width: 3px; border-radius: 4px 0 0 0; }
.qris-frame > .qf-tr { top: 8px; right: 8px; border-top-width: 3px; border-right-width: 3px; border-radius: 0 4px 0 0; }
.qris-frame > .qf-bl { bottom: 8px; left: 8px; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 4px; }
.qris-frame > .qf-br { bottom: 8px; right: 8px; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 4px 0; }

/* ==========================================================================
   PULSE / BEACON ANIMATIONS
   ========================================================================== */
.pulse-beacon {
  position: relative;
}
.pulse-beacon::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: inherit;
  opacity: 0.5;
  animation: beaconPulse 2s cubic-bezier(0,0.2,0.8,1) infinite;
  z-index: -1;
}
@keyframes beaconPulse {
  0%   { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Status dot animate */
@keyframes statusPing {
  75%, 100% { transform: scale(1.8); opacity: 0; }
}
.status-ping::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: statusPing 1.5s cubic-bezier(0,0,0.2,1) infinite;
}

/* ==========================================================================
   TABLE STYLING
   ========================================================================== */
.table-3d-container {
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--table-bg);
  border: 1px solid var(--table-border);
  box-shadow: var(--card-shadow);
}
.table-3d-container table thead {
  background: var(--table-head-bg);
  border-bottom: 1px solid var(--table-border);
}
.table-3d-container table tbody tr {
  transition: background-color 0.15s ease;
  border-color: var(--table-border);
}
.table-3d-container table tbody tr:hover {
  background-color: var(--table-hover);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
#global-toast {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  background: rgba(10,18,36,0.96);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 16px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(99,102,241,0.3);
  box-shadow: 0 16px 40px -8px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.15);
  transform: translateY(110px);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
  pointer-events: none;
  max-width: 340px;
}
#global-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
#global-toast.toast-success { border-color: rgba(16,185,129,0.4); }
#global-toast.toast-error   { border-color: rgba(239,68,68,0.4); }
#global-toast.toast-warning { border-color: rgba(245,158,11,0.4); }

/* ==========================================================================
   ENTRANCE ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.animate-fade-in-up   { animation: fadeInUp 0.5s cubic-bezier(0.16,1,0.3,1) both; }
.animate-fade-in-scale { animation: fadeInScale 0.5s cubic-bezier(0.16,1,0.3,1) both; }
.animate-slide-left    { animation: slideInLeft 0.5s cubic-bezier(0.16,1,0.3,1) both; }
.animate-slide-right   { animation: slideInRight 0.5s cubic-bezier(0.16,1,0.3,1) both; }
.animate-count-up      { animation: countUp 0.6s cubic-bezier(0.16,1,0.3,1) both; }

/* Stagger delays */
.stagger-1 { animation-delay: 0.04s; }
.stagger-2 { animation-delay: 0.09s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.22s; }
.stagger-5 { animation-delay: 0.30s; }
.stagger-6 { animation-delay: 0.38s; }

/* Scroll-triggered reveal (JS adds .is-visible) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1), transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   GRADIENT TEXT
   ========================================================================== */
.gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 40%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-brand {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================================
   ANIMATED GRADIENT BORDER
   ========================================================================== */
.border-gradient {
  position: relative;
  border-radius: var(--radius-card);
}
.border-gradient::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99,102,241,0.6), rgba(139,92,246,0.4), rgba(6,182,212,0.4), rgba(99,102,241,0.6));
  background-size: 300% 300%;
  animation: borderRotate 4s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.border-gradient:hover::before { opacity: 1; }
@keyframes borderRotate {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==========================================================================
   INPUT STYLING
   ========================================================================== */
.input-glass {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--input-text);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  border-radius: var(--radius-btn);
}
.input-glass:focus {
  background: var(--input-focus-bg);
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  outline: none;
}
html.dark .input-glass:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129,140,248,0.18);
}

/* Password strength bar */
.strength-bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(226,232,240,0.5);
  overflow: hidden;
  transition: all 0.3s ease;
}
.strength-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.16,1,0.3,1), background 0.4s ease;
}

/* ==========================================================================
   MODAL ANIMATIONS
   ========================================================================== */
.modal-enter {
  animation: modalSpringIn 0.32s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes modalSpringIn {
  from { opacity: 0; transform: scale(0.9) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   FLOATING ANIMATION
   ========================================================================== */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
.animate-float { animation: floatSlow 4s ease-in-out infinite; }

/* Glow pulse */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px -5px rgba(99,102,241,0.4); }
  50%       { box-shadow: 0 0 30px -5px rgba(99,102,241,0.65), 0 0 50px -15px rgba(139,92,246,0.3); }
}
.animate-glow-pulse { animation: glowPulse 3s ease-in-out infinite; }

/* ==========================================================================
   DARK MODE UTILITY OVERRIDES
   ========================================================================== */
html.dark .text-slate-900 { color: #f1f5f9 !important; }
html.dark .text-slate-800 { color: #e2e8f0 !important; }
html.dark .text-slate-700 { color: #cbd5e1 !important; }
html.dark .text-slate-600 { color: #94a3b8 !important; }
html.dark .text-slate-500 { color: #64748b !important; }

html.dark .bg-white,
html.dark .bg-white\/95,
html.dark .bg-white\/90,
html.dark .bg-white\/80 {
  background-color: rgba(12,20,40,0.96) !important;
}
html.dark .bg-slate-50,
html.dark .bg-slate-50\/90 {
  background-color: rgba(20,30,55,0.7) !important;
}
html.dark .bg-slate-100,
html.dark .bg-slate-100\/90 {
  background-color: rgba(25,38,65,0.85) !important;
}
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-200\/90,
html.dark .border-slate-200\/80,
html.dark .border-slate-200\/60 {
  border-color: rgba(51,65,85,0.6) !important;
}
html.dark input,
html.dark select,
html.dark textarea {
  background-color: var(--input-bg) !important;
  border-color: var(--input-border) !important;
  color: var(--input-text) !important;
}
html.dark input:focus,
html.dark select:focus,
html.dark textarea:focus {
  background-color: var(--input-focus-bg) !important;
  border-color: #818cf8 !important;
}
html.dark .bg-rose-50 {
  background-color: rgba(76,5,25,0.4) !important;
  border-color: rgba(159,18,57,0.5) !important;
  color: #fda4af !important;
}
html.dark .bg-amber-50 {
  background-color: rgba(69,26,3,0.4) !important;
  border-color: rgba(180,83,9,0.5) !important;
  color: #fde68a !important;
}
html.dark .bg-emerald-50 {
  background-color: rgba(2,44,34,0.4) !important;
  border-color: rgba(5,150,105,0.5) !important;
  color: #a7f3d0 !important;
}
html.dark [id$="Modal"] > div:last-child,
html.dark [id$="ModalContent"],
html.dark [id$="Content"] {
  background-color: rgba(10,18,38,0.97) !important;
  border-color: rgba(51,65,85,0.7) !important;
  color: #f1f5f9 !important;
}
html.dark [id$="Modal"] label,
html.dark [id$="Content"] label {
  color: #cbd5e1 !important;
}

/* ==========================================================================
   CODE BLOCKS
   ========================================================================== */
pre code {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 12px;
  line-height: 1.65;
}

/* ==========================================================================
   PROGRESS / STEP INDICATORS
   ========================================================================== */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
}
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-muted);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.step-dot.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(99,102,241,0.2);
}
.step-dot.done {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}
.step-line {
  flex: 1;
  height: 2px;
  background: var(--card-border);
  transition: background 0.3s ease;
}
.step-line.done { background: #10b981; }

/* ==========================================================================
   CIRCULAR COUNTDOWN TIMER
   ========================================================================== */
.countdown-circle {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}
.countdown-track { fill: none; stroke: rgba(99,102,241,0.15); }
.countdown-fill  {
  fill: none;
  stroke: url(#timerGrad);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

/* ==========================================================================
   ADMIN BADGE STYLES
   ========================================================================== */
.badge-paid     { background: rgba(16,185,129,0.12); color: #059669; border: 1px solid rgba(16,185,129,0.25); }
.badge-pending  { background: rgba(245,158,11,0.12); color: #d97706; border: 1px solid rgba(245,158,11,0.25); }
.badge-expired  { background: rgba(100,116,139,0.12); color: #64748b; border: 1px solid rgba(100,116,139,0.25); }
.badge-rejected { background: rgba(239,68,68,0.12);  color: #dc2626; border: 1px solid rgba(239,68,68,0.25); }
.badge-done     { background: rgba(16,185,129,0.12); color: #059669; border: 1px solid rgba(16,185,129,0.25); }
html.dark .badge-paid     { background: rgba(16,185,129,0.15); color: #34d399; border-color: rgba(16,185,129,0.3); }
html.dark .badge-pending  { background: rgba(245,158,11,0.15); color: #fbbf24; border-color: rgba(245,158,11,0.3); }
html.dark .badge-expired  { background: rgba(100,116,139,0.15); color: #94a3b8; border-color: rgba(100,116,139,0.3); }
html.dark .badge-rejected { background: rgba(239,68,68,0.15);  color: #f87171; border-color: rgba(239,68,68,0.3); }
html.dark .badge-done     { background: rgba(16,185,129,0.15); color: #34d399; border-color: rgba(16,185,129,0.3); }

/* ==========================================================================
   MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  :root { --radius-card: 1rem; --radius-btn: 0.75rem; }
  #global-toast { bottom: 16px; right: 16px; left: 16px; max-width: none; }
}