@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Premium Modern Color Palette */
    --primary: #10B981; /* Premium Emerald Green */
    --primary-dark: #059669;
    --primary-light: rgba(16, 185, 129, 0.1);
    
    --secondary: #4F46E5; /* Indigo */
    --secondary-light: rgba(79, 70, 229, 0.1);
    
    --danger: #EF4444; 
    --danger-light: rgba(239, 68, 68, 0.1);
    --warning: #D97706;
    --warning-light: rgba(217, 119, 6, 0.12);
    
    --bg-main: #F8FAFC; /* Clean Slate Background */
    --light: #F8FAFC;
    --surface: #FFFFFF;
    
    --text-main: #0F172A; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 (Darker Grey) */
    
    --border: #E2E8F0;
    
    --font-main: 'Outfit', system-ui, -apple-system, sans-serif;
    
    /* Premium Shadows */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 15px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-btn: 0 8px 15px rgba(16, 185, 129, 0.25);
    
    /* Smooth Radii */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-blur: blur(16px);
}

body.dark-theme {
    --bg-main: #000000; /* True OLED Black */
    --light: #0a0a0a;
    --surface: #0a0a0a;
    
    --text-main: #F8FAFC; /* Slate 50 */
    --text-muted: #94A3B8; /* Slate 400 */
    
    --border: #334155; /* Slate 700 */
    
    --glass-bg: rgba(30, 41, 59, 0.85);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body.dark-theme .logo img {
    filter: drop-shadow(1px 1px 0px #ffffff) drop-shadow(-1px -1px 0px #ffffff) drop-shadow(1px -1px 0px #ffffff) drop-shadow(-1px 1px 0px #ffffff) drop-shadow(0px 0px 4px rgba(255, 255, 255, 0.4));
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Hide scrollbars for cleaner mobile UX */
::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px; 
}

a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
ul { list-style: none; }
button, input, select, textarea { font-family: inherit; }

/* Typography */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

.text-gray { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; letter-spacing: 0.05em; }

/* Layout Helpers */
.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 1.25rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }

.underline { text-decoration: underline; }
.mr-2 { margin-right: 0.5rem; }
.pb-2 { padding-bottom: 0.5rem; } .pb-8 { padding-bottom: 4rem; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
.rounded { border-radius: var(--radius-md); }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

/* Premium Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card:active {
    transform: scale(0.98);
}

.bg-light {
    background: var(--bg-main) !important;
    border: 1px solid var(--border);
}

/* Forms & Inputs */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-main);
}
.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--surface);
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--text-main);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper .form-control { padding-right: 3rem; }
.password-toggle {
    position: absolute;
    right: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s;
}
.password-toggle:hover { color: var(--primary); }

/* Premium Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-btn);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}
.btn-primary:active { transform: scale(0.97); }

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background-color: var(--primary-light);
}

/* Glassmorphism Header */
.header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo i {
    background: none;
    -webkit-text-fill-color: var(--primary);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.05);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom));
    z-index: 100;
    border-top: 1px solid rgba(255,255,255,0.5);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: var(--radius-md);
}
.nav-item:hover { color: var(--primary); }
.nav-item i { font-size: 1.25rem; margin-bottom: 0.25rem; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.nav-item.active { color: var(--primary); }
.nav-item.active i { transform: translateY(-3px) scale(1.1); }

/* Products Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    position: relative;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.product-image {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: transform 0.5s ease;
}
.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    z-index: 2;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-weight: 800;
    color: var(--text-main);
    margin-top: auto;
    font-size: 1.1rem;
}

.product-daily {
    font-size: 0.75rem;
    color: var(--primary-dark);
    font-weight: 600;
    background: var(--primary-light);
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    width: fit-content;
}

/* Custom Scrollbar for Category Bar */
.overflow-x-auto {
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}
.overflow-x-auto::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Progress Bar (Dynamic) */
.progress-container {
    width: 100%;
    background-color: var(--border);
    border-radius: var(--radius-full);
    height: 0.875rem;
    overflow: hidden;
    margin: 0.75rem 0;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #34D399 100%);
    border-radius: var(--radius-full);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-active, .badge-confirmed { background: var(--primary-light); color: var(--primary-dark); }
.badge-completed { background: var(--secondary-light); color: var(--secondary); }
.badge-pending { background: var(--warning-light); color: var(--warning); }
.badge-rejected { background: var(--danger-light); color: var(--danger); }

/* Toasts */
#toast-container {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    width: 90%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    color: white;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast-success { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.toast-error { background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%); }
.toast-info { background: linear-gradient(135deg, var(--secondary) 0%, #4338CA 100%); }

/* Loader */
.loader {
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 0.8s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
    margin: 0 auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.screen { min-height: calc(100vh - 160px); }

/* Table styling for Admin */
.table-responsive { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; text-align: left; background: var(--surface); }
th, td { padding: 1rem; border-bottom: 1px solid var(--border); }
th { background: var(--bg-main); font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-main); }

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    width: 45px;
    height: 45px;
    bottom: 80px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 25px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    color: #FFF;
}
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Native PWA Standalone Hide Rule (Foolproof) */
@media all and (display-mode: standalone) {
    .install-app-btn {
        display: none !important;
    }
}
@media all and (display-mode: window-controls-overlay) {
    .install-app-btn {
        display: none !important;
    }
}

/* --- SAVE2OWN V2 FINTECH STYLES --- */

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fade-up { animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-fade-in { animation: fadeIn 0.6s ease forwards; }
.animate-scale-in { animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* Interactive Hero Selector */
.category-pill {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}
.category-pill:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.category-pill.active {
    background: var(--text-main);
    color: var(--surface);
    border-color: var(--text-main);
}

/* Accordion FAQs */
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.faq-item.active .faq-answer {
    max-height: 200px;
    margin-top: 0.5rem;
}
.faq-item.active .faq-question i {
    transform: rotate(180deg);
}
.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary);
}

/* Brand Strip */
.brand-strip {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 0;
    align-items: center;
    opacity: 0.6;
    scrollbar-width: none;
}
.brand-strip::-webkit-scrollbar { display: none; }
.brand-strip img {
    height: 30px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}
.brand-strip img:hover {
    filter: grayscale(0%);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}
.comparison-table th, .comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.comparison-table th { background: var(--bg-main); }
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table td.highlight {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}
.comparison-table td.negative {
    background: var(--danger-light);
    color: var(--danger);
}

/* Horizontal Scroll Container */
.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.scroll-container > * {
    scroll-snap-align: start;
    flex: 0 0 85%;
    max-width: 320px;
}

/* --- SAVE2OWN V2.1 FINAL POLISH STYLES --- */

/* Mobile Touch Targets */
.btn {
    min-height: 56px;
}

/* Nav Scroll Transition */
.header {
    transition: all 0.3s ease;
}
.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.5rem 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: none;
}
body.dark-theme .header.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Branded Loader */
#branded-loader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-main);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}
#branded-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}
.branded-loader-text {
    font-size: 1.5rem;
    font-weight: 800;
    margin-top: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.branded-loader-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
    font-weight: 500;
}

/* Progress Bar Example */
.progress-container {
    width: 100%;
    background: var(--border);
    border-radius: var(--radius-full);
    height: 8px;
    margin: 0.5rem 0;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    width: 0; /* Animated inline */
}