/* Admin Page Styles */
.admin-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 120px 20px 20px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.admin-header {
    max-width: 1400px;
    margin: 0 auto 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.admin-header h1 {
    color: #1e293b;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.admin-subtitle {
    color: #64748b;
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.admin-user-info {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(59, 130, 246, 0.1);
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.user-icon {
    font-size: 1.5rem;
}

.user-details strong {
    color: #1e293b;
    font-size: 1.1rem;
}

.user-meta {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    font-size: 0.9rem;
}

.roles, .claims {
    color: #64748b;
}

/* Admin Content */
.admin-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.admin-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h2 {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.user-count-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Users Grid */
.users-grid {
    display: grid;
    gap: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.user-card {
    background: rgba(248, 250, 252, 0.8);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.user-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.user-card.selected {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.2);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.user-info h4 {
    color: #1e293b;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.user-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.role-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.role-badge.no-roles {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.user-card-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-manage {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-manage:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.btn-manage.active {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* Management Cards */
.management-tabs {
    margin-top: 20px;
}

.management-card {
    background: rgba(248, 250, 252, 0.5);
    border-radius: 16px;
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.card-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h3 {
    color: #1e293b;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.card-content {
    padding: 25px;
}

/* Form Elements */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: end;
}

.form-group-admin {
    flex: 1;
}

.form-group-admin label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.form-group-admin select,
.form-group-admin input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
}

.form-group-admin select:focus,
.form-group-admin input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-add {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-add:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

.btn-add:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Items List */
.items-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 20px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.item-row:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.item-content {
    flex: 1;
}

.item-content strong {
    color: #1e293b;
    font-weight: 600;
}

.item-meta {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 2px;
}

.btn-remove {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.empty-state {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 40px 20px;
}

/* Success Messages */
.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .admin-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .admin-container {
        padding: 100px 15px 20px;
    }
    
    .admin-header {
        padding: 30px 20px;
    }
    
    .admin-header h1 {
        font-size: 2.5rem;
    }
    
    .admin-section {
        padding: 20px;
    }
    
    .user-badge {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .user-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
