:root {
    --primary-blue: #2c3e50;
    --teal: #1abc9c;
    --dark-teal: #16a085;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --border-gray: #dee2e6;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: var(--primary-blue);
    border-bottom: 1px solid #34495e;
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--teal);
}

/* Card Styles */
.card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-gray);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 0.875rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 2px rgba(26, 188, 156, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--teal);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--dark-teal);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: var(--white);
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #e74c3c;
    color: var(--white);
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-success {
    background: #27ae60;
    color: var(--white);
}

.btn-warning {
    background: #f39c12;
    color: var(--white);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Table Styles */
.table {
    width: 100%;
    background: var(--white);
    color: var(--text-dark);
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.875rem;
    border: 1px solid var(--border-gray);
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
}

.table th {
    background: var(--medium-gray);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-gray);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge Styles */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-type-member { background: #1abc9c; color: white; }
.badge-type-men_fellowship { background: #3498db; color: white; }
.badge-type-women_fellowship { background: #9b59b6; color: white; }
.badge-type-youths { background: #e74c3c; color: white; }
.badge-cash { background: #27ae60; color: white; }
.badge-mpesa { background: #e67e22; color: white; }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    background: none;
    border: none;
}

.close:hover {
    color: var(--text-dark);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Group Members */
.group-member-item {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border-gray);
    border-radius: 4px;
    background: #f8f9fa;
}

.group-member-fields {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
    align-items: start;
}

/* Detail Items */
.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-gray);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item label {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.detail-item span {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-gray);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        width: 100%;
    }
    
    .nav-links a {
        padding: 0.5rem;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .group-member-fields {
        grid-template-columns: 1fr;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .card-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .table {
        border: 1px solid #000;
    }
    
    .table th {
        background: #f0f0f0 !important;
    }
}
.detail-item {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0;
}

.detail-item label {
    font-weight: bold;
    margin-right: 1rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 5px;
    width: 50%;
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #34495e 100%);
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-gray);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    color: var(--primary-blue);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Login Form Styles */
.login-form {
    margin-bottom: 1.5rem;
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    background: var(--teal);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-login:hover {
    background: var(--dark-teal);
    transform: translateY(-1px);
}

/* Support Links */
.support-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-gray);
}

.support-links p {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.support-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-support {
    padding: 0.5rem;
    background: var(--medium-gray);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.3s;
    text-align: center;
}

.btn-support:hover {
    background: var(--border-gray);
    color: var(--primary-blue);
}

/* Alert Styles */
.alert-error {
    background: #fee;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Form Group Adjustments for Login */
.login-card .form-group {
    margin-bottom: 1.25rem;
}

.login-card .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.login-card .form-control {
    padding: 0.75rem;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    font-size: 0.9rem;
}

.login-card .form-control:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(26, 188, 156, 0.1);
}

/* Responsive Login */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
        margin: 10px;
    }
    
    .support-buttons {
        flex-direction: column;
    }
}


/* Icons */
.icon-add:before { content: "➕"; font-size: 0.8rem; }
.icon-edit:before { content: "✏️"; font-size: 0.8rem; }
.icon-delete:before { content: "🗑️"; font-size: 0.8rem; }
.icon-view:before { content: "👁️"; font-size: 0.8rem; }
.icon-print:before { content: "🖨️"; font-size: 0.8rem; }
.icon-export:before { content: "📤"; font-size: 0.8rem; }
.icon-group:before { content: "👥"; font-size: 0.8rem; }