/* Admin Panel Styles */

.admin-section {
    min-height: 100vh;
    padding: 120px 20px 60px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.admin-access-denied {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.access-denied-content {
    text-align: center;
    padding: 40px;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(255, 77, 77, 0.3);
    max-width: 500px;
}

.access-denied-content h2 {
    color: #ff4d4d;
    margin-bottom: 16px;
}

.admin-content {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(100, 149, 237, 0.2);
}

.admin-header h1 {
    margin: 0 0 8px 0;
    font-size: 2.5rem;
    color: var(--text-primary);
}

.admin-header p {
    margin: 0;
    color: var(--text-secondary);
}

/* Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(100, 149, 237, 0.2);
}

.stat-icon {
    font-size: 3rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Admin Cards */
.admin-card {
    background: rgba(26, 26, 46, 0.8);
    border-radius: 16px;
    border: 1px solid rgba(100, 149, 237, 0.2);
    margin-bottom: 30px;
}

.admin-card-header {
    padding: 24px;
    border-bottom: 1px solid rgba(100, 149, 237, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.admin-card-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.admin-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-card-content {
    padding: 24px;
}

/* Users Table */
.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(100, 149, 237, 0.1);
}

.users-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.users-table td {
    color: var(--text-primary);
}

.users-table tr:hover {
    background: rgba(100, 149, 237, 0.05);
}

/* Role Badge */
.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.user {
    background: rgba(100, 149, 237, 0.2);
    color: var(--primary-blue);
}

.role-badge.creator {
    background: rgba(138, 43, 226, 0.2);
    color: #8a2be2;
}

.role-badge.ambassador {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.role-badge.admin {
    background: rgba(255, 77, 77, 0.2);
    color: #ff4d4d;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.status-badge.inactive {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
}

/* Pagination */
.admin-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination-btn {
    padding: 8px 16px;
    background: rgba(100, 149, 237, 0.1);
    border: 1px solid rgba(100, 149, 237, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(100, 149, 237, 0.2);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(100, 149, 237, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(100, 149, 237, 0.1);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.user-details-grid {
    display: grid;
    gap: 16px;
}

.user-detail-item {
    padding: 12px;
    background: rgba(100, 149, 237, 0.05);
    border-radius: 8px;
}

.user-detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.user-detail-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Form Inputs */
.form-input,
.form-select {
    padding: 10px 14px;
    background: rgba(100, 149, 237, 0.1);
    border: 1px solid rgba(100, 149, 237, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(100, 149, 237, 0.15);
}

.form-select {
    cursor: pointer;
}

/* Dark background for select dropdown options */
.form-select option {
    background: rgba(26, 26, 46, 0.95);
    color: var(--text-primary);
    padding: 8px;
}

.form-select:hover {
    border-color: rgba(100, 149, 237, 0.4);
}

/* Ensure select dropdown has dark background when open */
select.form-select {
    background-color: rgba(26, 26, 46, 0.95);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236494ed' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid rgba(100, 149, 237, 0.1);
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-purple));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 149, 237, 0.4);
}

.btn-secondary {
    background: rgba(100, 149, 237, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(100, 149, 237, 0.3);
}

.btn-secondary:hover {
    background: rgba(100, 149, 237, 0.2);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-filters {
        width: 100%;
    }

    .form-input,
    .form-select {
        width: 100%;
    }

    .users-table {
        font-size: 0.85rem;
    }

    .users-table th,
    .users-table td {
        padding: 8px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

