.admin-main-view { padding: var(--padding); text-align: center; }
.welcome-section {
    background: var(--bg-gradient); color: white;
    padding: var(--padding-lg); border-radius: var(--radius); margin-bottom: var(--padding-lg);
}
.quick-actions {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.quick-actions h4 {
    color: #667eea;
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-actions h4 i {
    color: #764ba2;
}

/* Mobile responsive for quick actions */
@media (max-width: 768px) {
    .quick-actions {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 12px;
    }
    
    .quick-actions h4 {
        font-size: 15px;
        margin-bottom: 12px;
    }
}

.quick-action-btn {
    background: var(--admin-gradient); color: white; border: none;
    padding: var(--gap) var(--padding); border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition); display: flex;
    align-items: center; gap: var(--padding-sm); font-size: 14px; font-weight: 500;
}
.quick-action-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

/* Admin Context Menu */
.admin-context-menu {
    position: fixed;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    min-width: 200px;
    padding: 8px 0;
    font-size: 14px;
    font-family: inherit;
    direction: rtl;
    text-align: right;
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
    color: #2c3e50;
}

.context-menu-item:hover {
    background-color: #f8f9fa;
}

.context-menu-item i {
    width: 16px;
    color: #6c757d;
    text-align: center;
    flex-shrink: 0;
}

/* Enhanced Navigation Indicators */
[data-admin-nav] {
    position: relative;
    cursor: pointer;
}

[data-admin-nav]::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: rgba(102, 126, 234, 0.7);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

[data-admin-nav]:hover::after {
    opacity: 1;
}

/* Multi-tab Navigation Hint */
.multi-tab-hint {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

[data-admin-nav]:hover .multi-tab-hint {
    opacity: 1;
}

/* Enhanced Clickable Cards for Multi-tab */
.clickable-card[data-admin-nav] {
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.clickable-card[data-admin-nav]:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* Full-Page Detail Views */
.full-page-view {
    width: 100%;
    min-height: 100vh;
    background: #f8f9fa;
    direction: rtl;
}

.page-header {
    background: white;
    padding: 20px;
    border-bottom: 2px solid #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.header-center {
    text-align: center;
    flex: 1;
}

.page-header h1 {
    color: #2c3e50;
    margin: 0 0 8px 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.page-subtitle {
    color: #6c757d;
    margin: 0;
    font-size: 16px;
}

.btn-back-to-list {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.btn-back-to-list:hover {
    background: #5a6268;
}

.page-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.info-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-section h2 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 12px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.info-item span {
    font-size: 16px;
    color: #2c3e50;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.info-item .amount {
    font-weight: 600;
    color: #28a745;
}

.financial-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.financial-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.financial-card .card-icon {
    font-size: 32px;
    opacity: 0.9;
}

.financial-card .card-content h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    opacity: 0.9;
}

.financial-card .amount {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
}

.financial-card small {
    opacity: 0.8;
    font-size: 14px;
}

.balance-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.balance-card {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    min-width: 200px;
}

.balance-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.balance-operation {
    background: #e9ecef;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #495057;
}

.transaction-type.credit {
    color: #28a745;
}

.transaction-type.debit {
    color: #dc3545;
}

.amount.positive {
    color: #28a745;
}

.amount.negative {
    color: #dc3545;
}

.data-table {
    overflow-x: auto;
    margin-top: 16px;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #e1e5e9;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.data-table .amount {
    font-weight: 600;
}

.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 16px;
}

.page-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: white;
    border-radius: 12px;
    margin: 20px;
}

.error-content {
    text-align: center;
    color: #6c757d;
}

.error-content i {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 16px;
}

.error-content h2 {
    color: #2c3e50;
    margin-bottom: 12px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        text-align: center;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .financial-cards {
        grid-template-columns: 1fr;
    }
    
    .balance-info {
        flex-direction: column;
        gap: 20px;
    }
    
    .page-actions {
        flex-direction: column;
    }
}

/* Print styles */
@media print {
    .btn-back-to-list,
    .page-actions {
        display: none;
    }
    
    .full-page-view {
        background: white;
    }
    
    .page-header {
        border-bottom: 2px solid #000;
    }
}

/* Clickable Card Styles */
.clickable-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.clickable-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Reports Button */
.reports-access-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px auto 0;
    max-width: 200px;
}

.reports-access-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

/* Management Section Styles */
.management-section {
    background: var(--card-bg); border-radius: var(--radius); padding: 0;
    box-shadow: var(--shadow); overflow: hidden;
    animation: slideInUp 0.5s ease-out;
    margin-top: 20px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Content area transitions */
.admin-content-area {
    transition: all 0.3s ease;
}

/* Slide-in animation for management sections */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab content smooth transitions */
.tab-panel {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-panel:not(.active) {
    opacity: 0;
    transform: translateY(10px);
}

.tab-panel.active {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    background: var(--bg-gradient); color: white;
    padding: var(--padding); display: flex;
    justify-content: space-between; align-items: center;
}

.section-header h3 {
    margin: 0; display: flex; align-items: center; gap: var(--padding-sm);
}

.btn-back {
    background: var(--white-alpha-light); color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: var(--padding-sm) var(--gap); border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition);
}
.btn-back:hover {
    background: rgba(255, 255, 255, 0.3); transform: translateX(2px);
}

.admin-tabs {
    display: flex; border-bottom: var(--border); background: var(--bg-light);
}
.admin-tab {
    flex: 1; padding: var(--gap) var(--padding); background: transparent;
    border: none; cursor: pointer; display: flex; align-items: center;
    justify-content: center; gap: var(--padding-sm); font-weight: 500;
    color: var(--text-secondary); transition: var(--transition);
}
.admin-tab:hover {
    background: rgba(102, 126, 234, 0.1); color: var(--primary);
}
.admin-tab.active {
    background: var(--card-bg); color: var(--primary);
    border-bottom: 3px solid var(--primary); font-weight: 600;
}

.tab-content { padding: var(--padding); min-height: 400px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.loading-spinner {
    text-align: center; padding: 50px; color: var(--text-secondary); font-size: 16px;
}
.loading-spinner i {
    margin-bottom: var(--padding-sm); display: block;
    font-size: 24px; color: var(--primary);
}

.error-message {
    text-align: center; padding: 50px; color: var(--danger);
    background: #f8d7da; border: 1px solid #f5c6cb;
    border-radius: var(--radius-sm); margin: var(--padding);
}

.empty-state {
    text-align: center; padding: 50px; color: var(--text-secondary);
    font-size: 16px; background: var(--bg-light);
    border-radius: var(--radius-sm); border: 2px dashed #dee2e6;
}

/* Data Table Styles */
.data-table {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 15px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Button Styles */
.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    margin: 0 2px;
}

.btn-success {
    background: var(--success); color: white; border: 1px solid var(--success);
}
.btn-success:hover { background: #218838; border-color: #1e7e34; }
.btn-danger {
    background: var(--danger); color: white; border: 1px solid var(--danger);
}
.btn-danger:hover { background: #c82333; border-color: #bd2130; }

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

/* Table Header */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
}

.table-header h4 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.table-filters select,
.table-filters input {
    padding: 5px 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
}

.table-filters select option {
    background: #333;
    color: white;
}

.table-filters input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* User Info in Tables */
.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-info small {
    color: #6c757d;
    font-size: 12px;
}

.blocked-indicator {
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
}

/* Amount Cells */
.amount-cell,
.installment-cell,
.balance-cell,
.max-loan-cell {
    text-align: center;
}

.amount {
    font-weight: bold;
    color: #007bff;
}

.installment {
    font-weight: bold;
    color: #28a745;
}

.balance {
    font-weight: bold;
    color: #17a2b8;
}

.max-loan {
    font-weight: bold;
    color: #6f42c1;
}

.credit {
    color: #28a745;
}

.debit {
    color: #dc3545;
}

/* User Registration Form */
.registration-form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.form-header h4 {
    color: #333;
    margin: 0 0 10px;
    font-size: 24px;
}

.form-header p {
    color: #6c757d;
    margin: 0;
}

.user-registration-form {
    max-width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.field-hint {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.password-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.password-input-group {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.password-input-group input {
    flex: 1;
    margin-bottom: 0;
}

.password-input-group button {
    white-space: nowrap;
    padding: 12px 15px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

/* Credentials Modal */
.credentials-modal {
    max-width: 500px;
    text-align: center;
}

.credentials-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.credential-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.credential-item:last-child {
    border-bottom: none;
}

.credential-item label {
    font-weight: 600;
    color: #333;
}

.credential-item .user-id {
    font-weight: bold;
    color: #007bff;
    font-size: 18px;
}

.credential-item .password {
    font-weight: bold;
    color: #28a745;
    font-size: 16px;
    font-family: monospace;
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 4px;
}

.credentials-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: right;
}

.credentials-note i {
    color: #856404;
    margin-left: 8px;
}

.credentials-note p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

/* User Type and Transaction Type Badges */
.user-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.user-type.employee {
    background: #d4edda;
    color: #155724;
}

.user-type.admin {
    background: #d1ecf1;
    color: #0c5460;
}

.transaction-type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.transaction-type.transaction {
    color: #007bff;
}

.transaction-type.loan_payment {
    color: #28a745;
}

/* Actions Cell */
.actions-cell {
    text-align: center;
    white-space: nowrap;
    padding: 4px 2px;
    min-width: 120px;
}

.actions-cell .btn {
    margin: 1px;
    padding: 4px;
    font-size: 0;
    min-width: 24px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.actions-cell .btn i {
    font-size: 12px;
}

/* Vertical stacking for better mobile layout */
@media (max-width: 1200px) {
    .actions-cell {
        min-width: 40px;
        padding: 2px;
    }
    
    .actions-cell .btn {
        display: block;
        margin: 1px auto;
        width: 28px;
        height: 28px;
        padding: 4px;
    }
    
    .actions-cell .btn i {
        font-size: 11px;
    }
}

/* Very small screens - even more compact */
@media (max-width: 768px) {
    .actions-cell {
        min-width: 35px;
    }
    
    .actions-cell .btn {
        width: 24px;
        height: 24px;
        margin: 1px auto;
    }
    
    .actions-cell .btn i {
        font-size: 10px;
    }
}

/* Report Cards Enhancement */
.report-card .report-icon.users {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.report-card .report-icon.loans {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Family Delegation Status Styles */
.delegation-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    max-width: 180px;
    flex-direction: column;
    line-height: 1.3;
}

.delegation-status i {
    font-size: 14px;
    margin-bottom: 2px;
}

.delegation-status small {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.9;
    margin-top: 2px;
}

/* Family Head Status */
.delegation-status.family-head {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: 2px solid #28a745;
}

.delegation-status.family-head i {
    color: #ffffff;
}

/* Family Member Status */
.delegation-status.family-member {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    color: white;
    border: 2px solid #007bff;
}

.delegation-status.family-member i {
    color: #ffffff;
}

/* Pending Status */
.delegation-status.pending {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
    border: 2px solid #ffc107;
}

.delegation-status.pending i {
    color: #856404;
}

/* No Delegation Status */
.delegation-status.none {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.delegation-status.none i {
    color: #adb5bd;
}

/* Unknown Status */
.delegation-status.unknown {
    background: #e9ecef;
    color: #495057;
    border: 2px solid #ced4da;
}

.delegation-status.unknown i {
    color: #6c757d;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .delegation-status {
        padding: 4px 8px;
        font-size: 11px;
        max-width: 140px;
    }
    
    .delegation-status i {
        font-size: 12px;
    }
    
    .delegation-status small {
        font-size: 9px;
    }
}

.report-card .report-icon.transactions {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.report-card .report-icon.financial {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.report-card .report-icon.monthly {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.report-card .report-icon.active-loans {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.report-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.report-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.report-card h4 {
    color: #333;
    margin: 10px 0;
    font-size: 18px;
}

.report-card p {
    color: #6c757d;
    margin: 10px 0 20px;
    font-size: 14px;
}

/* User Dashboard Styles */
.user-info-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item label {
    font-weight: 600;
    color: #333;
}

.info-item span {
    color: #6c757d;
}

.info-item .balance {
    color: #28a745;
    font-weight: 600;
}

.action-buttons {
    margin-top: 20px;
    text-align: center;
}

/* Transaction Styles */
.transactions-table {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.transaction-type.credit {
    color: #28a745;
    font-weight: 600;
}

.transaction-type.debit {
    color: #dc3545;
    font-weight: 600;
}

.credit-amount {
    color: #28a745;
    font-weight: 600;
}

.debit-amount {
    color: #dc3545;
    font-weight: 600;
}

/* Loan Confirmation Modal */
.loan-confirmation-modal {
    max-width: 500px;
}

.loan-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.total {
    font-weight: 600;
    color: #333;
    border-top: 2px solid #667eea;
    margin-top: 10px;
    padding-top: 10px;
}

.detail-row .amount {
    color: #667eea;
    font-weight: 600;
}

.detail-row .installment {
    color: #28a745;
    font-weight: 600;
}

.confirmation-checkbox {
    margin: 20px 0;
    text-align: center;
}

.confirmation-checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Eligibility Message */
.eligibility-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.eligibility-message h4 {
    color: #721c24;
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.reasons-list {
    margin: 15px 0;
    padding-right: 20px;
}

.reasons-list li {
    color: #721c24;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* User Dashboard Tab Styles */
.user-dashboard-tabs {
    margin: 20px 0;
}

.tab-buttons {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.user-tab:not(.priority-tab) {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
}

.user-tab:not(.priority-tab):hover {
    background: #e9ecef;
    color: #007bff;
}

.user-tab:not(.priority-tab).active {
    background: white;
    color: #007bff;
    border-bottom: 3px solid #007bff;
}

.tab-contents {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: white;
}

.user-tab-content {
    display: none;
    padding: 20px;
    min-height: 300px;
}

.user-tab-content.active {
    display: block;
}

/* Summary Cards for User Tabs */
.subscriptions-summary,
.loan-payments-summary {
    margin-bottom: 20px;
}

.summary-card {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f8ff 100%);
    border: 1px solid #28a745;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.summary-card h4 {
    color: #28a745;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(40, 167, 69, 0.2);
}

.summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-item label {
    color: #000000 !important; /* Black text for labels */
    font-weight: normal;
}

.summary-item .amount,
.summary-item span {
    font-weight: bold;
    color: #28a745 !important; /* Green for amounts/numbers */
}

/* User Info Grid */
.user-info-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
}

.user-info-card h4 {
    color: #495057;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.info-item label {
    font-weight: 500;
    color: #6c757d;
}

.info-item span {
    color: #495057;
    font-weight: 500;
}

.info-item .balance {
    color: #28a745;
    font-weight: bold;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Edit Profile Modal */
.edit-profile-modal {
    max-width: 600px;
}

.edit-profile-modal h3 {
    color: #007bff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Loading and Empty States */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

.loading-spinner i {
    margin-left: 10px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .user-tab:not(.priority-tab) {
        min-width: 50%;
    }
}

/* =================== Family Delegations Management Styles =================== */

.family-delegations-management {
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h3 {
    margin: 0;
    color: #495057;
    font-size: 24px;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    padding: 8px 16px;
    border: 2px solid #6f42c1;
    background: transparent;
    color: #6f42c1;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.toggle-btn.active {
    background: #6f42c1;
    color: white;
}

.toggle-btn:hover {
    background: #6f42c1;
    color: white;
}

.delegations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.delegation-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.delegation-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.delegation-card.pending {
    border-left: 4px solid #ffc107;
}

.delegation-card.approved {
    border-left: 4px solid #28a745;
}

.delegation-card.rejected {
    border-left: 4px solid #dc3545;
}

.delegation-card.revoked {
    border-left: 4px solid #6c757d;
}

.delegation-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.delegation-info h5 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 16px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.revoked {
    background: #e2e3e5;
    color: #383d41;
}

.delegation-date {
    font-size: 12px;
    color: #6c757d;
}

.delegation-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

.detail-item {
    flex: 1;
}

.detail-item.full-width {
    flex: none;
    width: 100%;
}

.detail-item label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 4px;
    font-size: 13px;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-weight: 500;
}

.user-name i {
    color: #6c757d;
}

.balance {
    display: block;
    font-size: 12px;
    color: #28a745;
    font-weight: 600;
    margin-top: 2px;
}

.notes, .admin-notes {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
    margin: 4px 0 0 0;
    line-height: 1.4;
}

.admin-notes {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.card-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.status-group {
    margin-bottom: 40px;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
}

.status-header i {
    font-size: 18px;
}

.status-header.pending {
    background: #fff3cd;
    color: #856404;
}

.status-header.approved {
    background: #d4edda;
    color: #155724;
}

.status-header.rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-header.revoked {
    background: #e2e3e5;
    color: #383d41;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    display: block;
    margin-bottom: 15px;
}

.empty-state h4 {
    margin: 0 0 10px 0;
    color: #495057;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Modal Styles for Family Delegations */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h4 {
    margin: 0;
    color: #495057;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #495057;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    margin: 0 0 10px 0;
}

.modal-body .form-group {
    margin-top: 20px;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.modal-body textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.modal-footer {
    padding: 15px 20px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 768px) {
    .delegations-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* =================== System Reports & Backup Styles =================== */

.system-reports-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.system-reports-section h3 {
    color: #495057;
    margin: 0 0 20px 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.reports-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.system-report-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: right;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

/* =================== WhatsApp Queue Management Styles =================== */

.whatsapp-stats-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.stat-card.pending {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
    color: #856404;
}

.stat-card.sent {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-color: #28a745;
    color: #155724;
}

.stat-card.failed {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #dc3545;
    color: #721c24;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

.stat-card i {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.5rem;
    opacity: 0.3;
}

.whatsapp-actions {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: block !important; /* Force visibility on all devices */
    visibility: visible !important;
}

.whatsapp-actions .btn {
    margin: 0 10px;
}

.batch-completion-actions {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.batch-completion-actions h5 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.batch-completion-actions p {
    color: #388e3c;
    margin-bottom: 15px;
}

.whatsapp-notifications-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.list-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.list-header h4 {
    color: #25D366;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.notification-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.notification-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #25D366;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.user-info strong {
    color: #495057;
    font-size: 1.1rem;
}

.user-info small {
    color: #6c757d;
    display: block;
    margin-top: 2px;
}

.type-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    color: white;
}

.type-badge.transaction_approved {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.type-badge.loan_payment_approved {
    background: linear-gradient(135deg, #007bff, #6610f2);
}

.type-badge.joining_fee_approved {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.type-badge.loan_approved {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
}

.type-badge.loan_rejected {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
}

.notification-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #6c757d;
}

.notification-details i {
    margin-left: 5px;
    color: #25D366;
}

.message-preview {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.message-text {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #495057;
    font-size: 0.9rem;
}

.notification-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-actions .btn {
    flex: 1;
    min-width: 90px;
    font-size: 0.8rem;
}

.whatsapp-message-modal {
    max-width: 600px;
    margin: 0 auto;
}

.whatsapp-message-modal h4 {
    color: #25D366;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.message-details {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.detail-row {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-row strong {
    color: #495057;
}

.message-content h5 {
    color: #495057;
    margin-bottom: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state h4 {
    margin: 20px 0 10px 0;
    color: #495057;
}

.empty-state i {
    opacity: 0.5;
}

/* WhatsApp tabs styling */
.whatsapp-tabs {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.whatsapp-tabs .tab-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.whatsapp-tab-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.whatsapp-tab-btn.active {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-color: #25D366;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

/* Responsive design for WhatsApp queue */
@media (max-width: 768px) {
    .notifications-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .notification-details {
        grid-template-columns: 1fr;
    }
    
    .notification-actions {
        flex-direction: column;
    }
    
    .notification-actions .btn {
        flex: none;
        width: 100%;
    }
    
    .whatsapp-tabs .tab-buttons {
        flex-direction: column;
    }
    
    .whatsapp-tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Mobile WhatsApp Actions */
    .whatsapp-actions {
        padding: 15px;
        margin: 15px 0;
    }
    
    .whatsapp-actions .btn {
        display: block !important;
        width: 100%;
        margin: 5px 0 !important;
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .whatsapp-actions .btn i {
        margin-left: 8px;
    }
}

.system-report-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.system-report-btn:active {
    transform: translateY(-1px);
}

.system-report-btn i {
    font-size: 24px;
    opacity: 0.9;
    min-width: 30px;
}

.btn-content {
    flex: 1;
    text-align: right;
}

.btn-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.btn-desc {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    line-height: 1.3;
}

.system-report-btn#sqlBackupBtn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.system-report-btn#sqlBackupBtn:hover {
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.system-report-btn#financialReportBtn {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.system-report-btn#financialReportBtn:hover {
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

/* Loading state for buttons */
.system-report-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.system-report-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reports-actions {
        grid-template-columns: 1fr;
    }
    
    .system-report-btn {
        padding: 15px;
        gap: 12px;
    }
    
    .btn-title {
        font-size: 15px;
    }
    
    .btn-desc {
        font-size: 11px;
    }
}

/* Registration Management Styles */
.registration-management-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.registrations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.registration-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.registration-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.registration-card.status-pending {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff 0%, #fffbf0 100%);
}

.registration-card.status-approved {
    border-color: #28a745;
    background: linear-gradient(135deg, #fff 0%, #f0fff4 100%);
}

.registration-card.status-rejected {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}

.registration-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.registration-card .user-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 18px;
}

.registration-card .user-id {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.registration-card .status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    min-width: 80px;
}

.registration-card .status-badge.status-pending {
    background: #ffc107;
    color: #856404;
}

.registration-card .status-badge.status-approved {
    background: #28a745;
    color: white;
}

.registration-card .status-badge.status-rejected {
    background: #dc3545;
    color: white;
}

.registration-card .contact-info {
    margin-bottom: 15px;
}

.registration-card .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.registration-card .info-item i {
    color: #667eea;
    width: 16px;
    text-align: center;
}

.registration-card .registration-details {
    margin-bottom: 15px;
}

.registration-card .detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.registration-card .detail-item .label {
    color: #666;
    font-weight: 500;
}

.registration-card .detail-item .value {
    color: #333;
    font-weight: 600;
}

.registration-card .card-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    justify-content: flex-end;
}

.registration-card .action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.registration-card .action-btn.approve {
    background: #28a745;
    color: white;
}

.registration-card .action-btn.approve:hover {
    background: #218838;
    transform: translateY(-1px);
}

.registration-card .action-btn.reject {
    background: #dc3545;
    color: white;
}

.registration-card .action-btn.reject:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.registration-card .action-btn.view-details {
    background: #667eea;
    color: white;
}

.registration-card .action-btn.view-details:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.user-details-modal {
    max-width: 600px;
    margin: 0 auto;
}

.user-details-modal .user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.user-details-modal .user-header h3 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-details-modal .user-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.user-details-modal .user-status.pending {
    background: #ffc107;
    color: #856404;
}

.user-details-modal .user-status.approved {
    background: #28a745;
    color: white;
}

.user-details-modal .user-status.rejected {
    background: #dc3545;
    color: white;
}

.user-details-modal .info-section h4 {
    color: #667eea;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-details-modal .info-list .info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.user-details-modal .info-list .info-item:last-child {
    border-bottom: none;
}

.user-details-modal .info-item label {
    color: #666;
    font-weight: 500;
    flex: 1;
}

.user-details-modal .info-item span {
    color: #333;
    font-weight: 600;
    flex: 2;
    text-align: right;
}

.user-details-modal .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* Badge Styles */
.admin-tabs .badge {
    background: #dc3545;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
    min-width: 20px;
    text-align: center;
    display: inline-block;
}

/* Empty and Error States */
.empty-state, .error-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i, .error-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #ddd;
}

.empty-state h3, .error-state h3 {
    margin-bottom: 10px;
    color: #333;
}

.error-state .btn {
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .registrations-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .registration-card {
        padding: 15px;
    }
    
    .registration-card .card-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .registration-card .action-btn {
        justify-content: center;
        padding: 12px;
    }
    
    .user-details-modal .user-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .user-details-modal .modal-actions {
        flex-direction: column;
    }
    
    .user-details-modal .modal-actions .btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* WhatsApp Smart Automation Interface Styles */
.whatsapp-automation-interface {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 20px 0;
    overflow: hidden;
}

.automation-header {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.automation-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.automation-controls {
    display: flex;
    gap: 10px;
}

.automation-controls .btn {
    padding: 6px 12px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
}

.automation-status {
    background: #f8f9fa;
    padding: 10px 20px;
    border-bottom: 1px solid #dee2e6;
    font-size: 14px;
    color: #495057;
}

.automation-status .status-text {
    font-weight: 600;
    margin-right: 15px;
}

.automation-status .progress-text {
    color: #6c757d;
    font-style: italic;
}

.current-message-preview {
    padding: 20px;
}

.current-message-preview h6 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.message-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    direction: rtl;
    text-align: right;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.message-header strong {
    color: #2c3e50;
    font-size: 16px;
}

.message-header span {
    color: #6c757d;
    font-size: 14px;
}

.message-content {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    min-height: 100px;
}

.message-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    font-weight: 600;
}

.btn-whatsapp:hover {
    background: #128C7E;
    color: white;
}