﻿/* Admin Manage Users Styles */
.admin-manage-users {
    padding: 2rem;
}

.page-header-admin {
    margin-bottom: 2rem;
}

    .page-header-admin h1 {
        font-size: 2rem;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 0.5rem;
    }

    .page-header-admin p {
        color: #64748b;
        font-size: 1rem;
    }

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
}

    .search-box i {
        position: absolute;
        left: 1rem;
        color: #94a3b8;
    }

    .search-box input {
        width: 100%;
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        font-size: 0.9375rem;
        transition: all 0.3s ease;
    }

        .search-box input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

.filter-options {
    display: flex;
    gap: 1rem;
}

    .filter-options select {
        padding: 0.75rem 1rem;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        font-size: 0.9375rem;
        background: white;
        cursor: pointer;
        transition: all 0.3s ease;
    }

        .filter-options select:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

/* Users Table Card */
.users-table-card {
    padding: 0;
    overflow: hidden;
}

.table-stats {
    padding: 1rem 1.5rem;
    background: rgba(59, 130, 246, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.875rem;
    color: #64748b;
}

    .table-stats strong {
        color: #1e293b;
        font-weight: 600;
    }

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

    .admin-table thead {
        background: #f8fafc;
        border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    }

    .admin-table th {
        padding: 1rem 1.5rem;
        text-align: left;
        font-size: 0.75rem;
        font-weight: 700;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .admin-table td {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        color: #475569;
    }

    .admin-table tbody tr {
        transition: background-color 0.2s ease;
    }

        .admin-table tbody tr:hover {
            background: rgba(59, 130, 246, 0.03);
        }

        .admin-table tbody tr.admin-row {
            background: rgba(234, 179, 8, 0.03);
        }

            .admin-table tbody tr.admin-row:hover {
                background: rgba(234, 179, 8, 0.08);
            }

/* User Cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-name-cell {
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(239, 68, 68, 0.15));
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 999px;
    font-size: 0.75rem;
    color: #d97706;
    font-weight: 600;
}

.user-username {
    font-size: 0.875rem;
    color: #94a3b8;
}

/* Subscription Cell */
.subscription-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tier-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

    .tier-badge.tier-none {
        background: rgba(107, 114, 128, 0.15);
        color: #6b7280;
        border: 1px solid rgba(107, 114, 128, 0.2);
    }

    .tier-badge.tier-basic {
        background: rgba(59, 130, 246, 0.15);
        color: #2563eb;
        border: 1px solid rgba(59, 130, 246, 0.3);
    }

    .tier-badge.tier-intermediate {
        background: rgba(139, 92, 246, 0.15);
        color: #7c3aed;
        border: 1px solid rgba(139, 92, 246, 0.3);
    }

    .tier-badge.tier-vip {
        background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(239, 68, 68, 0.2));
        color: #d97706;
        border: 1px solid rgba(234, 179, 8, 0.3);
    }

.lifetime-badge {
    font-size: 0.75rem;
    color: #059669;
    font-weight: 600;
}

.expiry-date {
    font-size: 0.75rem;
    color: #64748b;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

    .status-badge.status-active {
        background: rgba(34, 197, 94, 0.15);
        color: #16a34a;
        border: 1px solid rgba(34, 197, 94, 0.3);
    }

    .status-badge.status-inactive {
        background: rgba(239, 68, 68, 0.15);
        color: #dc2626;
        border: 1px solid rgba(239, 68, 68, 0.3);
    }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon-action {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: white;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-icon-action:hover {
        background: #3b82f6;
        color: white;
        border-color: #3b82f6;
        transform: translateY(-2px);
    }

/* Modal Styles */
.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: 1000;
    padding: 2rem;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

    .modal-header h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1e293b;
        margin: 0;
    }

.btn-close-modal {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-close-modal:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #dc2626;
    }

.modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.form-section {
    margin-bottom: 2rem;
}

    .form-section:last-child {
        margin-bottom: 0;
    }

    .form-section h3 {
        font-size: 1.125rem;
        font-weight: 600;
        color: #1e293b;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid #e2e8f0;
    }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .info-item label {
        font-size: 0.75rem;
        font-weight: 600;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .info-item span {
        color: #1e293b;
        font-size: 0.9375rem;
    }

.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: block;
        font-size: 0.875rem;
        font-weight: 600;
        color: #475569;
        margin-bottom: 0.5rem;
    }

.form-select,
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

    .form-select:focus,
    .form-input:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

    .checkbox-label:hover {
        background: rgba(59, 130, 246, 0.05);
    }

    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
    }

    .checkbox-label span {
        font-size: 0.9375rem;
        color: #475569;
        font-weight: 500;
    }

    .checkbox-label.admin-toggle span {
        color: #d97706;
        font-weight: 600;
    }

.help-text {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.quick-extend-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-quick-extend {
    padding: 0.5rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #2563eb;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-quick-extend:hover {
        background: rgba(59, 130, 246, 0.15);
        border-color: rgba(59, 130, 246, 0.3);
        transform: translateY(-2px);
    }

.alert {
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #16a34a;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary,
.btn-primary {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #475569;
}

    .btn-secondary:hover {
        background: rgba(0, 0, 0, 0.1);
    }

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    }

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* Loading and Empty States */
.loading-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

    .loading-state i,
    .empty-state i {
        font-size: 3rem;
        color: #cbd5e1;
        margin-bottom: 1rem;
    }

    .loading-state p,
    .empty-state p {
        color: #64748b;
        font-size: 1rem;
    }

.text-muted {
    color: #94a3b8;
    font-style: italic;
}
