/* ========================================
   SACCO Modern Design System
   A sophisticated, modern design for the SACCO platform
======================================== */

/* CSS Variables */
:root {
    --sacco-primary: #0f766e;
    --sacco-primary-light: #14b8a6;
    --sacco-primary-lighter: #5eead4;
    --sacco-primary-dark: #0d5858;
    --sacco-accent: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px 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);
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
}

/* Base Styles */
body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Modern Navigation */
.navbar.bg-success {
    background: linear-gradient(135deg, var(--sacco-primary) 0%, var(--sacco-primary-light) 100%) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(45deg, #ffffff, #e6fffa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: var(--space-2) var(--space-4) !important;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    transform: translateY(-1px);
}

.text-sacco { color: var(--sacco-primary) !important; }

/* Modern Buttons */
.btn-sacco {
    background: linear-gradient(135deg, var(--sacco-primary) 0%, var(--sacco-primary-light) 100%);
    color: white;
    border: none;
    font-weight: 600;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-sacco:hover {
    background: linear-gradient(135deg, var(--sacco-primary-dark) 0%, var(--sacco-primary) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Modern Cards */
.card-border {
    border-top: 4px solid var(--sacco-primary) !important;
    position: relative;
    overflow: hidden;
}

.card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-body {
    padding: var(--space-6);
}

/* Status Badges */
.badge-pending {
    background: linear-gradient(135deg, var(--warning) 0%, #fbbf24 100%);
    color: white;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}
.badge-accepted {
    background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
    color: white;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}
.badge-declined {
    background: linear-gradient(135deg, var(--error) 0%, #f87171 100%);
    color: white;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

/* Landing page */
.hero-landing {
	background: radial-gradient(1200px 600px at 10% -10%, rgba(25,135,84,.45), rgba(25,135,84,0) 60%),
		radial-gradient(800px 400px at 110% 10%, rgba(13,110,253,.2), rgba(13,110,253,0) 60%),
		linear-gradient(120deg, #198754 0%, #2aa26c 100%);
	color: #fff;
}
.section-title { color: #198754; }
.feature-tile {
	border: 1px solid #e9ecef;
	border-radius: 1rem;
	padding: 1rem;
	text-align: center;
	background: #fff;
}
.feature-icon {
	width: 48px; height: 48px; border-radius: 12px;
	background: #198754; color: #fff; display: inline-flex; align-items: center; justify-content: center;
	font-weight: 700;
}
.feature-text { margin-top: .5rem; font-weight: 600; }
/* Balance Cards */
.balance-card {
    background: linear-gradient(135deg, white 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.balance-card h6 {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.balance-card h4 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--sacco-primary);
    margin: 0;
    line-height: 1;
}

/* Modern Forms */
.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
    font-size: 0.875rem;
}

.form-control {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-4);
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: none;
}

.form-control:focus {
    border-color: var(--sacco-primary-light);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-400);
}

/* Modern Alerts */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-6);
    margin-bottom: var(--space-6);
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: var(--error);
    border-left: 4px solid var(--error);
}

/* Modern Tables */
.table-responsive {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    background: white;
    overflow: hidden;
}

.table th {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    font-weight: 700;
    color: var(--gray-900);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: var(--space-4) var(--space-6);
    border-bottom: 2px solid var(--gray-200);
    border-top: none;
}

.table td {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--gray-100);
    border-top: none;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.02) 0%, rgba(15, 118, 110, 0.01) 100%);
}

/* Landing Page */
.hero-landing {
    background: linear-gradient(135deg, var(--sacco-primary) 0%, var(--sacco-primary-light) 50%, #1e40af 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.section-title {
    color: var(--sacco-primary);
    font-weight: 800;
    margin-bottom: var(--space-6);
}

.feature-tile {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    background: white;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--sacco-primary) 0%, var(--sacco-primary-light) 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-lg);
}

.feature-text {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}

.advantage-item {
    padding: .5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.advantage-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: .9rem;
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--sacco-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: var(--space-4);
    }
    
    .balance-card h4 {
        font-size: 1.5rem;
    }
    
    .feature-tile {
        padding: var(--space-4);
        margin-bottom: var(--space-4);
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}
