/* Modern Design System for Church Management System */

/* Gradient Backgrounds */
.gradient-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.gradient-pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.gradient-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.gradient-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

/* Modern Card Styles */
.modern-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.modern-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.modern-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(to right, #f9fafb, #ffffff);
}

.modern-card-body {
    padding: 1.5rem;
}

/* Modern Buttons */
.btn-modern {
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary-modern {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-success-modern {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-danger-modern {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-warning-modern {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

/* Modern Stats Card - Flexible height based on content */
.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: auto; /* Allow card to grow with content */
    min-height: fit-content;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Modern Badge */
.badge-modern {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Modern Avatar */
.avatar-modern {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.avatar-lg {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

/* Modern Table */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.table-modern thead {
    background: linear-gradient(to right, #f9fafb, #f3f4f6);
}

.table-modern thead th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
    border-bottom: 2px solid #d1d5db;
    background-color: #f9fafb;
}

.table-modern thead th:first-child {
    border-top-left-radius: 0.5rem;
}

.table-modern thead th:last-child {
    border-top-right-radius: 0.5rem;
}

.table-modern tbody tr {
    transition: all 0.2s ease;
    background-color: #ffffff;
}

/* Striped rows - alternating colors */
.table-modern tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.table-modern tbody tr:hover {
    background-color: #eff6ff !important;
    transform: scale(1.001);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.table-modern tbody td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr:last-child td:first-child {
    border-bottom-left-radius: 0.5rem;
}

.table-modern tbody tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
}

/* Table container for better presentation */
.table-container {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.table-container .table-modern {
    box-shadow: none;
    border: none;
    border-radius: 0;
}

/* Modern Search Box */
.search-modern {
    position: relative;
}

.search-modern input {
    padding-left: 2.5rem;
    border-radius: 0.75rem;
    border: 2px solid #e5e7eb;
    transition: all 0.2s ease;
}

.search-modern input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.search-modern .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* Modern Filter */
.filter-modern {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Modern Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Modern Loading */
.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modern Alert */
.alert-modern {
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* Modern Pagination */
.pagination-modern {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-modern a,
.pagination-modern span {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.pagination-modern a:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
}

.pagination-modern .active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Modern Form */
.form-modern label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-modern input,
.form-modern select,
.form-modern textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.form-modern input:focus,
.form-modern select:focus,
.form-modern textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Modern Modal */
.modal-modern {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 32rem;
    width: 100%;
}

.modal-header-modern {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-body-modern {
    padding: 1.5rem;
}

.modal-footer-modern {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .modern-card-header {
        padding: 1rem;
    }
    
    .modern-card-body {
        padding: 1rem;
    }
    
    .table-modern thead th,
    .table-modern tbody td {
        padding: 0.75rem 1rem;
    }
}
