/**
 * Admin Dashboard Styles
 * Redesigned to match main site design with professional aesthetic
 */

:root {
    /* Primary brand colors - matching main site */
    --admin-primary: #00AEEF;
    --admin-secondary: #1B365D;
    --admin-accent: #5BB4E5;

    /* Status colors */
    --success-color: #00C853;
    --warning-color: #FF9800;
    --danger-color: #F44336;
    --info-color: #00AEEF;

    /* Neutral colors */
    --text-dark: #1B365D;
    --text-medium: #5a6c7d;
    --text-light: #8e9aab;
    --border-color: #e3e8ef;
    --bg-light: #f8f9fc;
    --bg-white: #ffffff;

    /* Shadows matching main site */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 8px 16px rgba(0, 174, 239, 0.15);

    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Base Styles */
body {
    background: linear-gradient(135deg, #f8f9fc 0%, #e8ecf4 100%);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Dashboard Header - Will use main-header class from style.css */
.admin-header {
    display: none;
    /* Deprecated */
}

/* Logo styling */
.dashboard-logo {
    display: flex;
    align-items: center;
}

.dashboard-logo .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.dashboard-logo .logo:hover {
    color: var(--admin-primary);
}

.dashboard-logo .logo span {
    color: var(--admin-primary);
}



/* User Section - Styles matching frontend aesthetic */
/* User Section */
.dashboard-user-section {
    display: none;
    /* Hidden by default in admin, handled by header logic */
}


/* Main Content */
.admin-main {
    max-width: 100%;
    width: 100%;
    margin: 0;
    margin-top: 70px;
    /* Push below fixed header */
    padding: 2rem;
    padding-top: 1.5rem;
    min-height: calc(100vh - 70px);
}

/* Statistics Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

@media (min-width: 1400px) {
    .stats-section {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1399px) {
    .stats-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.stat-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--admin-primary);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.stat-icon .material-icons {
    font-size: 1.75rem;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-content p {
    margin: 0.25rem 0 0 0;
    font-size: 0.8125rem;
    color: var(--text-light);
    line-height: 1.3;
    font-weight: 500;
}

/* Users Section */
.users-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

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

.section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.header-actions-right {
    display: flex;
    gap: 0.5rem;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    font-family: var(--font-primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-secondary) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 174, 239, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 174, 239, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--text-medium);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-text {
    background: transparent;
    color: var(--text-light);
}

.btn-text:hover {
    color: var(--admin-primary);
    background: var(--bg-light);
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box .material-icons {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.875rem;
    font-family: var(--font-primary);
    transition: var(--transition-fast);
    background: var(--bg-white);
}

.search-box input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
}

.filters-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.filters-group select {
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
    color: var(--text-dark);
}

.filters-group select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.users-table thead {
    background: var(--bg-light);
}

.users-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.users-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.users-table th.sortable:hover {
    background: #edf2f7;
    color: var(--admin-primary);
}

.users-table th .sort-icon {
    font-size: 1rem;
    vertical-align: middle;
    margin-left: 0.25rem;
    opacity: 0.5;
    transition: var(--transition-fast);
}

.users-table th.sortable:hover .sort-icon {
    opacity: 1;
    color: var(--admin-primary);
}

.users-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
    vertical-align: middle;
}

.users-table tbody tr {
    transition: var(--transition-fast);
}

.users-table tbody tr:hover {
    background: var(--bg-light);
}

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

.user-id {
    font-weight: 600;
    color: var(--text-dark);
}

.user-email a {
    color: var(--admin-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.user-email a:hover {
    text-decoration: underline;
    color: var(--admin-secondary);
}

.user-name {
    color: var(--text-dark);
    font-weight: 500;
}

/* Badges */
.plan-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-basic {
    background: rgba(0, 174, 239, 0.1);
    color: #0088cc;
}

.plan-pro,
.plan-plus {
    background: rgba(138, 43, 226, 0.1);
    color: #8a2be2;
}

.plan-admin {
    background: rgba(27, 54, 93, 0.1);
    color: var(--admin-secondary);
}

/* Plan Dropdown in Table */
.plan-dropdown {
    padding: 0.5rem 0.85rem;
    border: 2px solid;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    background: white;
}

.plan-dropdown.plan-basic {
    background: rgba(0, 174, 239, 0.08);
    color: #0088cc;
    border-color: #0088cc;
}

.plan-dropdown.plan-pro,
.plan-dropdown.plan-plus {
    background: rgba(138, 43, 226, 0.08);
    color: #8a2be2;
    border-color: #8a2be2;
}

.plan-dropdown.plan-admin {
    background: rgba(27, 54, 93, 0.08);
    color: var(--admin-secondary);
    border-color: var(--admin-secondary);
}

.plan-dropdown:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.plan-dropdown:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.plan-dropdown:focus {
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.2);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: rgba(0, 200, 83, 0.1);
    color: #00994d;
}

.status-inactive {
    background: rgba(142, 154, 171, 0.1);
    color: var(--text-light);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* AI Credits Badge */
.credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(0, 174, 239, 0.08);
    color: var(--admin-primary);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    border: 1px solid transparent;
}

.credits-badge:hover {
    background: rgba(0, 174, 239, 0.15);
    border-color: var(--admin-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.credits-badge .material-icons {
    font-size: 16px;
    color: var(--admin-accent);
}

.credits-count {
    font-size: 0.875rem;
}

.user-actions {
    display: flex;
    gap: 0.25rem;
}

/* Projects Section */
.projects-section {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
    border: 1px solid var(--border-color);
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.projects-table th,
.projects-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.projects-table th {
    font-weight: 600;
    color: var(--text-dark);
    background: var(--bg-light);
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
}

.project-actions .btn-icon {
    margin-right: 0.5rem;
}

.project-actions .btn-danger {
    color: var(--danger-color);
}

/* Loading/Empty/Error States */
.loading-cell,
.empty-cell,
.error-cell {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--admin-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}


.empty-cell .material-icons,
.error-cell .material-icons {
    font-size: 3rem;
    opacity: 0.3;
    display: block;
    margin-bottom: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 0.35rem;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    padding: 0 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-dark);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover:not(:disabled):not(.active) {
    background: var(--bg-light);
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-secondary) 100%);
    color: white;
    border-color: var(--admin-primary);
    box-shadow: var(--shadow-sm);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-dots {
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    color: var(--text-light);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 54, 93, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.btn-close:hover {
    background: var(--bg-white);
    color: var(--text-dark);
}

/* Expand button in table */
.expand-cell {
    width: 50px;
    text-align: center;
    padding: 0.5rem !important;
}

.btn-expand {
    background: rgba(0, 200, 83, 0.1);
    border: none;
    color: var(--success-color);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.btn-expand:hover {
    background: rgba(0, 200, 83, 0.2);
    transform: scale(1.1);
}

.btn-expand .material-icons {
    font-size: 20px;
}

/* Large modal for detailed view */
.modal-large {
    max-width: 1000px;
    width: 90vw;
}

/* User details grid */
.user-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    padding: 0.5rem;
}

.details-section {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.details-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 700;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.details-section h3 .material-icons {
    font-size: 20px;
    color: var(--admin-primary);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.detail-label {
    font-weight: 600;
    color: var(--text-medium);
    font-size: 14px;
}

.detail-value {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-value a {
    color: var(--admin-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.detail-value a:hover {
    text-decoration: underline;
    color: var(--admin-secondary);
}

.stripe-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #635bff !important;
    font-weight: 600;
}

/* Badges for detail values */
.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-blue {
    background: rgba(0, 174, 239, 0.1);
    color: var(--admin-primary);
}

.badge-green {
    background: rgba(0, 200, 83, 0.1);
    color: var(--success-color);
}

.badge-plan-basic {
    background: rgba(0, 174, 239, 0.1);
    color: #0088cc;
}

.badge-plan-pro,
.badge-plan-plus {
    background: rgba(138, 43, 226, 0.1);
    color: #8a2be2;
}

.badge-plan-admin {
    background: rgba(27, 54, 93, 0.1);
    color: var(--admin-secondary);
}

.badge-success {
    background: rgba(0, 200, 83, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

.badge-purple {
    background: rgba(138, 43, 226, 0.1);
    color: #8a2be2;
}

.badge-orange {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
}

.badge-gray {
    background: rgba(142, 154, 171, 0.1);
    color: var(--text-light);
}

/* Registration Type Badges */
.reg-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.reg-google {
    background: rgba(66, 133, 244, 0.1);
    color: #4285F4;
    border: 1px solid rgba(66, 133, 244, 0.2);
}

.reg-manual {
    background: rgba(142, 154, 171, 0.1);
    color: var(--text-medium);
    border: 1px solid rgba(142, 154, 171, 0.2);
}

/* Reset Password Button in Manual Badge */
.btn-reset-pwd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.15rem;
    margin-left: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-reset-pwd:hover {
    background: rgba(0, 174, 239, 0.15);
    color: var(--primary-dark);
}

.btn-reset-pwd .material-icons {
    font-size: 14px;
}

.modal-body {
    padding: 1.5rem;
}

.user-info {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

.user-info strong {
    color: var(--text-dark);
}

.user-info small {
    color: var(--text-light);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.875rem;
    font-family: var(--font-primary);
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    color: #e67e00;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.alert .material-icons {
    flex-shrink: 0;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    background: var(--bg-light);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--success-color) 0%, #00994d 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 3000;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition-base);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Toast type variants */
.toast.error {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.toast.warning {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.toast.info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.toast.success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.toast .material-icons {
    font-size: 1.5rem;
}

/* Project Statistics Styling */
.projects-count {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1em;
}

.projects-count.high-activity {
    color: var(--success-color);
}

.project-type {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: var(--bg-light);
    border-radius: 6px;
    font-size: 0.7em;
    color: var(--text-light);
    font-weight: 500;
}

.no-projects {
    color: var(--text-light);
    opacity: 0.6;
}

/* Member Since and Activity Styling */
.activity-date,
.member-date {
    font-weight: 500;
    color: var(--text-dark);
}

.project-name {
    display: block;
    color: var(--text-light);
    font-size: 0.75em;
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.no-activity {
    color: var(--text-light);
    opacity: 0.6;
}

/* Inactive User Row Styling */
.inactive-user {
    opacity: 0.65;
    background: rgba(142, 154, 171, 0.05) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-main {
        padding: 1rem;
        margin-top: 70px;
        /* Keep margin for fixed header */
    }

    .dashboard-header {
        padding: 0 1rem;
    }

    .stats-section {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .filters-group {
        width: 100%;
        flex-wrap: wrap;
    }

    .filters-group select {
        flex: 1;
        min-width: 120px;
    }

    .users-table {
        font-size: 0.75rem;
    }

    .users-table th,
    .users-table td {
        padding: 0.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions-right {
        width: 100%;
    }

    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .users-section {
        padding: 1rem;
        border-radius: 12px;
    }

    /* Hide user info on mobile, show only avatar with initials */
    .user-profile-btn .user-info {
        display: none !important;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.8125rem;
    }

    /* Reduce main padding on mobile and remove min-height */
    .admin-main {
        padding: 1rem;
        padding-top: 1rem;
        margin-top: 70px;
        /* Keep margin for fixed header */
        min-height: auto;
    }

    /* Stats section mobile optimization */
    .stats-section {
        margin-bottom: 1rem;
    }

    /* Reduce header padding on mobile */
    .header-container {
        padding: 0 1rem;
    }

    .header-right-section {
        gap: 0.5rem;
        margin-left: auto;
    }

    /* Language selector mobile fix */
    .language-selector {
        order: 1;
    }

    .lang-dropdown-toggle {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        border-radius: 6px;
        background: white;
        min-height: 36px;
    }

    .lang-dropdown-arrow {
        font-size: 1rem;
    }

    /* Hide notifications on mobile */
    .user-notifications {
        display: none;
    }

    /* User profile button compact */
    .user-profile-btn {
        padding: 0.25rem;
    }

    .user-profile-btn>.material-icons {
        display: none;
        /* Hide expand arrow */
    }

    /* Hide notification badge number on mobile */
    .notification-badge {
        font-size: 0.625rem;
        min-width: 16px;
        height: 16px;
        padding: 0 0.25rem;
    }

    /* Adjust dashboard label */
    .dashboard-label {
        font-size: 0.875rem;
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .admin-main {
        padding: 1.5rem;
    }

    .users-table {
        font-size: 0.8125rem;
    }
}

@media (min-width: 1201px) {
    .admin-main {
        padding: 2rem 3rem;
    }
}

/* ==========================================================================
   Stat Icon Color Variants
   Moved from inline styles for better maintainability
   ========================================================================== */

.stat-icon.purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

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

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

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

.stat-icon.admin-blue {
    background: linear-gradient(135deg, #1B365D 0%, #00AEEF 100%);
}

/* Table column widths */
.expand-col {
    width: 50px;
}

/* ==========================================================================
   INLINE STYLES EXTRACTED FROM JS
   Classes to replace inline styles in admin-dashboard.js
   ========================================================================== */

/* Icon alignment for SVG in badges */
.icon-svg-inline {
    display: inline-block;
    vertical-align: middle;
}

/* Small icon in text (14px) */
.icon-text-inline {
    font-size: 14px;
    vertical-align: middle;
}

/* State containers for loading/error in modals */
.state-loading-container {
    text-align: center;
    padding: 2rem;
}

.state-error-container {
    text-align: center;
    padding: 2rem;
    color: #f5576c;
}

.state-error-icon {
    font-size: 48px;
}

.state-error-message {
    font-size: 14px;
    color: #999;
}

/* External link icon */
.icon-external-link {
    font-size: 14px;
}

/* Muted small text */
.text-muted-score {
    color: #999;
}

/* Projects list in user details modal */
.details-projects-section {
    margin-top: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.details-projects-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem 0;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 700;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.details-projects-section h3 .material-icons {
    font-size: 20px;
    color: var(--admin-primary);
}

.details-projects-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.details-project-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    gap: 1rem;
    transition: var(--transition-fast);
}

.details-project-row:hover {
    border-color: var(--admin-primary);
    box-shadow: var(--shadow-sm);
}

.details-project-info {
    flex: 1;
    min-width: 0;
}

.details-project-name {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.details-project-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.details-project-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    color: var(--text-medium);
    font-size: 13px;
    font-weight: 500;
}