/* Admin Page Styles */

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.admin-header {
    margin-bottom: 30px;
}

.back-link {
    color: #00d9ff;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
    transition: color 0.3s;
}

.back-link:hover {
    color: #fff;
}

.admin-header h2 {
    font-size: 2rem;
    background: linear-gradient(90deg, #00d9ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-card {
    background: rgba(37, 37, 66, 0.8);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #3a3a5c;
    backdrop-filter: blur(10px);
}

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

.card-header h3 {
    font-size: 1.3rem;
    color: #00d9ff;
}

.user-count {
    background: linear-gradient(135deg, #00d9ff, #00ff88);
    color: #1a1a2e;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #3a3a5c;
}

.users-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
}

.users-table tbody tr:hover {
    background: rgba(0, 217, 255, 0.05);
}

.loading-cell {
    text-align: center;
    color: #888;
    padding: 40px !important;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.enabled {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.status-badge.disabled {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Role badge */
.role-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.role-badge.admin {
    background: linear-gradient(135deg, #00d9ff, #00ff88);
    color: #1a1a2e;
}

.role-badge.user {
    background: rgba(136, 136, 136, 0.2);
    color: #888;
}

/* Action buttons */
.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.action-btn.view {
    background: rgba(0, 217, 255, 0.2);
    color: #00d9ff;
}

.action-btn.view:hover {
    background: #00d9ff;
    color: #1a1a2e;
}

.action-btn.enable {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.action-btn.enable:hover {
    background: #00ff88;
    color: #1a1a2e;
}

.action-btn.disable {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

.action-btn.disable:hover {
    background: #ff4757;
    color: #fff;
}

/* Access Denied */
.access-denied {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.access-denied-content {
    text-align: center;
    padding: 40px;
}

.access-denied-content h2 {
    font-size: 2rem;
    color: #ff4757;
    margin: 20px 0 10px;
}

.access-denied-content p {
    color: #888;
    margin-bottom: 30px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #252542;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #3a3a5c;
}

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

.modal-header h3 {
    color: #00d9ff;
    font-size: 1.3rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #ff4757;
}

.modal-body {
    padding: 25px;
}

/* User details in modal */
.detail-section {
    margin-bottom: 25px;
}

.detail-section h4 {
    font-size: 1rem;
    color: #00d9ff;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #3a3a5c;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
}

.detail-value {
    font-size: 0.95rem;
    color: #fff;
}

/* Categories list in modal */
.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-item {
    background: rgba(58, 58, 92, 0.8);
    border: 1px solid #3a3a5c;
    border-radius: 8px;
    padding: 10px 15px;
}

.category-item .cat-name {
    font-weight: 600;
    color: #00d9ff;
    margin-bottom: 5px;
}

.category-item .subcats {
    font-size: 0.85rem;
    color: #888;
}

@media (max-width: 768px) {
    .admin-card {
        padding: 20px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .users-table th,
    .users-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
}
