/* Candlelight SACCO Custom Styles */

:root {
    --primary-color: #28a745;
    --primary-dark: #1e7e34;
    --secondary-color: #6c757d;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

/* Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: all 0.3s;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    min-height: 100vh;
    transition: all 0.3s;
}

.sidebar.collapsed {
    margin-left: -250px;
}

.main-content.expanded {
    margin-left: 0;
}

/* Sidebar styling */
.sidebar .nav-link {
    padding: 10px 15px;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 10px 10px 0 0 !important;
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Dashboard stats cards */
.stat-card {
    border-radius: 10px;
    padding: 20px;
    color: white;
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .stat-icon {
    font-size: 40px;
    opacity: 0.7;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    margin: 10px 0;
}

.stat-card .stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Colors for stat cards */
.bg-primary-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-success-gradient {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.bg-warning-gradient {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.bg-info-gradient {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
}

.bg-danger-gradient {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 5px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Forms */
.form-control {
    border-radius: 5px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Modals */
.modal-content {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px 10px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Print styles */
@media print {
    .sidebar, .navbar, .btn, .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        margin-left: -250px;
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.shifted {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 22px;
    }
    
    .stat-card .stat-icon {
        font-size: 30px;
    }
    
    .table-responsive {
        font-size: 14px;
    }
}

/* Public website styles */
.navbar-brand {
    font-weight: 700;
    color: var(--primary-color);
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.section-title p {
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

.service-card {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    transition: all 0.3s;
}

.service-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.service-card i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h4 {
    font-weight: 600;
    margin-bottom: 15px;
}

/* Print receipt */
.receipt-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Courier New', monospace;
}

.receipt-header {
    text-align: center;
    margin-bottom: 20px;
}

.receipt-header h3 {
    font-weight: 700;
    margin-bottom: 5px;
}

.receipt-details {
    margin-bottom: 20px;
}

.receipt-details p {
    margin-bottom: 5px;
    font-size: 14px;
}

.receipt-divider {
    border-top: 1px dashed #dee2e6;
    margin: 20px 0;
}