@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&family=Readex+Pro:wght@400;600;700&display=swap');

:root {
    /* Premium Color Palette (HSL based for better harmony) */
    --primary-h: 220;
    --primary-s: 85%;
    --primary-l: 50%;
    
    --premium-primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --premium-primary-light: hsl(var(--primary-h), var(--primary-s), 95%);
    --premium-primary-dark: hsl(var(--primary-h), var(--primary-s), 35%);
    
    --premium-secondary: #0f172a;
    --premium-accent: #38bdf8;
    --premium-success: #10b981;
    --premium-warning: #f59e0b;
    --premium-danger: #ef4444;
    
    --premium-bg: #f8fafc;
    --premium-surface: #ffffff;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    --gradient-accent: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --shadow-primary: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--premium-bg);
    color: var(--premium-secondary);
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.3px;
    padding-bottom: 80px; /* Add padding for bottom navigation */
}

h1, h2, h3, h4, h5, h6, .fw-bolder {
    font-family: 'Readex Pro', sans-serif;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-lg);
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}
.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Typography Enhancements */
.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Premium Buttons */
.btn-premium {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 9999px; /* Pill */
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-primary);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}
.btn-premium::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
}
.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(37, 99, 235, 0.4);
    color: white;
}
.btn-premium:hover::after {
    left: 150%;
}

.btn-premium-outline {
    background: transparent;
    color: var(--premium-primary);
    border: 2px solid var(--premium-primary);
    border-radius: 9999px;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    transition: all var(--transition-normal);
}
.btn-premium-outline:hover {
    background: var(--premium-primary-light);
    transform: translateY(-2px);
}

/* Modern Floating Tables */
.modern-table-container {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    padding: 1.5rem;
    overflow: hidden;
}

.table-modern {
    border-collapse: separate;
    border-spacing: 0 0.75rem; /* Space between rows */
    margin-top: -0.75rem;
}

.table-modern thead th {
    border-bottom: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #64748b;
    padding-bottom: 0.5rem;
    font-weight: 700;
}

.table-modern tbody tr {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    border-radius: 0.75rem;
    transition: all var(--transition-normal);
}

.table-modern tbody tr:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.01);
    z-index: 2;
    position: relative;
}

.table-modern tbody td {
    border: none;
    padding: 1.25rem 1rem;
    vertical-align: middle;
}

/* Rounded corners for first and last cells in table rows */
.table-modern tbody td:first-child { border-top-right-radius: 0.75rem; border-bottom-right-radius: 0.75rem; }
.table-modern tbody td:last-child { border-top-left-radius: 0.75rem; border-bottom-left-radius: 0.75rem; }

/* Action Buttons in Tables */
.action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    transition: all var(--transition-fast);
}
.action-btn.view:hover { background: #e0f2fe; color: #0284c7; transform: scale(1.1); }
.action-btn.edit:hover { background: #fef3c7; color: #d97706; transform: scale(1.1); }
.action-btn.delete:hover { background: #fee2e2; color: #dc2626; transform: scale(1.1); }

/* Badges */
.premium-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255,255,255,0.2);
}
.badge-primary-soft { background: #eff6ff; color: #2563eb; }
.badge-success-soft { background: #ecfdf5; color: #059669; }
.badge-warning-soft { background: #fffbeb; color: #d97706; }

/* Micro-animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Background Gradients for Headers */
.bg-gradient-header {
    background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
    position: relative;
    overflow: hidden;
}
.bg-gradient-header::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(37,99,235,0.05) 0%, transparent 60%);
    z-index: 0;
}
.bg-gradient-header > * {
    position: relative;
    z-index: 1;
}

/* Image Wrappers */
.premium-img-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid white;
}

/* -------------------------------------------
   Native Mobile Card Design
--------------------------------------------- */
.native-card {
    background: #ffffff;
    border-radius: 1.25rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    overflow: hidden;
    word-break: break-word;
}

.native-card:active {
    transform: scale(0.98);
}

.native-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px dashed #e2e8f0;
}

.native-card-amount {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #10b981;
    word-break: break-all;
    max-width: 100%;
}

.native-card-title {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #1e293b;
    margin: 0;
}

.native-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.native-card-info-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: #475569;
}

.native-card-info-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.native-card-actions {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 0.75rem;
}

.native-card-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    transition: all var(--transition-fast);
}

.native-card-btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.native-card-btn-danger {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}

.native-card-btn-secondary {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* -------------------------------------------
   Mobile Bottom Navigation Bar
--------------------------------------------- */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom); /* For iPhone notch */
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    width: 25%;
    height: 100%;
    transition: all var(--transition-fast);
}

.bottom-nav-item .bi {
    font-size: 1.5rem;
    margin-bottom: 2px;
    transition: all var(--transition-fast);
}

.bottom-nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--premium-primary);
}

.bottom-nav-item:hover .bi,
.bottom-nav-item.active .bi {
    transform: translateY(-2px) scale(1.1);
}

/* Active Indicator */
.bottom-nav-item.active {
    position: relative;
}
.bottom-nav-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 5px 5px;
}

/* -------------------------------------------
   Auth Pages Modern Styling (Login / Register)
--------------------------------------------- */
.auth-wrapper {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 15px rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    width: 100%;
    max-width: 440px;
    padding: 2.5rem 2rem;
    transition: transform var(--transition-normal);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.25rem;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.auth-title {
    font-family: 'Readex Pro', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #64748b;
    font-size: 0.9rem;
}

.auth-input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.auth-input-group .auth-input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    inset-inline-start: 1rem;
    color: #94a3b8;
    font-size: 1.2rem;
    z-index: 10;
    transition: color var(--transition-fast);
}

.auth-input-group .form-control {
    padding-inline-start: 3rem;
    height: 52px;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.auth-input-group .form-control:focus {
    background: #ffffff;
    border-color: var(--premium-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.auth-input-group .form-control:focus + .auth-input-icon {
    color: var(--premium-primary);
}

.auth-btn-submit {
    height: 52px;
    border-radius: 0.85rem;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transition: all var(--transition-fast);
}

.auth-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.4);
    color: white;
}

.auth-link {
    color: #475569;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.auth-link:hover {
    color: var(--premium-primary);
}
