:root {
    --bg-color: #F6F8FF;
    --card-bg: #FFFFFF;
    --text-color: #0b1c30;
    --text-muted: #64748b;
    --border-color: #f1f5f9;
}

.dark {
    --bg-color: #020617; /* Slate 950 - Deep OLED Friendly */
    --card-bg: #0f172a; /* Slate 900 */
    --text-color: #f1f5f9; /* Slate 100 */
    --text-muted: #94a3b8; /* Slate 400 */
    --border-color: #1e293b; /* Slate 800 */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.bg-card { background-color: var(--card-bg); }
.text-main { color: var(--text-color); }
.text-muted { color: var(--text-muted); }
.border-main { border-color: var(--border-color); }

/* Global Dark Mode Fixes */
.dark body { background-color: var(--bg-color); color: var(--text-color); }
.dark .bg-white { background-color: var(--card-bg) !important; }
.dark .bg-white\/80 { background-color: rgba(15, 23, 42, 0.8) !important; } /* Glass card override */
.dark .bg-white\/95 { background-color: rgba(15, 23, 42, 0.95) !important; }
.dark .bg-slate-50 { background-color: rgba(255,255,255,0.03) !important; }
.dark .text-slate-900, .dark .text-slate-800, .dark .text-slate-700, .dark .text-on-surface { color: var(--text-color) !important; }
.dark .text-slate-600, .dark .text-slate-500, .dark .text-muted { color: var(--text-muted) !important; }
.dark .border-slate-100, .dark .border-slate-200, .dark .border-slate-50, .dark .border-main { border-color: var(--border-color) !important; }
.dark .shadow-sm, .dark .shadow-md, .dark .shadow-xl { box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important; }
.dark input::placeholder { color: var(--text-muted) !important; opacity: 0.5; }
.dark input:not([type="checkbox"]):not([type="radio"]) { background-color: rgba(255,255,255,0.05) !important; color: white !important; border: 1px solid var(--border-color) !important; }
.dark .bg-card-muted { background-color: rgba(255,255,255,0.02); }
.dark .bg-blue-50, .dark .bg-emerald-50, .dark .bg-orange-50, .dark .bg-red-50, .dark .bg-purple-50 { background-color: rgba(255,255,255,0.05) !important; }

/* Custom Styles for PayEase */

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.animate-pulse-soft {
    animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Glassmorphism utility */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Snap scrolling for banners */
.snap-x {
    scroll-snap-type: x mandatory;
}

.snap-center {
    scroll-snap-align: center;
}

/* Hide focus rings for a cleaner UI on mobile */
button:focus, a:focus {
    outline: none;
}

/* Page Loader Overlay */
#page-loader {
    position: fixed;
    inset: 0;
    background: #F6F8FF;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #004ac6 0%, #712ae2 100%);
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0, 74, 198, 0.2);
    animation: loader-pulse 1.5s infinite ease-in-out;
}

.loader-bar {
    width: 120px;
    height: 4px;
    background: #E2E8F0;
    border-radius: 99px;
    overflow: hidden;
}

.loader-progress {
    width: 40%;
    height: 100%;
    background: #004ac6;
    border-radius: 99px;
    animation: loader-progress 1.5s infinite linear;
}

@keyframes loader-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.9); opacity: 0.8; }
}

@keyframes loader-progress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(300%); }
}

.loaded #page-loader {
    opacity: 0;
    visibility: hidden;
}
