/**
 * Admin List Pages - Shared Styles
 *
 * Reusable styles for admin list pages (Users, Groups, Locations, Devices, etc.)
 * Apply consistent professional appearance across all management pages
 */

/* ============================================
   ENHANCED HEADER CARD
   ============================================ */

.admin-header-card {
    margin-bottom: var(--space-6);
}

.admin-header-card h2 {
    margin-bottom: var(--space-1);
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

.admin-header-card .subtitle {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: var(--text-base);
}

/* ============================================
   STATS CARDS
   ============================================ */

.stats-card {
    transition: all var(--transition-base) var(--ease-in-out);
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stats-card h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    margin-bottom: 0;
}

.stats-card .stats-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: 0;
}

.stats-card .stats-icon {
    font-size: 2rem;
    opacity: 0.3;
}

/* ============================================
   FILTER PANEL
   ============================================ */

.filter-panel-card {
    margin-bottom: var(--space-4);
}

.filter-toggle-btn {
    width: 100%;
    text-align: left;
    padding: 0;
}

.filter-panel-body .form-label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-1);
}

/* ============================================
   BULK ACTIONS BAR
   ============================================ */

.bulk-actions-bar {
    margin-bottom: var(--space-3);
}

.bulk-actions-bar .card-body {
    padding: var(--space-2) var(--space-4);
}

.bulk-actions-bar strong {
    font-weight: var(--font-semibold);
}

/* ============================================
   TABLE CARD
   ============================================ */

.admin-table-card {
    margin-bottom: 0;
}

.admin-table-card .card-body {
    padding: 0;
}

.admin-table-card .table {
    margin-bottom: 0;
}

/* ============================================
   TABLE STYLING
   ============================================ */

.admin-table tbody tr {
    height: 72px;
}

.admin-table td {
    vertical-align: middle;
    padding: 1rem 0.75rem;
}

.admin-table tbody tr:hover {
    background-color: var(--table-hover-bg);
}

/* Profile photos in tables */
.table-profile-photo,
.table-item-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-initials,
.item-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary-100), var(--color-primary-200));
    color: var(--color-primary-700);
    font-weight: 600;
    border-radius: 50%;
}

/* Status indicator dots */
.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border: 2px solid white;
    border-radius: 50%;
}

.status-indicator.active {
    background-color: var(--color-success-600);
}

.status-indicator.inactive {
    background-color: var(--color-neutral-400);
}

/* ============================================
   BADGES - HIGH VISIBILITY
   ============================================ */

/* Role badges */
.role-badge-system-admin {
    background-color: #6f42c1 !important;
    color: white !important;
}

.role-badge-admin {
    background-color: #dc3545 !important;
    color: white !important;
}

.role-badge-manager {
    background-color: #fd7e14 !important;
    color: white !important;
}

.role-badge-staff {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

/* Status badges */
.status-badge-active {
    background-color: #198754 !important;
    color: white !important;
}

.status-badge-inactive {
    background-color: #dc3545 !important;
    color: white !important;
}

.status-badge-deleted {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Feature badges */
.feature-badge-enabled {
    background-color: #198754 !important;
    color: white !important;
}

.feature-badge-disabled {
    background-color: #6c757d !important;
    color: white !important;
}

/* Group badges */
.group-badge {
    background-color: #6c757d !important;
    color: white !important;
}

/* Responsibility badges */
.responsibility-badge {
    background-color: #0d6efd !important;
    color: white !important;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */

.action-buttons {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
}

.action-buttons .btn {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   DATATABLE CUSTOMIZATION
   ============================================ */

.dataTables_wrapper .dataTables_length {
    padding-left: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter {
    padding-right: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    display: flex;
    align-items: center;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    gap: 0.5rem;
}

.dataTables_wrapper .dataTables_length select {
    margin: 0;
}

.dataTables_wrapper .dataTables_filter input {
    margin: 0;
}

.dataTables_wrapper .row:first-child {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    margin: 0;
}

.dataTables_wrapper .dataTables_info {
    padding-left: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.dataTables_wrapper .dataTables_paginate {
    padding-right: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* ============================================
   QUICK FILTER BUTTONS
   ============================================ */

.quick-filters {
    display: flex;
    gap: 0.25rem;
}

.quick-filters .btn {
    border-radius: var(--radius-md);
}

.quick-filters .btn.active {
    background-color: var(--color-primary-600);
    color: white;
    border-color: var(--color-primary-600);
}

/* ============================================
   RESPONSIVE UTILITIES (for future)
   ============================================ */

@media (max-width: 1200px) {
    .stats-card h3 {
        font-size: var(--text-2xl);
    }
}

@media (max-width: 992px) {
    .admin-table tbody tr {
        height: auto;
        min-height: 60px;
    }
}
