/* Modern Dashboard Table Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.stat-info-icon {
    color: #6b7280;
    cursor: help;
    font-size: 0.875rem;
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-add-new {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.btn-add-new:hover {
    background-color: #2563eb;
    color: white;
}

.btn-bulk-action {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-bulk-action:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.btn-table-settings {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-table-settings:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.modern-table-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background-color: #f9fafb;
}

.modern-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

/* RTL Support for Tables */
[dir="rtl"] .modern-table th {
    text-align: right;
}

.modern-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s;
}

.modern-table tbody tr:hover {
    background-color: #f9fafb;
}

.modern-table td {
    padding: 1rem;
    font-size: 0.875rem;
    color: #111827;
}

.table-checkbox {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-name {
    font-weight: 500;
    color: #111827;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-admin {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-viewer {
    background-color: #f3f4f6;
    color: #374151;
}

.badge-moderator {
    background-color: #f3e8ff;
    color: #7c3aed;
}

.badge-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.status-dot.active {
    background-color: #10b981;
}

.status-dot.inactive {
    background-color: #ef4444;
}

.status-text {
    font-size: 0.875rem;
    color: #111827;
}

.action-menu {
    position: relative;
}

.action-menu-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #6b7280;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.action-menu-btn:hover {
    background-color: #f3f4f6;
}

.action-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-width: 10rem;
    z-index: 10;
    display: none;
    margin-top: 0.25rem;
}

.action-dropdown.show {
    display: block;
}

.action-dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.15s;
}

.action-dropdown-item:hover {
    background-color: #f9fafb;
    color: #111827;
}

.action-dropdown-item.danger {
    color: #dc2626;
}

.action-dropdown-item.danger:hover {
    background-color: #fef2f2;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 1rem;
}

.rows-per-page {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rows-per-page select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: #6b7280;
}

.pagination {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 2.5rem;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.pagination-btn.active:hover {
    background-color: #2563eb;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.empty-state-subtext {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Modern Form Styles */
.modern-form-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 1.5rem;
}

.modern-form-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.modern-form-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.modern-form-header h4 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
}

.modern-form-group {
    margin-bottom: 1.5rem;
}

.modern-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.modern-form-group .form-control {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    color: #111827;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.modern-form-group .form-control:focus {
    color: #111827;
    background-color: #fff;
    border-color: #3b82f6;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modern-form-group .form-control::placeholder {
    color: #9ca3af;
}

.modern-form-group select.form-control {
    cursor: pointer;
}

.modern-form-group .text-danger {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #dc2626;
}

.modern-form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.btn-modern-primary {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background-color 0.2s;
    cursor: pointer;
}

.btn-modern-primary:hover {
    background-color: #2563eb;
    color: white;
}

.btn-modern-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-modern-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.validation-summary-errors {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.25rem;
    list-style: none;
}

.validation-summary-errors li {
    color: #dc2626;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

/* RTL Support for Forms */
[dir="rtl"] .modern-form-group label {
    text-align: right;
}

[dir="rtl"] .modern-form-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .validation-summary-errors ul {
    padding-right: 1.25rem;
    padding-left: 0;
}

[dir="rtl"] .modern-form-group select.form-control {
    padding-right: 2.5rem;
    padding-left: 0.75rem;
}

[dir="rtl"] .btn-modern-secondary svg {
    transform: scaleX(-1);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
    }
    
    .dashboard-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .modern-table {
        font-size: 0.75rem;
    }
    
    .modern-table th,
    .modern-table td {
        padding: 0.5rem;
    }
    
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modern-form-container {
        padding: 1.5rem;
    }
    
    .modern-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-modern-primary,
    .btn-modern-secondary {
        width: 100%;
        justify-content: center;
    }
    
    [dir="rtl"] .modern-form-actions {
        flex-direction: column;
    }
}

