/* Records Index - Modern Professional Design */

.records-container {
    background: linear-gradient(135deg, #f8f9fc 0%, #e8eaf6 100%);
    min-height: 100vh;
    padding: 1.5rem 0;
}

/* Page Header */
.records-header {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.records-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
}

.records-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a365d;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.records-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Action Buttons Section */
.actions-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.actions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.actions-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a365d;
    position: relative;
    padding-bottom: 0.5rem;
}

.actions-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(135deg, #d69e2e 0%, #b7791f 100%);
    border-radius: 2px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    font-weight: 600;
    font-size: 0.8rem;
}

.action-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-button:hover::before {
    left: 100%;
}

.action-button-blue {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1a365d;
}

.action-button-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.2);
    border-color: #1a365d;
    color: #1a365d;
}

.action-button-green {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.action-button-green:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.2);
    border-color: #2e7d32;
    color: #2e7d32;
}

.action-button-yellow {
    background: linear-gradient(135deg, #fffbf0 0%, #fff3c4 100%);
    color: #d69e2e;
}

.action-button-yellow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(214, 158, 46, 0.2);
    border-color: #d69e2e;
    color: #d69e2e;
}

.action-button-purple {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
}

.action-button-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 31, 162, 0.2);
    border-color: #7b1fa2;
    color: #7b1fa2;
}

.action-button-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.action-button-blue .action-button-icon {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
}

.action-button-green .action-button-icon {
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
}

.action-button-yellow .action-button-icon {
    background: linear-gradient(135deg, #d69e2e 0%, #b7791f 100%);
}

.action-button-purple .action-button-icon {
    background: linear-gradient(135deg, #7b1fa2 0%, #9c27b0 100%);
}

/* Main Content Card */
.content-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #d69e2e 0%, #b7791f 100%);
}

/* Modern Table Styling */
.modern-table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: white;
}

.modern-records-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.85rem;
}

.modern-records-table thead {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
}

.modern-records-table thead th {
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 1rem 0.75rem;
    text-align: right;
    border: none;
    position: relative;
    letter-spacing: 0.025em;
}

.modern-records-table thead th:first-child {
    border-radius: 12px 0 0 0;
}

.modern-records-table thead th:last-child {
    border-radius: 0 12px 0 0;
}

.modern-records-table tbody td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
    position: relative;
}

.modern-records-table tbody tr {
    transition: all 0.3s ease;
    position: relative;
}

.modern-records-table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fc 0%, #e8eaf6 50%, #f8f9fc 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.08);
}

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

.modern-records-table tbody tr:last-child td:first-child {
    border-radius: 0 0 0 12px;
}

.modern-records-table tbody tr:last-child td:last-child {
    border-radius: 0 0 12px 0;
}

/* Table Cell Enhancements */
.table-id-cell {
    font-weight: 700;
    color: #1a365d;
    font-size: 0.9rem;
}

.mosque-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mosque-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #1a365d;
    font-size: 0.9rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-indicator.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.status-indicator.inactive {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.info-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.info-badge.code {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 1px solid #d1d5db;
}

.info-badge.location {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.info-badge i {
    margin-left: 0.25rem;
    font-size: 0.6rem;
}

/* Status Column */
.status-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.visibility-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.visibility-badge.visible {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 1px solid #86efac;
}

.visibility-badge.hidden {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 1px solid #d1d5db;
}

.gathering-badge {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Services Column */
.services-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.service-stat i {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-size: 0.65rem;
}

.service-stat.completed i {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.service-stat.pending i {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.service-stat.additional i {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Amount Column */
.amount-cell {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1a365d;
    font-family: 'Courier New', monospace;
}

/* Actions Column */
.actions-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.action-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: currentColor;
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.action-link:hover::before {
    opacity: 0.2;
}

.action-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.action-link i {
    font-size: 0.9rem;
    z-index: 1;
    position: relative;
}

.action-link.view {
    color: #1a365d;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.action-link.whatsapp {
    color: #25d366;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.action-link.phone {
    color: #6366f1;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
}

.action-link.document {
    color: #7c3aed;
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}

.action-link.book {
    color: #d69e2e;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .records-container {
        padding: 1rem 0;
    }
    
    .records-header,
    .actions-section,
    .content-card,
    .pagination-container {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .records-title {
        font-size: 1.5rem;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .action-button {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .action-button-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-bottom: 0.375rem;
    }
    
    .modern-table-container {
        margin: -1rem;
        padding: 1rem;
    }
    
    .modern-records-table thead th,
    .modern-records-table tbody td {
        padding: 0.5rem 0.375rem;
        font-size: 0.75rem;
    }
    
    .mosque-name {
        font-size: 0.8rem;
    }
    
    .info-badge,
    .visibility-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    .service-stat {
        font-size: 0.7rem;
    }
    
    .amount-cell {
        font-size: 0.8rem;
    }
    
    .action-link {
        width: 28px;
        height: 28px;
    }
    
    .action-link i {
        font-size: 0.8rem;
    }
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.status-badge.status-active {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.status-pending {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.status-inactive {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Action Links */
.table-action {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.table-action-primary {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
}

.table-action-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.4);
    color: white;
}

.table-action-secondary {
    background: linear-gradient(135deg, #d69e2e 0%, #b7791f 100%);
    color: white;
}

.table-action-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(214, 158, 46, 0.4);
    color: white;
}

.table-action-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.table-action-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    color: white;
}

/* Pagination */
.pagination-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Enhanced Pagination Styles */
.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.pagination .page-item .page-link {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(26, 54, 93, 0.1);
    color: #1a365d;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
}

.pagination .page-item .page-link:hover {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #d69e2e 0%, #b7791f 100%);
    color: white;
    border-color: #d69e2e;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1a365d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: #adb5bd;
}

.empty-state h3 {
    color: #1a365d;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

.empty-state-action {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-state-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 54, 93, 0.3);
    color: white;
}

/* Print Styles */
@media print {
    .actions-section,
    .pagination-container {
        display: none;
    }
    
    .records-container {
        background: white;
        padding: 0;
    }
    
    .content-card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
} 